[hibernate-dev] Problem involving Commons Annotations 4.0.0.CR1, Core annotation processors and Gradle

Steve Ebersole steve at hibernate.org
Wed Aug 31 12:16:37 EDT 2011


The core build previously involved all these combinations (annotation 
processors, enum/defaults, gradle) and worked fine.  In fact iirc we 
had to handle this specifically originally.

Do you define just the jboss-logging artifact as a transitive dep?  Or 
did jboss-logging-tools creep in there too?  The latter should not be a 
transitive dep.  It is only needed for building the project, not at 
runtime.  If that is the case, I would guess what is happening is that 
the main javac sees that on the classpath and executes the annotation 
processor.  In core's use of gradle we avoided this by crafting 
dedicated classpaths for those annotation processors

Other than that I have no idea.

On Wed 31 Aug 2011 09:23:00 AM CDT, Emmanuel Bernard wrote:
> Hibernate Commons Annotations now uses JBoss Logging.
> 
> I tried to upgrade the library for Search without problem.
> 
> For Core unfortunately, I am having trouble. When I run
> ./gradlew clean install
> 
> I have a compilation error which I think is a come back of http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6512707
> 
> The commit is here https://github.com/emmanuelbernard/hibernate-core-ogm/commit/5507b18aec3a71a1ef95385d3fa22460f0f247f1
> 
> I have no idea on how to try and fix that with Gradle. Does that ring a bell to anyone. In Hibernate Search, we used to have such problem and fixed it with some maven-compiler-plugin configuration but I am not even familiar with that work.
> 
> 
> Log trace below
> 
> [...]
> [ant:null] ANTLR Parser Generator   Version 2.7.7 (20060906)   1989-2005
> [ant:null] ANTLR Parser Generator   Version 2.7.7 (20060906)   1989-2005
> [ant:null] ANTLR Parser Generator   Version 2.7.7 (20060906)   1989-2005
> [ant:null] ANTLR Parser Generator   Version 2.7.7 (20060906)   1989-2005
> [ant:null] ANTLR Parser Generator   Version 2.7.7 (20060906)   1989-2005
> :hibernate-core:generateMainLoggingClasses
> :hibernate-core:jaxb
> :hibernate-core:compileJava
> Note: Some input files use or override a deprecated API.
> Note: Recompile with -Xlint:deprecation for details.
> Note: Some input files use unchecked or unsafe operations.
> Note: Recompile with -Xlint:unchecked for details.
> :hibernate-core:processResources
> :hibernate-core:classes
> :hibernate-core:jar
> :hibernate-core:sourcesJar
> :hibernate-c3p0:generateMainLoggingClasses
> :hibernate-c3p0:compileJava
> :hibernate-c3p0:processResources UP-TO-DATE
> :hibernate-c3p0:classes
> :hibernate-c3p0:jar
> :hibernate-c3p0:sourcesJar
> :hibernate-c3p0:assemble
> :hibernate-testing:generateMainLoggingClasses
> :hibernate-testing:compileJava
> Note: Some input files use unchecked or unsafe operations.
> Note: Recompile with -Xlint:unchecked for details.
> :hibernate-testing:processResources UP-TO-DATE
> :hibernate-testing:classes
> :hibernate-testing:jar
> :hibernate-testing:sourcesJar
> :hibernate-c3p0:compileTestJava UP-TO-DATE
> :hibernate-c3p0:processTestResources UP-TO-DATE
> :hibernate-c3p0:testClasses UP-TO-DATE
> :hibernate-c3p0:test
> :hibernate-c3p0:check
> :hibernate-c3p0:build
> :hibernate-core:assemble
> :hibernate-core:generateMatrixGrammarSource UP-TO-DATE
> :hibernate-core:generateTestGrammarSource UP-TO-DATE
> :hibernate-core:compileTestJava
> /Users/manu/projects/notbackedup/git/privatebuild/core/hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/entity/Resources.java:45: incompatible types
> found   : javax.persistence.SharedCacheMode
> required: javax.persistence.SharedCacheMode
> 	SharedCacheMode cacheMode() default SharedCacheMode.ENABLE_SELECTIVE;
> 	                                                   ^
> Note: Some input files use or override a deprecated API.
> Note: Recompile with -Xlint:deprecation for details.
> Note: Some input files use unchecked or unsafe operations.
> Note: Recompile with -Xlint:unchecked for details.
> 1 error
> 
> FAILURE: Build failed with an exception.
> 
> 
> 
> 
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev

-- 
steve at hibernate.org
http://hibernate.org



More information about the hibernate-dev mailing list