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/29 16:12:44 UTC

svn commit: rev 20594 - avalon/trunk/tools/magic/java/src/dist

Author: niclas
Date: Sat May 29 07:12:44 2004
New Revision: 20594

Modified:
   avalon/trunk/tools/magic/java/src/dist/magic.bsh
Log:
Exposing the compile method to be used by other plugins.

Modified: avalon/trunk/tools/magic/java/src/dist/magic.bsh
==============================================================================
--- avalon/trunk/tools/magic/java/src/dist/magic.bsh	(original)
+++ avalon/trunk/tools/magic/java/src/dist/magic.bsh	Sat May 29 07:12:44 2004
@@ -81,10 +81,15 @@
         File fromDir = new File( srcdirname ); 
         
         String classpath = m_Context.getProperty( "java.class.path" );
-        
+        compile( classpath, toDir, fromDir );
+    }
+    
+    public void compile( String classpath, File destDir, File srcDir )
+        throws IOException
+    {
         Javac javac = (Javac) m_Project.createTask( "javac" );
         /* Set the destination */
-        javac.setDestdir( toDir );
+        javac.setDestdir( destDir );
         javac.setDeprecation( true );
         javac.setDebug( true );
         
@@ -106,7 +111,7 @@
         /* Add the source path */
         Path src = javac.createSrc();
         Path.PathElement srcPE = src.createPathElement();
-        srcPE.setLocation( fromDir );
+        srcPE.setLocation( srcDir );
         
         javac.init();
         javac.execute(); 

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org