Author: niclas Date: Sat May 22 12:16:39 2004 New Revision: 20222 Modified: avalon/trunk/tools/magic/artifact/src/dist/build.bsh Log: Broke out the URL creation in the getClassloader() so it can be used for other stuff.
Modified: avalon/trunk/tools/magic/artifact/src/dist/build.bsh ============================================================================== --- avalon/trunk/tools/magic/artifact/src/dist/build.bsh (original) +++ avalon/trunk/tools/magic/artifact/src/dist/build.bsh Sat May 22 12:16:39 2004 @@ -111,6 +111,14 @@ public ClassLoader getClassloader( Artifact[] artifacts ) throws IOException { + URL[] jars = getLocalURLs( artifacts ); + URLClassLoader classloader = new URLClassLoader( jars ); + return classloader; + } + + public URL[] getLocalURLs( Artifact[] artifacts ) + throws IOException + { URL[] jars = new URL[ artifacts.length ]; for( int i=0 ; i < artifacts.length ; i++ ) { @@ -122,8 +130,7 @@ } jars[i] = localFile.toURL(); } - URLClassLoader classloader = new URLClassLoader( jars ); - return classloader; + return jars; } public Path getClassPath( Artifact[] artifacts ) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]