Maven项目打包local已有repo-jar时,不需要配置私服再从私服去下载;否则,会很慢,超时异常。
配置了私服,我真真浪费掉6h来打包关联的jar至lib,还失败了/(ㄒoㄒ)/~~。
Maven的pom.xml私服配置:
控制台报错:
PluginResolutionException( Failed-to-execute-goal-org-apache-maven-pluginsmaven-surefire-plugin2-19test) Plugin org.apache.maven.plugins:maven-resources-plugin:2.4.3 or one of its dependencies could not be resolved:
Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.4.3: Could not transfer
artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.4.3 from/to central (http://repo1./maven2): Error transferring file: repo1.: Unknown host repo1. -> [Help 1] To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.
For more information about the errors and possible solutions, please read the following articles:
"**[Help 1] http://cw
iki./confluence/display/MAVEN/PluginResolutionException"**
解决方案:
将私服注释掉重新maven install,打包就成功。
|