Skip to content

Commit 6ba51c3

Browse files
committed
Issue #165: Place script/argument files in target
With this the arguments and `java.[sh|bat` files will be created in the build directory (usually `target`), rather than in the output directory (usually `target/classes`). Fixes #165
1 parent 5a40182 commit 6ba51c3

File tree

1 file changed

+2
-2
lines changed
  • plexus-compilers/plexus-compiler-javac/src/main/java/org/codehaus/plexus/compiler/javac

1 file changed

+2
-2
lines changed

plexus-compilers/plexus-compiler-javac/src/main/java/org/codehaus/plexus/compiler/javac/JavacCompiler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ protected CompilerResult compileOutOfProcess( CompilerConfiguration config, Stri
559559

560560
try
561561
{
562-
File argumentsFile = createFileWithArguments( args, config.getOutputLocation() );
562+
File argumentsFile = createFileWithArguments( args, config.getBuildDirectory() );
563563
cli.addArguments(
564564
new String[]{ "@" + argumentsFile.getCanonicalPath().replace( File.separatorChar, '/' ) } );
565565

@@ -595,7 +595,7 @@ protected CompilerResult compileOutOfProcess( CompilerConfiguration config, Stri
595595
if ( ( getLogger() != null ) && getLogger().isDebugEnabled() )
596596
{
597597
File commandLineFile =
598-
new File( config.getOutputLocation(), "javac." + ( Os.isFamily( Os.FAMILY_WINDOWS ) ? "bat" : "sh" ) );
598+
new File( config.getBuildDirectory(), "javac." + ( Os.isFamily( Os.FAMILY_WINDOWS ) ? "bat" : "sh" ) );
599599
try
600600
{
601601
FileUtils.fileWrite( commandLineFile.getAbsolutePath(), cli.toString().replaceAll( "'", "" ) );

0 commit comments

Comments
 (0)