Author: helenxu
Date: Tue Nov 20 19:56:07 2012
New Revision: 1411827
URL: http://svn.apache.org/viewvc?rev=1411827&view=rev
Log:
wiki convertion
Modified:
openjpa/site/trunk/content/enhancement-with-maven.mdtext
Modified: openjpa/site/trunk/content/enhancement-with-maven.mdtext
URL:
http://svn.apache.org/viewvc/openjpa/site/trunk/content/enhancement-with-maven.mdtext?rev=1411827&r1=1411826&r2=1411827&view=diff
==============================================================================
--- openjpa/site/trunk/content/enhancement-with-maven.mdtext (original)
+++ openjpa/site/trunk/content/enhancement-with-maven.mdtext Tue Nov 20
19:56:07 2012
@@ -13,38 +13,36 @@ compiled (but exclude any POJO classes t
add the openjpa-maven-plugin to the <build> section of your pom.xml, like -
<build>
- ...
- <plugin>
- <groupId>org.apache.openjpa</groupId>
- <artifactId>openjpa-maven-plugin</artifactId>
- <version>2.2.0-SNAPSHOT</version>
- <configuration>
- <includes>**/entities/*.class</includes>
- <excludes>**/entities/XML*.class</excludes>
- <addDefaultConstructor>true</addDefaultConstructor>
-
-<enforcePropertyRestrictions>true</enforcePropertyRestrictions>
- </configuration>
- <executions>
- <execution>
- <id>enhancer</id>
- <phase>process-classes</phase>
- <goals>
- <goal>enhance</goal>
- </goals>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>org.apache.openjpa</groupId>
- <artifactId>openjpa</artifactId>
- <!-- set the version to be the same as the level in
-your runtime -->
- <version>1.2.2</version>
- </dependency>
- </dependencies>
- </plugin>
- ...
+ ...
+ <plugin>
+ <groupId>org.apache.openjpa</groupId>
+ <artifactId>openjpa-maven-plugin</artifactId>
+ <version>2.2.0-SNAPSHOT</version>
+ <configuration>
+ <includes>**/entities/*.class</includes>
+ <excludes>**/entities/XML*.class</excludes>
+ <addDefaultConstructor>true</addDefaultConstructor>
+ <enforcePropertyRestrictions>true</enforcePropertyRestrictions>
+ </configuration>
+ <executions>
+ <execution>
+ <id>enhancer</id>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>enhance</goal>
+ </goals>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.openjpa</groupId>
+ <artifactId>openjpa</artifactId>
+ <!-- set the version to be the same as the level in your
runtime -->
+ <version>1.2.2</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ ...
</build>
@@ -56,51 +54,48 @@ Entity to XML Schema mapping, which are
## Using the maven-antrun-plugin
You can use the maven-antrun-plugin to launch the OpenJPA enhancer task
-using ANT. The steps are nearly identical to the ones for [Enhancing with
ANT](enhancing-with-ant.html)
+using ANT. The steps are nearly identical to the ones for [Enhancing with
ANT](enhancement-with-ant.html)
(again, you may not need to move the persistence.xml file to the build
directory, but I did for this write-up).
- <build>
- <!-- Copy the persistence.xml file to the build dir -->
- <!-- You can skip this step if you put the persistence.xml in
-src/main/resources/META-INF instead of src/main/java/META-INF -->
- <resources>
- <resource>
- <directory> src/main/java </directory>
- <includes>
- <include> **/*.xml </include>
- </includes>
- </resource>
- </resources>
- <plugins>
- .....
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>1.2</version>
- <executions>
- <execution>
- <phase>process-classes</phase>
- <configuration>
- <tasks>
- <taskdef name="openjpac"
-classname="org.apache.openjpa.ant.PCEnhancerTask"
-classpathref="maven.compile.classpath"/>
- <openjpac>
- <classpath refid="maven.compile.classpath"/>
- </openjpac>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
+ <build>
+ <!-- Copy the persistence.xml file to the build dir -->
+ <!-- You can skip this step if you put the persistence.xml in
src/main/resources/META-INF instead of src/main/java/META-INF -->
+ <resources>
+ <resource>
+ <directory> src/main/java </directory>
+ <includes>
+ <include> **/*.xml </include>
+ </includes>
+ </resource>
+ </resources>
+ <plugins>
+ .....
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.2</version>
+ <executions>
+ <execution>
+ <phase>process-classes</phase>
+ <configuration>
+ <tasks>
+ <taskdef name="openjpac"
classname="org.apache.openjpa.ant.PCEnhancerTask"
classpathref="maven.compile.classpath"/>
+ <openjpac>
+ <classpath refid="maven.compile.classpath"/>
+ </openjpac>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
....
- </build>
+ </build>