openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Struberg <strub...@yahoo.de>
Subject Re: Using 2.2.0-SNAPSHOT maven plugin
Date Fri, 13 Jan 2012 14:47:23 GMT
Hi Francesco!

If you use the openjpa-maven-plugin from OpenJPA itself then you don't need to add any dependency!

The new one uses openjpa-kernel, etc directly and not the 1-in-all openjpa (-all) bundle anymore.
Please try to remove the openjpa dependency as a first step.


ad logging:

There are 2 mechanism included
  a.) openjpa loggin
  b.) the plugin logging from maven

If running Apache Maven with the -X option (mvn -X openjpa enhance) changes the log output,
then you most probably hit b.).


For running the PCEnhancer from inside the maven plugin we have the plugin classpath (thus
also its <dependencies>) plus the compile classpath (this is needed for the enhancer).
So any jar in your dependencies section of the openjpa-m-p should get picked up as well.

hope that gives you a bit more info to continue your research - hope that helps.

LieGrue,
strub



----- Original Message -----
> From: Francesco Chicchiriccò <ilgrosso@apache.org>
> To: users@openjpa.apache.org
> Cc: 
> Sent: Friday, January 13, 2012 2:08 PM
> Subject: Using 2.2.0-SNAPSHOT maven plugin
> 
> Hi all,
> I am currently using OpenJPA 2.2.0-SNAPSHOT, so plugin is configured as
> follows:
> 
>             <plugin>
>                 <groupId>org.apache.openjpa</groupId>
>                 <artifactId>openjpa-maven-plugin</artifactId>
>                 <version>2.2.0-SNAPSHOT</version>
>                 <dependencies>
>                     <dependency>
>                         <groupId>org.apache.openjpa</groupId>
>                         <artifactId>openjpa</artifactId>
>                         <version>2.2.0-SNAPSHOT</version>
>                     </dependency>
>                     <dependency>
>                         <groupId>com.h2database</groupId>
>                         <artifactId>h2</artifactId>
>                         <version>${h2.version}</version>
>                     </dependency>
>                 </dependencies>
>                 <configuration>
>                   
> <includes>org/syncope/core/persistence/beans/**/*.class</includes>
>                   
> <connectionDriverName>org.springframework.jdbc.datasource.DriverManagerDataSource</connectionDriverName>
>                     <connectionProperties>
>                         driverClassName=org.h2.Driver,
>                         url=jdbc:h2:mem:syncopedb
>                         username=sa,
>                         password=
>                     </connectionProperties>
>                 </configuration>
>                 <executions>
>                     <execution>
>                         <id>enhancer</id>
>                         <phase>process-classes</phase>
>                         <goals>
>                             <goal>enhance</goal>
>                         </goals>
>                     </execution>
>                 </executions>
>             </plugin>
> 
> It works fine either with openjpa:enhance and openjpa:sql but it shows
> some warnings:
> 
> [INFO] --- openjpa-maven-plugin:2.2.0-SNAPSHOT:enhance (enhancer) @
> syncope-core ---
> Downloading:
> file://${basedir}/internal-repository/org/apache/openjpa/openjpa-lib/2.2.0-SNAPSHOT/maven-metadata.xml
> [WARNING] Could not transfer metadata
> org.apache.openjpa:openjpa-lib:2.2.0-SNAPSHOT/maven-metadata.xml from/to
> openjpa-internal (file://${basedir}/internal-repository): Repository
> path /internal-repository does not exist, and cannot be created.
> 
> Moreover, I'd like to redirect these log messages somewhere; as far as
> I've understood, it should be enough to include logback in plugin's
> classpath:
> 
> SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
> SLF4J: Defaulting to no-operation (NOP) logger implementation
> SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for
> further details.
> 
> but adding it as bare <dependency> in the configuration above does not 
> work.
> 
> Any hint?
> 
> -- 
> Francesco Chicchiriccò
> 
> Apache Cocoon Committer and PMC Member
> http://people.apache.org/~ilgrosso/
> 

Mime
View raw message