Skip to content
Permalink
Browse files

JENKINS-43446 - java.lang.NoSuchFieldError: DEFAULT_USER_SETTINGS_FILE

  • Loading branch information...
Tomer Cohen
Tomer Cohen committed Apr 11, 2017
1 parent 3ee21f5 commit ef36853372aeff340f196bced2bdad49776dda66
@@ -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;
@@ -67,6 +68,7 @@
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintStream;
import java.io.IOException;
import java.util.*;

/**
@@ -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" );
@@ -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
@@ -757,6 +764,7 @@ private MavenExecutionRequest populateRequest( CliRequest cliRequest )
if ( commandLine.hasOption( CLIManager.BATCH_MODE ) )
{
request.setInteractiveMode( false );
MessageUtils.setColorEnabled(false);
}

boolean noSnapshotUpdates = false;

0 comments on commit ef36853

Please sign in to comment.
You can’t perform that action at this time.