[
http://jira.codehaus.org/browse/MOJO-1458?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Benjamin Bentmann closed MOJO-1458.
-----------------------------------
Resolution: Fixed
Assignee: Benjamin Bentmann
Fixed in [r11286|http://fisheye.codehaus.org/changelog/mojo/?cs=11286].
> Fix non-forked APT invocation to not hack system class loader
> -------------------------------------------------------------
>
> Key: MOJO-1458
> URL: http://jira.codehaus.org/browse/MOJO-1458
> Project: Mojo
> Issue Type: Bug
> Components: apt
> Reporter: Benjamin Bentmann
> Assignee: Benjamin Bentmann
>
> Hacking the system class loader like currently in {{AptUtils}} is bad:
> {code:java}
> Method method = URLClassLoader.class.getDeclaredMethod( "addURL", new Class[]
> { URL.class } );
> method.setAccessible( true );
> method.invoke( ClassLoader.getSystemClassLoader(), new Object[] {
> toolsJar.toURL() } );
> {code}
> In particular, this won't work with the [class loader boundaries in Maven
> 3.x|http://cwiki.apache.org/confluence/display/MAVEN/Maven+3.x+Class+Loading].
> See also [TOBAGO-256|https://issues.apache.org/jira/browse/TOBAGO-256] for a
> related issue.
> Instead of hacking other people's class loaders, the plugin should create its
> own class loader.
--
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
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email