-
Notifications
You must be signed in to change notification settings - Fork 41.5k
Description
I am working on more spring-boot auto configured components for Apache Camel, and for that I have enabled the Spring Boot APT plugin during compilation.
At the Apache Camel project we do have some Camel components that integrate with old technologies such as XMLBeans.
The Spring Boot APT plugin causes this compile error
[INFO] ------------------------------------------------------------------------
[INFO] Building Camel :: XMLBeans 2.18-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ camel-xmlbeans ---
[INFO] Deleting /Users/davsclaus/workspace/camel/components/camel-xmlbeans/target
[INFO]
[INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-maven) @ camel-xmlbeans ---
[INFO]
[INFO] --- maven-bundle-plugin:3.0.1:cleanVersions (versions) @ camel-xmlbeans ---
[INFO]
[INFO] --- xmlbeans-maven-plugin:2.3.3:xmlbeans-test (generate-sources) @ camel-xmlbeans ---
warning: [options] bootstrap class path not set in conjunction with -source 1.4
warning: [options] source value 1.4 is obsolete and will be removed in a future release
warning: [options] target value 1.4 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
An annotation processor threw an uncaught exception.
Consult the following stack trace for details.
java.lang.IllegalArgumentException: Incorrect number of type arguments
at com.sun.tools.javac.model.JavacTypes.getDeclaredType0(JavacTypes.java:246)
at com.sun.tools.javac.model.JavacTypes.getDeclaredType(JavacTypes.java:222)
at org.springframework.boot.configurationprocessor.TypeUtils.<init>(TypeUtils.java:77)
at org.springframework.boot.configurationprocessor.ConfigurationMetadataAnnotationProcessor.init(ConfigurationMetadataAnnotationProcessor.java:111)
at com.sun.tools.javac.processing.JavacProcessingEnvironment$ProcessorState.<init>(JavacProcessingEnvironment.java:500)
at com.sun.tools.javac.processing.JavacProcessingEnvironment$DiscoveredProcessors$ProcessorStateIterator.next(JavacProcessingEnvironment.java:597)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:690)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91)
at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1035)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1176)
at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:856)
at com.sun.tools.javac.main.Main.compile(Main.java:523)
at com.sun.tools.javac.main.Main.compile(Main.java:381)
at com.sun.tools.javac.main.Main.compile(Main.java:370)
at com.sun.tools.javac.main.Main.compile(Main.java:361)
at com.sun.tools.javac.Main.compile(Main.java:56)
at com.sun.tools.javac.Main.main(Main.java:42)
The camel-xmlbeans component does not have any Spring Boot annotations, and it seems to be causes some compilation due xmlbeans-maven-plugin
that is generating some test source code.
I just wanted to bring this to the SB team in case you want to try to track down that APT plugin, and see maybe if it should have some kind of fail safe code when grabbing javadoc. AFAIR we had some issues like that with the Apache Camel APT compiler plugin, as javadoc on various 3rd party library may be invalid and cause the APT JavaC to fail as shown before.
This is using
<spring-boot-version>1.3.5.RELEASE</spring-boot-version>
The camel-xmlbeans component that fails during compilation is located here: https://github.com/apache/camel/tree/master/components/camel-xmlbeans