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


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


Reply via email to