Advertisement
maxtorzito

Maven Plugin generate openjpa entities (reversemappingtool)

May 11th, 2012
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 2.19 KB | None | 0 0
  1. <plugin>
  2.                 <artifactId>maven-antrun-plugin</artifactId>
  3.                 <version>1.1</version>
  4.                 <executions>
  5.                     <execution>
  6.                         <phase>generate-sources</phase>
  7.                         <configuration>                          
  8.                             <tasks>
  9.                                 <taskdef name="reversemappingtool"
  10.                                         classname="org.apache.openjpa.jdbc.ant.ReverseMappingToolTask"/>
  11.  
  12.                                 <reversemappingtool
  13.                                    package="com.xyz.model"
  14.                                    directory="${basedir}/src/main/java"
  15.                                    metadata="none"
  16.                                    generateAnnotations="true"
  17.                                >                                        
  18.                                     <config
  19.                                        propertiesFile="${basedir}/src/main/resources/META-INF/persistence.xml"/>
  20.                                        
  21.                                     <codeformat
  22.                                        tabSpaces="4"
  23.                                        spaceBeforeParen="true"
  24.                                        braceOnSameLine="false"/>
  25.                                 </reversemappingtool>
  26.                             </tasks>                            
  27.                         </configuration>
  28.                         <goals>
  29.                             <goal>run</goal>
  30.                         </goals>
  31.                     </execution>
  32.                 </executions>
  33.                 <dependencies>
  34.                     <dependency>
  35.                         <groupId>org.apache.openjpa</groupId>
  36.                         <artifactId>openjpa</artifactId>
  37.                         <version>2.2.0</version>
  38.                     </dependency>
  39.                     <dependency>
  40.                         <groupId>mysql</groupId>
  41.                         <artifactId>mysql-connector-java</artifactId>
  42.                         <version>5.1.19</version>
  43.                     </dependency>
  44.                 </dependencies>
  45.             </plugin>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement