Maven-enunciate-plugin on java 1.8 since apt is now removed from the latest JDK (i.e. java annotation processing tool)

The question is how to get java 1.8 and maven-enunciate-plugin to work together?

With the plugin maven org.codehaus.enunciate version 1.29 and OSX JDK 1.7.0_25 everything is fine. Enunciate depends on apt , and I see this warning at runtime at 1.7.0_25

[INFO] calling enunciate: generate step ...

warning: the apt tool and its associated API are planned to be removed in the next release of the JDK. These features were replaced by javac and the standardized annotation processing API, javax.annotation.processing and javax.lang.model. Users are encouraged to switch to javac annotation processing features; see the javac man page for more information.

When changing command 1.8.0_05 failure ...

apt really went away, so com.sun.mirror.apt.AnnotationProcessorFactory runtime errors were not found.

mvn install -pl myProject -e -X

...

 <snip> urls[46] = file:/Users/k1/.m2/repository/org/codehaus/enunciate/enunciate-xml/1.29/enunciate-xml-1.29.jar urls[47] = file:/Users/k1/.m2/repository/org/codehaus/enunciate/enunciate-java-client/1.29/enunciate-java-client-1.29.jar urls[48] = file:/Users/k1/.m2/repository/org/codehaus/enunciate/enunciate-c/1.29/enunciate-c-1.29.jar urls[49] = file:/Users/k1/.m2/repository/org/codehaus/enunciate/enunciate-obj-c/1.29/enunciate-obj-c-1.29.jar urls[50] = file:/Users/k1/.m2/repository/org/codehaus/enunciate/enunciate-csharp/1.29/enunciate-csharp-1.29.jar urls[51] = file:/Users/k1/.m2/repository/org/codehaus/enunciate/enunciate-ruby/1.29/enunciate-ruby-1.29.jar urls[52] = file:/Users/k1/.m2/repository/org/codehaus/enunciate/enunciate-php/1.29/enunciate-php-1.29.jar Number of foreign imports: 1 import: Entry[import from realm ClassRealm[maven.api, parent: null]] ----------------------------------------------------- at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:165) ... 20 more Caused by: java.lang.NoClassDefFoundError: com/sun/mirror/apt/AnnotationProcessorFactory at org.codehaus.enunciate.DocsMojo.loadMavenSpecificEnunciate(DocsMojo.java:107) at org.codehaus.enunciate.ConfigMojo.execute(ConfigMojo.java:326) at org.codehaus.enunciate.DocsMojo.execute(DocsMojo.java:81) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133) ... 20 more Caused by: java.lang.ClassNotFoundException: com.sun.mirror.apt.AnnotationProcessorFactory at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50) at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:235) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227) ... 24 more [ERROR] [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException 
+7
java maven annotations apt enunciate
source share
1 answer

EDIT July 2015: This original question and this answer were written when Enunciate 1.x was the last. Although 1.x still does not support java 1.8, as described in the comments below, 2.0 M-1 now has limited support for java 1.8, that is, documentation created, but not API modules.

As recommended by @bmargulies, I looked at the JIRA page (which I think should have done in the first place!) To paraphrase JIRA ENUNCIATE-701

"There is still no timeline for compatibility with Enunciate / JDK8."

Enunciate has moved to Github; problem there # 68

+5
source share

All Articles