mirror of https://github.com/apache/maven.git
Use the loopback address for connecting to an in-process web server
This may resolve the connection issues we sometimes see in GitHub Actions where the Maven process that is being tested cannot connect to the Jetty server that was just started. This closes #107
This commit is contained in:
parent
aea9276d50
commit
d139dd68f7
|
@ -86,7 +86,7 @@ public class MavenIT0146InstallerSnapshotNaming
|
|||
Verifier verifier = newVerifier( testDir.getAbsolutePath() );
|
||||
|
||||
Properties properties = verifier.newDefaultFilterProperties();
|
||||
properties.setProperty( "@host@", InetAddress.getLocalHost().getCanonicalHostName() );
|
||||
properties.setProperty( "@host@", InetAddress.getLoopbackAddress().getCanonicalHostName() );
|
||||
properties.setProperty( "@port@", Integer.toString( port ) );
|
||||
|
||||
verifier.filterFile( "settings-template.xml", "settings.xml", "UTF-8", properties );
|
||||
|
@ -125,7 +125,7 @@ public class MavenIT0146InstallerSnapshotNaming
|
|||
verifier = newVerifier( testDir.getAbsolutePath() );
|
||||
|
||||
Properties properties = verifier.newDefaultFilterProperties();
|
||||
properties.setProperty( "@host@", InetAddress.getLocalHost().getCanonicalHostName() );
|
||||
properties.setProperty( "@host@", InetAddress.getLoopbackAddress().getCanonicalHostName() );
|
||||
properties.setProperty( "@port@", Integer.toString( port ) );
|
||||
|
||||
verifier.filterFile( "settings-template.xml", "settings.xml", "UTF-8", properties );
|
||||
|
|
|
@ -119,7 +119,7 @@ public class MavenITmng2387InactiveProxyTest
|
|||
Verifier verifier = newVerifier( testDir.getAbsolutePath() );
|
||||
|
||||
Properties properties = verifier.newDefaultFilterProperties();
|
||||
properties.setProperty( "@host@", InetAddress.getLocalHost().getCanonicalHostName() );
|
||||
properties.setProperty( "@host@", InetAddress.getLoopbackAddress().getCanonicalHostName() );
|
||||
properties.setProperty( "@port@", Integer.toString( port ) );
|
||||
properties.setProperty( "@proxyPort@", Integer.toString( proxyPort ) );
|
||||
verifier.filterFile( "settings-template.xml", "settings.xml", "UTF-8", properties );
|
||||
|
|
|
@ -93,7 +93,7 @@ public class MavenITmng4991NonProxyHostsTest
|
|||
filterProps.setProperty( "@port@", Integer.toString( port ) );
|
||||
int proxyPort = ( (NetworkConnector) proxy.getConnectors()[0] ).getLocalPort();
|
||||
filterProps.setProperty( "@proxyPort@", Integer.toString( proxyPort ) );
|
||||
filterProps.setProperty( "@localhost@", InetAddress.getLocalHost().getCanonicalHostName() );
|
||||
filterProps.setProperty( "@localhost@", InetAddress.getLoopbackAddress().getCanonicalHostName() );
|
||||
verifier.filterFile( "settings-template.xml", "settings.xml", "UTF-8", filterProps );
|
||||
verifier.addCliOption( "-s" );
|
||||
verifier.addCliOption( "settings.xml" );
|
||||
|
|
Loading…
Reference in New Issue