Via env var MAVEN_OPTS ?

2012/7/11 Elliot Huntington <[email protected]>:
> $ mvn --version
> Apache Maven 3.0.4 (r1232337; 2012-01-17 01:44:56-0700)
> Maven home: c:\devtools\apache-maven-3.0.4
> Java version: 1.7.0_05, vendor: Oracle Corporation
> Java home: c:\devtools\Java\jdk1.7.0_05\jre
> Default locale: en_US, platform encoding: Cp1252
> OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
>
> When running maven logged into a VPN the following error occurs:
>
> $ mvn clean
> ...
> Downloading: http://
> .../nexus/content/groups/plugin-repo/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
> Jul 11, 2012 10:34:20 AM
> org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector
> tryConnect
> INFO: I/O exception (java.net.SocketException) caught when connecting to
> the target host: Permission denied: connect
> Jul 11, 2012 10:34:20 AM
> org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector
> tryConnect
> INFO: Retrying connect
> Jul 11, 2012 10:34:20 AM
> org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector
> tryConnect
> INFO: I/O exception (java.net.SocketException) caught when connecting to
> the target host: Permission denied: connect
> Jul 11, 2012 10:34:20 AM
> org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector
> tryConnect
> INFO: Retrying connect
> Jul 11, 2012 10:34:20 AM
> org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector
> tryConnect
> INFO: I/O exception (java.net.SocketException) caught when connecting to
> the target host: Permission denied: connect
> Jul 11, 2012 10:34:20 AM
> org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector
> tryConnect
> INFO: Retrying connect
> ...
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 1.706s
> [INFO] Finished at: Wed Jul 11 10:34:20 MDT 2012
> [INFO] Final Memory: 12M/152M
> [INFO]
> ------------------------------------------------------------------------
> ...
>
> However running the following command results in a successful download of
> the missing artifact, and a successful clean:
>
> $ mvn clean -Djava.net.preferIPv4Stack
>
> How would I set the preferIPv4Stack variable globally on my machine so I
> don't need to add this parameter to the command line every time I run a
> maven command?



-- 
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to