openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From No1UNo <je...@jerrycarter.org>
Subject Re: Open jpa 2.0 and maven build
Date Wed, 10 Mar 2010 01:09:24 GMT

It is certainly possible to migrate from OpenJPA 1.2.x to 2.0.0.  The exact details will vary
according to your dependencies, but I was able to migrate the pom.xml file with a single version
flag.  I recommend running 'mvn dependency:tree' and studying the results.

Here also are the OpenJPA sections of my pom.xml file.  Perhaps it will help.

  <properties>
    <openjpa.version>2.0.0-beta2</openjpa.version>
    <!-- openjpa.version>1.2.2</openjpa.version -->
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.apache.openjpa</groupId>
      <artifactId>openjpa</artifactId>
      <version>${openjpa.version}</version>
    </dependency>
    ...
  </dependencies>

  <build>
    <plugins>
      <plugin> 
        <groupId>org.apache.maven.plugins</groupId> 
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
        </configuration>
      </plugin>
      
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>openjpa-maven-plugin</artifactId>
        <version>1.0</version>
        <configuration>
          <includes>com/example/*.class</includes>
          <excludes>
            com/example/*DAOImpl*.class
          </excludes>
          <addDefaultConstructor>true</addDefaultConstructor>
          <enforcePropertyRestrictions>true</enforcePropertyRestrictions>
        </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>${openjpa.version}</version>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>
  </build>


On Mar 9, 2010, at 6:01 PM, phill.moran [via OpenJPA] wrote:

> When I build my old openjpa 121 project in 2.0 it keeps giving me an error on a 121 dependency.
I use maven 2 to build and originally thought it was the plug-in doing that but I removed
the 120 dependency in the POM but still get the error. 
> Anyone else seeing this? Is there another way to build a 2.0 dependent project without
the maven-openjpa-plugin? 
> 
> Sincerely, 
>     Phill 
> 
> 
> View message @ http://n2.nabble.com/Open-jpa-2-0-and-maven-build-tp4705782p4705782.html

> To start a new topic under OpenJPA Users, email ml-node+208411-1595610943-93721@n2.nabble.com

> To unsubscribe from OpenJPA Users, click here.
> 


-- 
View this message in context: http://n2.nabble.com/Open-jpa-2-0-and-maven-build-tp4705782p4706377.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message