Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

No Format

/**
 * @parameter default-value="${project.compileClasspathElements}" * @requiresDependencyResolution compile
 * @required
 * @readonly
 */
private List compileClasspathElements;


 
Then, to use it, you should construct a new classloader:


 
URL[] urls = new URL[compileClasspathElements.size()];


for ( int i = 0; i < compileClasspathElements.size(); i++ )
{
    File classpathElement = (File) compileClasspathElements.get( i );
    urls[i] = classpathElement.toURL();
}


ClassLoader cl = new URLClassLoader( urls );

...