You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by cs...@apache.org on 2023/01/12 21:08:27 UTC

[maven-plugin-tools] branch maven-plugin-tools-3.7.x created (now 17aabccc)

This is an automated email from the ASF dual-hosted git repository.

cstamas pushed a change to branch maven-plugin-tools-3.7.x
in repository https://gitbox.apache.org/repos/asf/maven-plugin-tools.git


      at 17aabccc [MPLUGIN-452] Maven scope and module name logs at wrong level (#190)

This branch includes the following new commits:

     new 17aabccc [MPLUGIN-452] Maven scope and module name logs at wrong level (#190)

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[maven-plugin-tools] 01/01: [MPLUGIN-452] Maven scope and module name logs at wrong level (#190)

Posted by cs...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

cstamas pushed a commit to branch maven-plugin-tools-3.7.x
in repository https://gitbox.apache.org/repos/asf/maven-plugin-tools.git

commit 17aabccca1590f01925db9f63f04a67bd0a4c2f1
Author: Tamas Cservenak <ta...@cservenak.net>
AuthorDate: Thu Jan 12 22:08:08 2023 +0100

    [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
---
 .../apache/maven/plugin/plugin/DescriptorGeneratorMojo.java    | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/DescriptorGeneratorMojo.java b/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/DescriptorGeneratorMojo.java
index 0954a727..8b3fb142 100644
--- a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/DescriptorGeneratorMojo.java
+++ b/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/DescriptorGeneratorMojo.java
@@ -253,7 +253,7 @@ public class DescriptorGeneratorMojo
                         && project.getArtifactId().toLowerCase().endsWith( "-plugin" )
                         && !"org.apache.maven.plugins".equals( project.getGroupId() ) )
         {
-            getLog().error( LS + LS + "Artifact Ids of the format maven-___-plugin are reserved for" + LS
+            getLog().warn( LS + LS + "Artifact Ids of the format maven-___-plugin are reserved for" + LS
                                 + "plugins in the Group Id org.apache.maven.plugins" + LS
                                 + "Please change your artifactId to the format ___-maven-plugin" + LS
                                 + "In the future this error will break the build." + LS + LS );
@@ -270,7 +270,7 @@ public class DescriptorGeneratorMojo
             Set<Artifact> wrongScopedArtifacts = dependenciesNotInProvidedScope();
             if ( !wrongScopedArtifacts.isEmpty() )
             {
-                StringBuilder errorMessage = new StringBuilder(
+                StringBuilder message = new StringBuilder(
                     LS + LS + "Some dependencies of Maven Plugins are expected to be in provided scope." + LS
                         + "Please make sure that dependencies listed below declared in POM" + LS
                         + "have set '<scope>provided</scope>' as well." + LS + LS
@@ -278,11 +278,11 @@ public class DescriptorGeneratorMojo
                 );
                 for ( Artifact artifact : wrongScopedArtifacts )
                 {
-                    errorMessage.append( " * " ).append( artifact ).append( LS );
+                    message.append( " * " ).append( artifact ).append( LS );
                 }
-                errorMessage.append( LS ).append( LS );
+                message.append( LS ).append( LS );
 
-                getLog().error( errorMessage.toString() );
+                getLog().warn( message.toString() );
             }
         }