maven java.net.UnknownHostExcep
2015-08-25 本文已影响147人
北夜人
Caused by: java.net.UnknownHostException: 10.10.19.4:18081/nexus at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
场景:maven在ipv4上使用ipv6搜索host。
解决方案:
passing -Djava.net.preferIPv4Stack=true
when executing Maven since it is a Java program. For example:
mvn -e install -Djava.net.preferIPv4Stack=true
使用ipv4栈