Skip to content

Commit

Permalink
JENKINS-43446 - java.lang.NoSuchFieldError: DEFAULT_USER_SETTINGS_FILE
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomer Cohen committed Apr 11, 2017
1 parent 3ee21f5 commit ef36853
Showing 1 changed file with 11 additions and 3 deletions.
Expand Up @@ -42,6 +42,7 @@
import org.apache.maven.model.building.ModelProcessor;
import org.apache.maven.properties.internal.EnvironmentUtils;
import org.apache.maven.settings.building.*;
import org.apache.maven.shared.utils.logging.MessageUtils;
import org.apache.maven.toolchain.building.*;
import org.codehaus.plexus.PlexusContainer;
import org.codehaus.plexus.classworlds.ClassWorld;
Expand All @@ -67,6 +68,7 @@
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintStream;
import java.io.IOException;
import java.util.*;

/**
Expand Down Expand Up @@ -175,8 +177,7 @@ public MavenExecutionRequest getMavenExecutionRequest( String[] args, PrintStrea
}


private void initialize( CliRequest cliRequest )
{
private void initialize( CliRequest cliRequest ) throws IOException {
if ( cliRequest.workingDirectory == null )
{
cliRequest.workingDirectory = System.getProperty( "user.dir" );
Expand All @@ -191,11 +192,17 @@ private void initialize( CliRequest cliRequest )
if ( mavenHome != null )
{
System.setProperty( "maven.home", new File( mavenHome ).getAbsolutePath() );
String mavenConf = System.getProperty("maven.conf");
if (mavenConf == null) {
System.setProperty("maven.conf", new File(System.getProperty("maven.home", System.getProperty("user.dir", "")), "conf").getCanonicalPath());

}

}
}

private void cli( CliRequest cliRequest )
throws Exception
throws Exception
{
//
// Parsing errors can happen during the processing of the arguments and we prefer not having to check if the logger is null
Expand Down Expand Up @@ -757,6 +764,7 @@ private MavenExecutionRequest populateRequest( CliRequest cliRequest )
if ( commandLine.hasOption( CLIManager.BATCH_MODE ) )
{
request.setInteractiveMode( false );
MessageUtils.setColorEnabled(false);
}

boolean noSnapshotUpdates = false;
Expand Down

0 comments on commit ef36853

Please sign in to comment.