'how to solve the warning Unrecognised tag: 'snapshotPolicy'?
When maven build
there is a warning:
[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
The config file section is:
<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>
Is there a problem?
the demo config is as follow:
<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>
how to solve the warning Unrecognised tag: 'snapshotPolicy' , I can't found the maven office website here
Solution 1:[1]
See how the offending tag goes within releases
and snapshots
tags. Placed there, it works.
<!--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>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Alfabravo |