Author: cmueller
Date: Sun Feb 26 13:34:27 2012
New Revision: 1293833
URL: http://svn.apache.org/viewvc?rev=1293833&view=rev
Log:
CAMEL-5044: Use the openjpa-maven-plugin instead of maven-antrun-plugin to
enhance the JPA entities for OpenJPA
Modified:
camel/trunk/components/camel-jpa/pom.xml
camel/trunk/tests/camel-itest-osgi/pom.xml
Modified: camel/trunk/components/camel-jpa/pom.xml
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-jpa/pom.xml?rev=1293833&r1=1293832&r2=1293833&view=diff
==============================================================================
--- camel/trunk/components/camel-jpa/pom.xml (original)
+++ camel/trunk/components/camel-jpa/pom.xml Sun Feb 26 13:34:27 2012
@@ -116,63 +116,40 @@
</systemProperties>
</configuration>
</plugin>
-
-
- <!-- lets enhance the classes for OpenJPA (shame it can't do it at
runtime!) -->
+
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>org.apache.openjpa</groupId>
- <artifactId>openjpa-persistence-jdbc</artifactId>
- <version>${openjpa-version}</version>
- </dependency>
- </dependencies>
-
- <executions>
- <execution>
- <phase>process-test-classes</phase>
- <configuration>
- <target>
- <path id="cp">
- <path refid="maven.test.classpath" />
- <path refid="maven.compile.classpath" />
- <path refid="maven.dependency.classpath" />
- </path>
- <taskdef name="openjpac"
classname="org.apache.openjpa.ant.PCEnhancerTask">
- <classpath refid="cp" />
- </taskdef>
-
- <mkdir dir="${basedir}/target/jpa-test-classes" />
-
- <openjpac directory="${basedir}/target/jpa-test-classes">
- <classpath refid="cp" />
- <fileset dir="${basedir}/target/classes">
- <include
name="org/apache/camel/processor/**/MessageProcessed.class" />
- <include
name="org/apache/camel/processor/**/JpaTraceEventMessage.class" />
- </fileset>
- <config
propertiesFile="${basedir}/src/test/resources/META-INF/persistence.xml" />
- </openjpac>
-
- <openjpac directory="${basedir}/target/jpa-test-classes">
- <classpath refid="cp" />
- <fileset dir="${basedir}/target/test-classes">
- <include name="org/apache/camel/examples/*.class" />
- </fileset>
- <config
propertiesFile="${basedir}/src/test/resources/META-INF/persistence.xml" />
- </openjpac>
-
- <copy overwrite="true" todir="${basedir}/target/test-classes">
- <fileset dir="${basedir}/target/jpa-test-classes" />
- </copy>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
+ <groupId>org.apache.openjpa</groupId>
+ <artifactId>openjpa-maven-plugin</artifactId>
+ <version>${openjpa-version}</version>
+ <configuration>
+
<persistenceXmlFile>${project.basedir}/src/test/resources/META-INF/persistence.xml</persistenceXmlFile>
+
<includes>org/apache/camel/processor/idempotent/jpa/MessageProcessed.class,org/apache/camel/processor/interceptor/jpa/JpaTraceEventMessage.class,org/apache/camel/examples/*.class</includes>
+ <addDefaultConstructor>true</addDefaultConstructor>
+ <enforcePropertyRestrictions>true</enforcePropertyRestrictions>
+ </configuration>
+ <executions>
+ <execution>
+ <id>enhancer</id>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>enhance</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>test enhancer</id>
+ <phase>process-test-classes</phase>
+ <goals>
+ <goal>test-enhance</goal>
+ </goals>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.openjpa</groupId>
+ <artifactId>openjpa</artifactId>
+ <version>${openjpa-version}</version>
+ </dependency>
+ </dependencies>
</plugin>
</plugins>
Modified: camel/trunk/tests/camel-itest-osgi/pom.xml
URL:
http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/pom.xml?rev=1293833&r1=1293832&r2=1293833&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/pom.xml (original)
+++ camel/trunk/tests/camel-itest-osgi/pom.xml Sun Feb 26 13:34:27 2012
@@ -417,61 +417,34 @@
</execution>
</executions>
</plugin>
- <!-- lets enhance the classes for OpenJPA (shame it can't do it at
runtime!) -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>org.apache.openjpa</groupId>
- <artifactId>openjpa-persistence-jdbc</artifactId>
- <version>${openjpa-version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <phase>process-test-classes</phase>
- <configuration>
- <target>
- <path id="cp">
- <path refid="maven.test.classpath" />
- <path refid="maven.compile.classpath" />
- <path refid="maven.dependency.classpath" />
- </path>
- <taskdef name="openjpac"
classname="org.apache.openjpa.ant.PCEnhancerTask">
- <classpath refid="cp" />
- </taskdef>
-
- <mkdir dir="${basedir}/target/jpa-test-classes" />
-
- <openjpac
directory="${basedir}/target/jpa-test-classes">
- <classpath refid="cp" />
- <fileset dir="${basedir}/target/classes">
- <include
name="org/apache/camel/itest/osgi/jpa/SendEmail.class" />
- </fileset>
- <config
propertiesFile="${basedir}/src/test/resources/META-INF/persistence.xml" />
- </openjpac>
-
- <openjpac
directory="${basedir}/target/jpa-test-classes">
- <classpath refid="cp" />
- <fileset dir="${basedir}/target/test-classes">
- <include
name="org/apache/camel/examples/*.class" />
- </fileset>
- <config
propertiesFile="${basedir}/src/test/resources/META-INF/persistence.xml" />
- </openjpac>
-
- <copy overwrite="true"
todir="${basedir}/target/test-classes">
- <fileset
dir="${basedir}/target/jpa-test-classes" />
- </copy>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
+ <plugin>
+ <groupId>org.apache.openjpa</groupId>
+ <artifactId>openjpa-maven-plugin</artifactId>
+ <version>${openjpa-version}</version>
+ <configuration>
+
<persistenceXmlFile>${project.basedir}/src/test/resources/META-INF/persistence.xml</persistenceXmlFile>
+
<includes>org/apache/camel/itest/osgi/jpa/SendEmail.class</includes>
+
<addDefaultConstructor>true</addDefaultConstructor>
+
<enforcePropertyRestrictions>true</enforcePropertyRestrictions>
+ </configuration>
+ <executions>
+ <execution>
+ <id>test enhancer</id>
+ <phase>process-test-classes</phase>
+ <goals>
+ <goal>test-enhance</goal>
+ </goals>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.openjpa</groupId>
+ <artifactId>openjpa</artifactId>
+ <version>${openjpa-version}</version>
+ </dependency>
+ </dependencies>
+ </plugin>
</plugins>
</build>