You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by Craig L Russell <Cr...@Sun.COM> on 2009/05/13 19:43:18 UTC

Maven plugin for 2.0.0?

Hi,

I'm running on the trunk 2.0.0-SNAPSHOT and now getting around to  
configuring the openjpa maven plugin. But the plugin that is available  
from maven defaults to OpenJPA 1.2.0.

1. Any advice on how to configure the plugin to use 2.0.0? I've put  
2.0.0-SNAPSHOT into the dependencies but it still tries to use 1.2.0.

2. The example from http://mojo.codehaus.org/openjpa-maven-plugin/usage.html 
  shows in the <configuration> section <includes>com/myproject/ 
entities/**/*.class</includes> but the plugin also requires the  
persistence.xml. Does this mean that if classes are named in  
persistence.xml that the configuration includes isn't necessary?

Here's my pom.xml:
       <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>openjpa-maven-plugin</artifactId>
         <version>1.0</version>
         <configuration>
           <includes>${basedir}/target/test-classes/**/*.class</ 
includes>
         </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>
             <version>2.0.0-SNAPSHOT</version>
           </dependency>
         </dependencies>
       </plugin>

And the output:

[CraigRussell:ndb/clusterj/clusterj-openjpa] clr% mvn install
[INFO] Scanning for projects...
[INFO]  
----------------------------------------------------------------------------
[INFO] Building ClusterJ OpenJPA Integration
[INFO]    task-segment: [install]
[INFO]  
----------------------------------------------------------------------------
[INFO] [enforcer:enforce {execution: enforce-versions}]
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] Preparing openjpa:enhance
[WARNING] Removing: enhance from forked lifecycle, to prevent  
recursive invocation.
[INFO] [enforcer:enforce {execution: enforce-versions}]
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
Downloading: http://repo1.maven.org/maven2/org/apache/openjpa/openjpa/1.2.0/openjpa-1.2.0.jar
...oops

Thanks,

Craig

Craig L Russell
Architect, Sun Java Enterprise System http://db.apache.org/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!