Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,12 @@ public class CompilerConfiguration
*/
private boolean forceJavacCompilerUse=false;

/**
* force a different of the debug file containing the forked command run (such javac.sh)
* @since 2.9.1
*/
private String debugFileName;

// ----------------------------------------------------------------------
//
// ----------------------------------------------------------------------
Expand Down Expand Up @@ -720,6 +726,16 @@ public void setCompilerReuseStrategy( CompilerReuseStrategy compilerReuseStrateg
this.compilerReuseStrategy = compilerReuseStrategy;
}

public String getDebugFileName()
{
return debugFileName;
}

public void setDebugFileName(String debugFileName)
{
this.debugFileName = debugFileName;
}

/**
* Re-use strategy of the compiler (implement for java only).
*/
Expand Down
2 changes: 1 addition & 1 deletion plexus-compilers/plexus-compiler-j2objc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ J2ObjC Plexus compiler
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-compiler-j2objc</artifactId>
<version>2.8.1-SNAPSHOT</version>
<version>2.9.1-SNAPSHOT</version>
</dependency>
</dependencies>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ protected CompilerResult compileOutOfProcess( CompilerConfiguration config, Stri

try
{
File argumentsFile = createFileWithArguments( args, config.getOutputLocation() );
File argumentsFile = createFileWithArguments( args, config.getBuildDirectory().getAbsolutePath() );
cli.addArguments(
new String[]{ "@" + argumentsFile.getCanonicalPath().replace( File.separatorChar, '/' ) } );

Expand Down Expand Up @@ -594,8 +594,10 @@ protected CompilerResult compileOutOfProcess( CompilerConfiguration config, Stri

if ( ( getLogger() != null ) && getLogger().isDebugEnabled() )
{
String debugFileName = StringUtils.isEmpty(config.getDebugFileName()) ? "javac" : config.getDebugFileName();

File commandLineFile =
new File( config.getOutputLocation(), "javac." + ( Os.isFamily( Os.FAMILY_WINDOWS ) ? "bat" : "sh" ) );
new File( config.getBuildDirectory(), StringUtils.trim(debugFileName) + "." + ( Os.isFamily( Os.FAMILY_WINDOWS ) ? "bat" : "sh" ) );
try
{
FileUtils.fileWrite( commandLineFile.getAbsolutePath(), cli.toString().replaceAll( "'", "" ) );
Expand Down