You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by ni...@apache.org on 2004/05/22 21:16:40 UTC

svn commit: rev 20222 - avalon/trunk/tools/magic/artifact/src/dist

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: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org