Randy, <classes> is supported in openjpa-maven-plugin-1.0
See http://fisheye.codehaus.org/browse/mojo/tags/openjpa-maven-plugin-1.0/src/main/java/org/codehaus/mojo/openjpa/AbstractOpenJpaMojo.java?r=9091#l50 LieGrue, strub --- Randy Watler <[email protected]> schrieb am Mi, 4.3.2009: > Von: Randy Watler <[email protected]> > Betreff: Re: OpenJPA Maven Plugin > An: [email protected] > Datum: Mittwoch, 4. März 2009, 15:28 > 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 > > > >
