No point sitting on this change any longer.

git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@1125604 13f79535-47bb-0310-9956-ffa450edef68
master
Stephen Connolly 2011-05-21 00:21:26 +00:00
parent 3a0081e45b
commit f88a58cecb
1 changed files with 10 additions and 0 deletions

View File

@ -125,6 +125,16 @@ public abstract class AbstractGeneratorMojo
return; return;
} }
if ( project.getArtifactId().toLowerCase().startsWith( "maven-" )
&& project.getArtifactId().toLowerCase().endsWith( "-plugin" )
&& !"org.apache.maven.plugin".equals( project.getGroupId() ) )
{
getLog().error( "\n\nArtifact Ids of the format maven-___-plugin are reserved for \n"
+ "plugins in the Group Id org.apache.maven.plugins\n"
+ "Please change your artifactId to the format ___-maven-plugin\n"
+ "In the future this error will break the build.\n\n" );
}
String defaultGoalPrefix = PluginDescriptor.getGoalPrefixFromArtifactId( project.getArtifactId() ); String defaultGoalPrefix = PluginDescriptor.getGoalPrefixFromArtifactId( project.getArtifactId() );
if ( goalPrefix == null ) if ( goalPrefix == null )
{ {