Adam,
Just to clarify.... this is also using version 1.0 of the plugin? I dont
think <classes> is supported if so. Did you try this?
<includes>${build.testOutputDirectory}/org/permacode/atomic/domain/entity/*.class</includes>
Just checking before I diagnose for you,
Randy
Adam Hardy wrote:
I now use the openjpa-maven-plugin to enhance my persistence-enabled
classes, but I have a couple of projects which rely on a superclass,
which needs enhancing and testing.
I put this in a seperate project and wrote some unit tests for it,
which needed a few real entity beans to demonstrate parent-child
relationships etc. So I coded up a couple of entity beans for testing
only, in this project.
I don't want these test-only entity beans in my jar, so I put them in
the src/test/java directory, and this caused me some confusion when
configuring openjpa-maven-plugin.
I have a couple of issues getting this to work. From debug logging, i
can see that openjpa-maven-plugin is not including the test directory
in the classpath, despite this config:
<execution>
<phase>process-test-classes</phase>
<id>enhanceTestEntities</id>
<goals>
<goal>enhance</goal>
</goals>
<configuration>
<classes>
${build.testOutputDirectory}/org/permacode/atomic/domain/entity
</classes>
<outputDirectory>${build.testOutputDirectory}</outputDirectory>
<toolProperties>
<property>
<name>properties</name>
<value>
${build.testOutputDirectory}/META-INF/persistence.xml#OpenJpaTest
</value>
</property>
</toolProperties>
</configuration>
</execution>
So it fails with a ClassNotFoundException - is there anything I can
configure to get the test dir into the classpath?
Thanks
Adam