控制台:
Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.pluginsmaven-install-plugin:2.4: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.6 from/to nexus (http://localhost:8080/nexus-2.7.0-06/content/groups/public/): Connect to localhost:8080 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect -> [Help 1]
解决办法:
第一步:打开maven根目录里的conf,settings.xml,在对应位置添加下面的代码:
<mirror>
<id>Central</id>
<url>http://repo1.maven.org/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
第二步:删除本地仓库中org.apache.maven.plugins下的所有内容。
第三步:进行maven install:
可以看到控制台安装成功:
maven聚合工程必须在父工程Install以后再创建子工程,否则会创建失败。