avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject svn commit: rev 20222 - avalon/trunk/tools/magic/artifact/src/dist
Date Sat, 22 May 2004 19:16:40 GMT
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


Mime
View raw message