Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolving "target" dir via "${project.build.directory}", so to make s… #124

Merged
merged 1 commit into from
Mar 4, 2019
Merged
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
16 changes: 11 additions & 5 deletions src/main/java/org/codehaus/mojo/exec/ExecMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,12 @@ public class ExecMojo
*/
@Parameter( readonly = true, required = true, defaultValue = "${basedir}" )
private File basedir;

/**
* @since 3.0.0
*/
@Parameter( readonly = true, required = true, defaultValue = "${project.build.directory}" )
private File buildDirectory;

/**
* <p>Environment variables to pass to the executed program. For example if you want to set the LANG var:
Expand Down Expand Up @@ -482,10 +488,10 @@ private void handleArguments( List<String> commandArguments )
}
else if ( argument instanceof String && isLongModulePathArgument( (String) argument ) )
{
String filePath = "target/modulepath";
String filePath = new File( buildDirectory, "modulepath" ).getAbsolutePath();

commandArguments.add( '@' + filePath );

StringBuilder modulePath = new StringBuilder();
modulePath.append( '"' );

Expand All @@ -499,7 +505,7 @@ else if ( argument instanceof String && isLongModulePathArgument( (String) argum
}

modulePath.append( '"' );

createArgFile( filePath, Arrays.asList( "-p", modulePath.toString() ) );
}
else if ( argument instanceof Classpath )
Expand All @@ -512,7 +518,7 @@ else if ( argument instanceof Classpath )
else if ( argument instanceof Modulepath )
{
Modulepath specifiedModulepath = (Modulepath) argument;

arg = computeClasspathString( specifiedModulepath );
commandArguments.add( arg );
}
Expand Down