提交 eeada0a6 编写于 作者: K kohsuke

turns out my fix was wrong.

DefaultClassRealm in classworlds is child-first delegation, so when loading classes in a child container (which creates its own realm), MojoScanner interface ends up loaded locally.
So really the only solution is to hide the maven-plugin-tools-api.jar from embedded Maven.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@2106 71c3de6d-444a-0410-be80-ed276b4c234a
上级 6b38dddd
...@@ -206,19 +206,5 @@ ...@@ -206,19 +206,5 @@
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<!--
When Hudson runs in Jetty launched from Maven, plugin-tools-api.jar visible
to Jetty mojo becomes visible to Hudson running inside it.
This causes a problem because whereas embedded Maven should have loaded another copy
of this in its own classworlds, instead we'd end up seeing this class from Jetty.
So to prevent this problem, make sure to load this jar from the web application itself,
so that it can still resolve the same underlying Maven classes.
-->
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-tools-api</artifactId>
<version>2.0.4</version>
</dependency>
</dependencies> </dependencies>
</project> </project>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册