diff --git a/plexus-compilers/plexus-compiler-javac/src/main/java/org/codehaus/plexus/compiler/javac/JavacCompiler.java b/plexus-compilers/plexus-compiler-javac/src/main/java/org/codehaus/plexus/compiler/javac/JavacCompiler.java index 5f38977a..73a74b60 100644 --- a/plexus-compilers/plexus-compiler-javac/src/main/java/org/codehaus/plexus/compiler/javac/JavacCompiler.java +++ b/plexus-compilers/plexus-compiler-javac/src/main/java/org/codehaus/plexus/compiler/javac/JavacCompiler.java @@ -559,7 +559,7 @@ protected CompilerResult compileOutOfProcess( CompilerConfiguration config, Stri try { - File argumentsFile = createFileWithArguments( args, config.getOutputLocation() ); + File argumentsFile = createFileWithArguments( args, config.getBuildDirectory() ); cli.addArguments( new String[]{ "@" + argumentsFile.getCanonicalPath().replace( File.separatorChar, '/' ) } ); @@ -595,7 +595,7 @@ protected CompilerResult compileOutOfProcess( CompilerConfiguration config, Stri if ( ( getLogger() != null ) && getLogger().isDebugEnabled() ) { File commandLineFile = - new File( config.getOutputLocation(), "javac." + ( Os.isFamily( Os.FAMILY_WINDOWS ) ? "bat" : "sh" ) ); + new File( config.getBuildDirectory(), "javac." + ( Os.isFamily( Os.FAMILY_WINDOWS ) ? "bat" : "sh" ) ); try { FileUtils.fileWrite( commandLineFile.getAbsolutePath(), cli.toString().replaceAll( "'", "" ) ); @@ -979,7 +979,7 @@ private static String getWarnPrefix( String msg ) * @return the temporary file wth the arguments * @throws IOException */ - private File createFileWithArguments( String[] args, String outputDirectory ) + private File createFileWithArguments( String[] args, File outputDirectory ) throws IOException { PrintWriter writer = null; @@ -989,7 +989,7 @@ private File createFileWithArguments( String[] args, String outputDirectory ) if ( ( getLogger() != null ) && getLogger().isDebugEnabled() ) { tempFile = - File.createTempFile( JavacCompiler.class.getName(), "arguments", new File( outputDirectory ) ); + File.createTempFile( JavacCompiler.class.getName(), "arguments", outputDirectory ); } else {