This page contains advice to ensure smooth transition to maven 3 from maven 2 :
<project> [...]
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<id>enforce-plugin-versions</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requirePluginVersions>
<message>Best Practice is to always define plugin versions!</message>
<banLatest>true</banLatest>
<banRelease>true</banRelease>
<banSnapshots>true</banSnapshots>
<phases>clean,deploy,site</phases>
<additionalPlugins>
<additionalPlugin>org.apache.maven.plugins:maven-eclipse-plugin</additionalPlugin>
<additionalPlugin>org.apache.maven.plugins:maven-reactor-plugin</additionalPlugin>
</additionalPlugins>
</requirePluginVersions>
<unCheckedPluginsList>org.apache.maven.plugins:maven-enforcer-plugin,org.apache.maven.plugins:maven-idea-plugin</unCheckedPluginsList>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
[...]
|
</project>
If a project is referring to a parent pom, but that pom isn't reachable in the default parent path (../pom.xml). Then you should either :
For example, when one wants to refer to the artifactId of a POM, the variable ${project.artifactId} can be used.
There are a lot of other possibilities to do that, like ${pom.artifactId}, ${artifactId} and so on.
These ways are all deprecated and might be deleted in the future. With maven3, all these deprecated uses appear as warnings.