[ http://jira.codehaus.org/browse/MNG-4833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=236249#action_236249 ]
Stuart McCulloch commented on MNG-4833: --------------------------------------- OK, here's the problem: The maven-site-plugin calls the canGenerateReport method of the JavadocReport without setting the TCCL or lookupRealm to the maven-javadoc-plugin realm. This means any (string-based) Plexus component lookup requests will use the site plugin context. As the stack trace below shows, the JavadocReport looks up an UnArchiver while processing the canGenerateReport request. Because it is using the site plugin context and not the javadoc plugin context, the ZipUnArchiver it finds is not classloader compatible (it is doing a pure string-based lookup so we only find out about the incompatibility when the value is assigned). Solution: Presumably canGenerateReport implementations are allowed to lookup Plexus components, so the maven-site-plugin must set the TCCL to the appropriate realm before calling the method and reset it afterwards (as it already does for isMavenReport). Otherwise the maven-javadoc-plugin would have to set (and reset) the TCCL itself when looking up the UnArchiver - unless of course they could switch to a type-based role lookup instead of the existing string-based one. Either way, this is something that needs to be resolved between the site and javadoc plugins. {code} at org.codehaus.plexus.archiver.manager.DefaultArchiverManager.getUnArchiver(DefaultArchiverManager.java:76) at org.apache.maven.plugin.javadoc.resolver.ResourceResolver.resolveAndUnpack(ResourceResolver.java:357) at org.apache.maven.plugin.javadoc.resolver.ResourceResolver.resolveFromArtifacts(ResourceResolver.java:302) at org.apache.maven.plugin.javadoc.resolver.ResourceResolver.resolveDependencySourcePaths(ResourceResolver.java:143) at org.apache.maven.plugin.javadoc.AbstractJavadocMojo.getDependencySourcePaths(AbstractJavadocMojo.java:2169) at org.apache.maven.plugin.javadoc.AbstractJavadocMojo.getSourcePaths(AbstractJavadocMojo.java:2058) at org.apache.maven.plugin.javadoc.JavadocReport.canGenerateReport(JavadocReport.java:213) at org.apache.maven.plugins.site.DefaultMavenReportExecutor.canGenerateReport(DefaultMavenReportExecutor.java:272) at org.apache.maven.plugins.site.DefaultMavenReportExecutor.buildMavenReports(DefaultMavenReportExecutor.java:254) at org.apache.maven.plugins.site.AbstractSiteRenderingMojo.getReports(AbstractSiteRenderingMojo.java:208) at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:105) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:195) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:140) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:314) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:151) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:445) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:168) at org.apache.maven.cli.MavenCli.main(MavenCli.java:132) {code} > Maven3 conflict with plexus-archiver > ------------------------------------ > > Key: MNG-4833 > URL: http://jira.codehaus.org/browse/MNG-4833 > Project: Maven 2 & 3 > Issue Type: Bug > Affects Versions: 3.0-beta-3 > Environment: Apache Maven 3.0-SNAPSHOT (r999839; 2010-09-22 > 11:43:26+0200) > Java version: 1.7.0-ea > Java home: /home/pether/tools/jdk1.7.0/jre > Default locale: en_US, platform encoding: UTF-8 > OS name: "linux" version: "2.6.32-25-generic" arch: "amd64" Family: "unix" > Reporter: Pether Sorling > Attachments: testmaven3.zip > > > Verson 2.7 and 2.8-SNAPSHOT have some issues with maven3. Works with 2.6.1, > different version of plexus archiver conflicts with maven. > failed to get Reports: > org.codehaus.plexus.archiver.zip.ZipUnArchiver$__plexus5 cannot be cast to > org.codehaus.plexus.archiver.UnArchiver -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira