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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]