avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject svn commit: rev 20594 - avalon/trunk/tools/magic/java/src/dist
Date Sat, 29 May 2004 14:12:44 GMT
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


Mime
View raw message