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 2021/12/17 16:04:41 UTC

[maven-plugin-tools] branch MPLUGIN-386-excluse-false-positives created (now 869f87b)

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

cstamas pushed a change to branch MPLUGIN-386-excluse-false-positives
in repository https://gitbox.apache.org/repos/asf/maven-plugin-tools.git.


      at 869f87b  [MPLUGIN-386] Exclude maven-archiver and maven-jxr from warning

This branch includes the following new commits:

     new 869f87b  [MPLUGIN-386] Exclude maven-archiver and maven-jxr from warning

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-386] Exclude maven-archiver and maven-jxr from warning

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

cstamas pushed a commit to branch MPLUGIN-386-excluse-false-positives
in repository https://gitbox.apache.org/repos/asf/maven-plugin-tools.git

commit 869f87b15944dd3e33868122ff2cadb2dcd193b2
Author: Tamas Cservenak <ta...@cservenak.net>
AuthorDate: Fri Dec 17 17:03:41 2021 +0100

    [MPLUGIN-386] Exclude maven-archiver and maven-jxr from warning
    
    Those are not Maven Core components, they are merely in
    wrong groupId. Extended ITs to use maven-jxr as well.
---
 maven-plugin-plugin/src/it/mplugin-370-maven-deps-scope-bad/pom.xml | 6 ++++++
 .../src/it/mplugin-370-maven-deps-scope-good/pom.xml                | 6 ++++++
 .../java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java  | 3 +++
 3 files changed, 15 insertions(+)

diff --git a/maven-plugin-plugin/src/it/mplugin-370-maven-deps-scope-bad/pom.xml b/maven-plugin-plugin/src/it/mplugin-370-maven-deps-scope-bad/pom.xml
index 7514a0b..9a8d442 100644
--- a/maven-plugin-plugin/src/it/mplugin-370-maven-deps-scope-bad/pom.xml
+++ b/maven-plugin-plugin/src/it/mplugin-370-maven-deps-scope-bad/pom.xml
@@ -40,6 +40,12 @@ under the License.
   <dependencies>
     <dependency>
       <groupId>org.apache.maven</groupId>
+      <artifactId>maven-jxr</artifactId>
+      <version>3.1.1</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
       <version>@mavenVersion@</version>
       <scope>compile</scope>
diff --git a/maven-plugin-plugin/src/it/mplugin-370-maven-deps-scope-good/pom.xml b/maven-plugin-plugin/src/it/mplugin-370-maven-deps-scope-good/pom.xml
index a96154d..68fa7c5 100644
--- a/maven-plugin-plugin/src/it/mplugin-370-maven-deps-scope-good/pom.xml
+++ b/maven-plugin-plugin/src/it/mplugin-370-maven-deps-scope-good/pom.xml
@@ -40,6 +40,12 @@ under the License.
   <dependencies>
     <dependency>
       <groupId>org.apache.maven</groupId>
+      <artifactId>maven-jxr</artifactId>
+      <version>3.1.1</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
       <version>@mavenVersion@</version>
       <scope>provided</scope>
diff --git a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java b/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java
index da97cf6..72efb9a 100644
--- a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java
+++ b/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java
@@ -327,8 +327,11 @@ public abstract class AbstractGeneratorMojo
 
         for ( Artifact dependency : project.getArtifacts() )
         {
+            // maven-archiver and maven-jxr are really in wrong package
             if ( "org.apache.maven".equals( dependency.getGroupId() )
                 && dependency.getArtifactId().startsWith( "maven-" )
+                && !dependency.getArtifactId().equals( "maven-archiver" )
+                && !dependency.getArtifactId().equals( "maven-jxr" )
                 && !Artifact.SCOPE_PROVIDED.equals( dependency.getScope() ) )
             {
                 wrongScopedDependencies.add( dependency );