在install 或package 时项目出现如下:
Plugin org.apache.maven.plugins:maven-war-plugin:2.2 or one of its dependencies could not be resolved
或Plugin org.apache.maven.plugins:maven-war-plugin:2.6 or one of its dependencies could not be resolved
或Plugin org.apache.maven.plugins:maven-war-plugin:2.6 or one of its dependencies could not be resolved
而pom文件在idea中并没有报错 。 我怀疑是依赖没有下载完全
我亲自尝试了 删除 C:\Users\xxx\.m2\repository 的默认库 发现无济于事
maven 中settings 之前是阿里云的 。
把settings 里的镜像都注释掉 用默认的 (显然不可行)
最后一共添加了4个镜像解决的问题 (不用担心太多镜像源的问题 )
<mirror>
<id>mirrorId</id>
<mirrorOf>repositoryId</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://my.repository.com/repo/path</url>
</mirror>
<mirror>
<id>nexus-aliyun</id>
<mirrorOf>central</mirrorOf>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
<mirror>
<id>mirrorId</id>
<mirrorOf>central</mirrorOf>
<url>http://maven.oschina.net/content/groups/public/ </url>
</mirror>
<mirror>
<id>jboss-public-repository-group</id>
<mirrorOf>central</mirrorOf>
<name>JBoss Public Repository Group</name>
<url>http://repository.jboss.org/nexus/content/groups/public</url>
</mirror>