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



##########
File path: 
maven-plugin-annotations/src/main/java/org/apache/maven/plugins/annotations/ResolutionScope.java
##########
@@ -19,12 +19,13 @@
  * under the License.
  */
 
-import org.apache.maven.artifact.Artifact;
-
 /**
  * Dependencies resolution scopes available before
  * <a 
href="/ref/current/maven-core/apidocs/org/apache/maven/lifecycle/internal/MojoExecutor.html">mojo
 execution</a>.
  *
+ * Important note: The {@code id} values of this enum corresponds to constants 
of

Review comment:
       corresponds --> correspond

##########
File path: 
maven-plugin-annotations/src/main/java/org/apache/maven/plugins/annotations/ResolutionScope.java
##########
@@ -19,12 +19,13 @@
  * under the License.
  */
 
-import org.apache.maven.artifact.Artifact;
-
 /**
  * Dependencies resolution scopes available before
  * <a 
href="/ref/current/maven-core/apidocs/org/apache/maven/lifecycle/internal/MojoExecutor.html">mojo
 execution</a>.
  *
+ * Important note: The {@code id} values of this enum corresponds to constants 
of
+ * {@code org.apache.maven.artifact.Artifact} class and MUST BE KEPT IN SYNC 
(not that they changed recently).

Review comment:
       delete "(not that they changed recently)"

##########
File path: 
maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java
##########
@@ -294,6 +313,25 @@ static String getDefaultGoalPrefix( MavenProject project )
         return defaultGoalPrefix;
     }
 
+    /**
+     * Collects all dependencies having {@code org.apache.maven} group Id that 
are NOT in provided scope.

Review comment:
       Id --> ID

##########
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 having Group Id of\n"
+                    + "org.apache.maven have set '<scope>provided</scope>' as 
well.\n"
+                    + "In the future this error will break the build.\n\n"
+                    + "Following dependencies are in wrong scope:\n"

Review comment:
       The following

##########
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 having Group Id of\n"

Review comment:
       "having Group Id of" --> whose group ID is




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to