问题:[WARNING] Unrecognised tag: 'snapshotPolicy' (position: START_TAG seen ...</layout>
<snapshotPolicy>... @286:27) @ D:maven-3.6.1in..confsettings.xml, line 286, column 27
出错位置:
<profile> <id>jdk-1.7</id> <activation> <jdk>1.7</jdk> </activation> <repositories> <repository> <id>jdk17</id> <name>Repository for JDK 1.7 builds</name> <url>http://www.myhost.com/maven/jdk17</url> <layout>default</layout> <snapshotPolicy>always</snapshotPolicy> </repository> </repositories> </profile>
解决方法,将该段替换为:
<profile> <id>nexus</id> <activation> <activeByDefault>true</activeByDefault> </activation> <repositories> <repository> <id>nexus</id> <name>Nexus</name> <url>http://172.16.1.79:8082/repository/maven-public/</url> <releases> <enabled>true</enabled> <updatePolicy>always</updatePolicy> </releases> <snapshots> <enabled>true</enabled> <updatePolicy>daily</updatePolicy> </snapshots> </repository> </repositories> </profile>
不要问我为什么,我也不知道。。。