当maven build
出现警告时:
[WARNING] Unrecognised tag: 'snapshotPolicy' (position: START_TAG seen ...</url>\n <snapshotPolicy>... @269:27) @ C:\Program Files\JetBrains\IntelliJ IDEA 2017.1.2\plugins\maven\lib\maven3\conf\settings.xml, line 269, column 27
配置文件部分是:
<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>
<snapshotPolicy>always</snapshotPolicy>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
有问题吗?
演示配置如下:
<profile>
<id>jdk-1.4</id>
<activation>
<jdk>1.4</jdk>
</activation>
<repositories>
<repository>
<id>jdk14</id>
<name>Repository for JDK 1.4 builds</name>
<url>http://www.myhost.com/maven/jdk14</url>
<layout>default</layout>
<snapshotPolicy>always</snapshotPolicy>
</repository>
</repositories>
</profile>
如何解决警告无法识别的标签:&#39; snapshotPolicy&#39; ,我无法找到maven办公室网站here
答案 0 :(得分:1)
<!--http://maven.apache.org/settings.html#Activation-->
<profiles>
<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>
</profiles>