mirror of
https://github.com/apache/maven-mvnd.git
synced 2025-10-15 06:40:54 +00:00
Make sure the daemon system properties are reset after a build, fixes #5
This commit is contained in:
@@ -159,6 +159,7 @@ public class DaemonMavenCli
|
|||||||
// TODO need to externalize CliRequest
|
// TODO need to externalize CliRequest
|
||||||
public int doMain(CliRequest cliRequest) throws Exception
|
public int doMain(CliRequest cliRequest) throws Exception
|
||||||
{
|
{
|
||||||
|
Properties props = (Properties) System.getProperties().clone();
|
||||||
try {
|
try {
|
||||||
initialize(cliRequest);
|
initialize(cliRequest);
|
||||||
cli(cliRequest);
|
cli(cliRequest);
|
||||||
@@ -176,25 +177,9 @@ public class DaemonMavenCli
|
|||||||
{
|
{
|
||||||
return e.exitCode;
|
return e.exitCode;
|
||||||
}
|
}
|
||||||
// catch ( UnrecognizedOptionException e )
|
|
||||||
// {
|
|
||||||
// pure user error, suppress stack trace
|
|
||||||
// return 1;
|
|
||||||
// }
|
|
||||||
// catch ( BuildAbort e )
|
|
||||||
// {
|
|
||||||
// CLIReportingUtils.showError( slf4jLogger, "ABORTED", e, cliRequest.showErrors );
|
|
||||||
//
|
|
||||||
// return 2;
|
|
||||||
// }
|
|
||||||
// catch ( Exception e )
|
|
||||||
// {
|
|
||||||
// CLIReportingUtils.showError( slf4jLogger, "Error executing Maven.", e, cliRequest.showErrors );
|
|
||||||
//
|
|
||||||
// return 1;
|
|
||||||
// }
|
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
System.setProperties(props);
|
||||||
eventSpyDispatcher.close();
|
eventSpyDispatcher.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user