You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2021/10/08 09:15:51 UTC

[GitHub] [maven-plugin-tools] rfscholte commented on a change in pull request #38: [MPLUGIN-370] Check that Maven dependencies are provided scope

rfscholte commented on a change in pull request #38:
URL: https://github.com/apache/maven-plugin-tools/pull/38#discussion_r724843735



##########
File path: maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java
##########
@@ -204,6 +204,25 @@ public void execute()
                                 + "In the future this error will break the build.\n\n" );
         }
 
+        Set<Artifact> wrongScopedArtifacts = mavenDependenciesNotInProvidedScope();
+        if ( !wrongScopedArtifacts.isEmpty() )
+        {
+            StringBuilder errorMessage = new StringBuilder(
+                "\n\nMaven dependencies of Maven Plugins should be in provided scope.\n"
+                    + "Please make sure that all your dependencies declared in POM whose group ID is\n"
+                    + "org.apache.maven have set '<scope>provided</scope>' as well.\n"
+                    + "In the future this error will break the build.\n\n"
+                    + "The following dependencies are in wrong scope:\n"
+            );
+            for ( Artifact artifact : wrongScopedArtifacts )
+            {
+                errorMessage.append( " * " ).append( artifact ).append( "\n" );

Review comment:
       As this is written to the console, system specific line separators should be used.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org