Skip to content

Commit

Permalink
[FIXED JENKINS-6795] Maven agent needs a fix for the 'hardcoded' sock…
Browse files Browse the repository at this point in the history
…et connection to localhost, perhaps a fallback mechanism when it fails to connect through the loopback interface can solve this pesky issue?
  • Loading branch information
olamy committed Apr 18, 2011
1 parent 0aba9f9 commit 2a36ccc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion maven-plugin/pom.xml
Expand Up @@ -39,7 +39,7 @@ THE SOFTWARE.
<url>http://wiki.jenkins-ci.org/display/JENKINS/Maven+2+Project+Plugin</url>

<properties>
<mavenInterceptorsVersion>1.1</mavenInterceptorsVersion>
<mavenInterceptorsVersion>1.2</mavenInterceptorsVersion>
<mavenVersion>3.0.3</mavenVersion>
<maven.version>${mavenVersion}</maven.version>
<aetherVersion>1.11</aetherVersion>
Expand Down
Expand Up @@ -209,6 +209,9 @@ public ProcessCache.NewProcess newProcess(BuildListener listener, OutputStream o

MavenConsoleAnnotator mca = new MavenConsoleAnnotator(out,charset);

if ( mavenRemoteUseInet ) {
envVars.put(MAVEN_REMOTE_USEINET_ENV_VAR_NAME , "true" );
}
final ArgumentListBuilder cmdLine = buildMavenAgentCmdLine( listener,acceptor.getPort());
String[] cmds = cmdLine.toCommandArray();
final Proc proc = launcher.launch().cmds(cmds).envs(envVars).stdout(mca).pwd(workDir).start();
Expand Down Expand Up @@ -315,6 +318,10 @@ protected Launcher getLauncher() {
protected EnvVars getEnvVars() {
return envVars;
}

public static boolean mavenRemoteUseInet = Boolean.getBoolean("maven.remote.useinet");

public static final String MAVEN_REMOTE_USEINET_ENV_VAR_NAME = "MAVEN_REMOTE_USEINET";


}
Expand Up @@ -239,7 +239,6 @@ public boolean accept(File dir, String name) {
}

public static int socketTimeOut = Integer.parseInt( System.getProperty( "hudson.maven.socketTimeOut", Integer.toString( 30*1000 ) ) );


private static final Logger LOGGER = Logger.getLogger(MavenProcessFactory.class.getName());
}

0 comments on commit 2a36ccc

Please sign in to comment.