Skip to content

Commit 17aabcc

Browse files
committed
[MPLUGIN-452] Maven scope and module name logs at wrong level (#190)
Should be logged at WARN level, and not ERROR level. When Mojo logs ERROR, it is expected that it fails the build. And this also confuses the Verifier. --- https://issues.apache.org/jira/browse/MPLUGIN-452
1 parent 0f2c0d5 commit 17aabcc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/DescriptorGeneratorMojo.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ public void generate()
253253
&& project.getArtifactId().toLowerCase().endsWith( "-plugin" )
254254
&& !"org.apache.maven.plugins".equals( project.getGroupId() ) )
255255
{
256-
getLog().error( LS + LS + "Artifact Ids of the format maven-___-plugin are reserved for" + LS
256+
getLog().warn( LS + LS + "Artifact Ids of the format maven-___-plugin are reserved for" + LS
257257
+ "plugins in the Group Id org.apache.maven.plugins" + LS
258258
+ "Please change your artifactId to the format ___-maven-plugin" + LS
259259
+ "In the future this error will break the build." + LS + LS );
@@ -270,19 +270,19 @@ public void generate()
270270
Set<Artifact> wrongScopedArtifacts = dependenciesNotInProvidedScope();
271271
if ( !wrongScopedArtifacts.isEmpty() )
272272
{
273-
StringBuilder errorMessage = new StringBuilder(
273+
StringBuilder message = new StringBuilder(
274274
LS + LS + "Some dependencies of Maven Plugins are expected to be in provided scope." + LS
275275
+ "Please make sure that dependencies listed below declared in POM" + LS
276276
+ "have set '<scope>provided</scope>' as well." + LS + LS
277277
+ "The following dependencies are in wrong scope:" + LS
278278
);
279279
for ( Artifact artifact : wrongScopedArtifacts )
280280
{
281-
errorMessage.append( " * " ).append( artifact ).append( LS );
281+
message.append( " * " ).append( artifact ).append( LS );
282282
}
283-
errorMessage.append( LS ).append( LS );
283+
message.append( LS ).append( LS );
284284

285-
getLog().error( errorMessage.toString() );
285+
getLog().warn( message.toString() );
286286
}
287287
}
288288

0 commit comments

Comments
 (0)