[
https://jira.codehaus.org/browse/MJAVADOC-407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=353250#comment-353250
]
Michal Srb commented on MJAVADOC-407:
-------------------------------------
Yes, that's correct and it still applies. I don't know about any case where the
fix for MJAVADOC-398 causes problems. But, of course, there is always a chance
that I might be missing something. I think it would be great if affected people
could test the snapshot prepared by Michael and report back. Nevertheless, if
Michael will decide that it will be better/safer to make MJAVADOC-398 fix
optional, I am perfectly fine with it.
Btw. I can prepare simple reproducer which demonstrates issue with
javadoc(-plugin) and JDK8. Real world example of this issue seems to be for
example this:
http://mail-archives.apache.org/mod_mbox/maven-users/201409.mbox/%3CC84C4FB966D26947A3768912D36DE02A2C0ECDF7%40fgdemucimp01exc.ads.fraunhofer.de%3E
> Cannot parse annotations when generating javadoc
> -------------------------------------------------
>
> Key: MJAVADOC-407
> URL: https://jira.codehaus.org/browse/MJAVADOC-407
> Project: Maven Javadoc Plugin
> Issue Type: Bug
> Affects Versions: 2.10
> Environment: Linux and windows.
> Maven 3.0.4 , JDK 1.6.0.43
> Reporter: jeff porter
> Assignee: Michael Osipov
> Fix For: 2.10.1
>
> Attachments: AbstractJavadocMojo.java.patch
>
>
> See full issue text at :
> http://stackoverflow.com/questions/25971832/javadoc-generation-failed-classcastexception-com-sun-tools-javadoc-classdocim
> I'm getting the following error when I do
> {noformat}mvn clean deploy -DperformRelease=true
> [ERROR] Exit code: 1 - .java:3: package javax.inject does not exist
> [ERROR] import javax.inject.Named;
> [ERROR]
> [ERROR] TransactionServiceExternalImpl.java:5: cannot find symbol
> [ERROR] symbol: class Named
> [ERROR] @Named("transactionServiceExternal")
> [ERROR]
> [ERROR] java.lang.ClassCastException: com.sun.tools.javadoc.ClassDocImpl
> cannot be cast to com.sun.javadoc.AnnotationTypeDoc{noformat}
> The POM is this...
> {code:xml}<groupId>com.xxx</groupId>
> <artifactId>ts-impl/artifactId>
> <version>2.4.0-SNAPSHOT</version>
> <dependencies>
> <dependency>
> <groupId>javax.inject</groupId>
> <artifactId>javax.inject</artifactId>
> <version>1</version>
> </dependency>
> </dependencies>{code}
> There is only one class...
> {code:java}import javax.inject.Named;
> @Named("transactionServiceExternal")
> public class TransactionServiceExternalImpl
> {
> }{code}
> I get the error with
> jdk1.5.0_22
> jdk1.6.0_29
> jdk1.6.0_43
> jdk1.6.0_43_32bit
> But NOT with...
> jdk1.7.0_05
> Anyone have any ideas?
> Notes: Apache Maven 3.0.4 (r1232337; 2012-01-17 08:44:56+0000)
> ____________________________
> I now know that the reason is that the Maven Javadoc Plugin has changed from
> 2.9.1 to 2.10. and this is the cause of the problem.
> I can see this warning...
> [WARNING] 'build.plugins.plugin.version' for
> org.apache.maven.plugins:maven-javadoc-plugin is missing. [WARNING]
> 'build.plugins.plugin.version' for
> org.apache.maven.plugins:maven-deploy-plugin is missing.
> By setting the following in my pom....
> org.apache.maven.plugins maven-javadoc-plugin 2.9.1 attach-javadocs jar
> I can fix the version back to the last release.
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)