[
https://issues.apache.org/jira/browse/TOBAGO-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12778841#action_12778841
]
Benjamin Bentmann commented on TOBAGO-256:
------------------------------------------
>From the plugin's source code:
{code:java}
// we need to have tools.jar in lasspath
// due to bug in Apt compiler, system classpath must be modified but in future:
// TODO try separate ClassLoader (see Plexus compiler api)
if ( !isClasspathModified )
{
URL toolsJar = new File( System.getProperty( "java.home" ),
"../lib/tools.jar" ).toURL();
Method m = URLClassLoader.class.getDeclaredMethod( "addURL",
new Class[] { URL.class } );
m.setAccessible( true );
m.invoke( this.getClass().getClassLoader()
.getSystemClassLoader(), new Object[] { toolsJar } );
isClasspathModified = true;
}
{code}
hacking the system class loader is a no-no. They should create their own class
loader.
> the apt plugin fails to execute in embedded environment
> -------------------------------------------------------
>
> Key: TOBAGO-256
> URL: https://issues.apache.org/jira/browse/TOBAGO-256
> Project: MyFaces Tobago
> Issue Type: Bug
> Components: Maven Apt Plugin
> Environment: maven 2.1-snapshot + mevenide 2.3 + netbeans 5.5
> Reporter: Milos Kleint
>
> the apt plugin seems to fail in embedded environment, like in the netbeans
> IDE integration.
> when not forked, it cannot find the apt's main class for some reason. This
> one could be either a problem in the plugin or somewhere in the classloading
> of maven when embedding (or somewhere else)
> when forked, it fails to execute on windows platform where there is space in
> the path to jdk. that one seems to be hardly a problem of embedding, but
> strangely enough it seems to work on command line just fine.
> for details, see http://jira.codehaus.org/browse/MEVENIDE-482
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.