Hi,
Just thought I'd share a small bit of Maven config to aid in enhancing persistent classes during compile time. Just add the following to your pom.xml:
<build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.2</version> <dependencies> <dependency> <groupId>com.objectdb</groupId> <artifactId>objectdb</artifactId> <version>${com.objectdb.version}</version> <scope>compile</scope> </dependency> </dependencies> <executions> <execution> <phase>compile</phase> <goals> <goal>java</goal> </goals> </execution> </executions> <configuration> <mainClass>com.objectdb.Enhancer</mainClass> <!-- List of your packages --> <arguments> <argument>com.x.y.a.*</argument> <argument>com.x.y.b.*</argument> </arguments> </configuration> </plugin>
Then, in your output when performing a 'mvn clean compile' you should see something like the following (after the compile has completed):
[INFO] --- exec-maven-plugin:1.2:java (default) @ project-domain --- [ObjectDB 2.2.2 Enhancer] 4 persistable types have been enhanced: com.x.y.a.AB com.x.y.a.AC com.x.y.b.AA com.x.y.b.AZ
Hope somebody finds it useful. I searched around for it but couldn't find a maven centric way to handle it.
Cheers