You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2021/05/05 18:25:21 UTC

[maven-gpg-plugin] branch next updated (ba9f7ea -> 0a2191e)

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

slachiewicz pushed a change to branch next
in repository https://gitbox.apache.org/repos/asf/maven-gpg-plugin.git.


 discard ba9f7ea  drop SubArtifact
 discard 7343144  mvn 3.1.1
     new 33ef92b  mvn 3.1.1
     new 0a2191e  Update deps

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (ba9f7ea)
            \
             N -- N -- N   refs/heads/next (0a2191e)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 2 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.


Summary of changes:
 pom.xml | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

[maven-gpg-plugin] 01/02: mvn 3.1.1

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

slachiewicz pushed a commit to branch next
in repository https://gitbox.apache.org/repos/asf/maven-gpg-plugin.git

commit 33ef92bb468a92ead553313cc85e2febe0c1d602
Author: Sylwester Lachiewicz <sl...@apache.org>
AuthorDate: Wed May 5 20:21:37 2021 +0200

    mvn 3.1.1
---
 pom.xml                                            | 52 +---------------------
 .../maven/plugins/gpg/SignAndDeployFileMojo.java   | 23 +++++-----
 2 files changed, 14 insertions(+), 61 deletions(-)

diff --git a/pom.xml b/pom.xml
index 6cf4e98..51a3cef 100644
--- a/pom.xml
+++ b/pom.xml
@@ -62,7 +62,7 @@ under the License.
   </distributionManagement>
 
   <properties>
-    <mavenVersion>3.0</mavenVersion>
+    <mavenVersion>3.1.1</mavenVersion>
     <javaVersion>7</javaVersion>
     <project.build.outputTimestamp>2021-05-05T16:39:01Z</project.build.outputTimestamp>
     <resource.delimiter>@</resource.delimiter>
@@ -110,20 +110,6 @@ under the License.
       <version>0.13.1</version>
     </dependency>
     <dependency>
-      <!-- org.eclipse.aether.util.artifact.SubArtifact -->
-      <groupId>org.apache.maven.resolver</groupId>
-      <artifactId>maven-resolver-util</artifactId>
-      <version>1.4.1</version>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <!-- org.sonatype.aether.util.artifact.SubArtifact -->
-      <groupId>org.sonatype.aether</groupId>
-      <artifactId>aether-util</artifactId>
-      <version>1.13.1</version>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-utils</artifactId>
       <version>3.3.0</version>
@@ -187,42 +173,6 @@ under the License.
         </plugin>
       </plugins>
     </pluginManagement>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-shade-plugin</artifactId>
-        <version>3.2.2</version>
-        <executions>
-          <execution>
-            <goals>
-              <goal>shade</goal>
-            </goals>
-            <configuration>
-              <artifactSet>
-                <includes>
-                  <include>org.apache.maven.resolver:maven-resolver-util</include>
-                  <include>org.sonatype.aether:aether-util</include>
-                </includes>
-              </artifactSet>
-              <filters>
-                <filter>
-                  <artifact>org.apache.maven.resolver:maven-resolver-util</artifact>
-                  <includes>
-                    <include>org/eclipse/aether/util/artifact/SubArtifact.class</include>
-                  </includes>
-                </filter>
-                <filter>
-                  <artifact>org.sonatype.aether:aether-util</artifact>
-                  <includes>
-                    <include>org/sonatype/aether/util/artifact/SubArtifact.class</include>
-                  </includes>
-                </filter>
-              </filters>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
   </build>
 
   <profiles>
diff --git a/src/main/java/org/apache/maven/plugins/gpg/SignAndDeployFileMojo.java b/src/main/java/org/apache/maven/plugins/gpg/SignAndDeployFileMojo.java
index b7bc314..991d2b8 100644
--- a/src/main/java/org/apache/maven/plugins/gpg/SignAndDeployFileMojo.java
+++ b/src/main/java/org/apache/maven/plugins/gpg/SignAndDeployFileMojo.java
@@ -36,14 +36,13 @@ import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy;
 import org.apache.maven.artifact.repository.MavenArtifactRepository;
 import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
 import org.apache.maven.execution.MavenSession;
-import org.apache.maven.model.InputLocation;
 import org.apache.maven.model.Model;
 import org.apache.maven.model.Parent;
 import org.apache.maven.model.building.DefaultModelBuildingRequest;
 import org.apache.maven.model.building.ModelBuildingRequest;
 import org.apache.maven.model.building.ModelProblem;
-import org.apache.maven.model.building.ModelProblem.Severity;
 import org.apache.maven.model.building.ModelProblemCollector;
+import org.apache.maven.model.building.ModelProblemCollectorRequest;
 import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
 import org.apache.maven.model.io.xpp3.MavenXpp3Writer;
 import org.apache.maven.model.validation.ModelValidator;
@@ -585,7 +584,7 @@ public class SignAndDeployFileMojo
                     
         List<String> result = new ArrayList<>();
 
-        SimpleModelProblemCollector problemCollector = new SimpleModelProblemCollector( result );
+        ModelProblemCollector problemCollector = new SimpleModelProblemCollector( result );
 
         modelValidator.validateEffectiveModel( model, request, problemCollector );
 
@@ -594,7 +593,7 @@ public class SignAndDeployFileMojo
             StringBuilder msg = new StringBuilder( "The artifact information is incomplete or not valid:\n" );
             for ( String e : result )
             {
-                msg.append( " - " + e + '\n' );
+                msg.append( " - " ).append( e ).append( '\n' );
             }
             throw new MojoFailureException( msg.toString() );
         }
@@ -648,9 +647,8 @@ public class SignAndDeployFileMojo
                 }
                 deployer.deploy( buildingRequest, deploymentRepository, Collections.singletonList( artifact ) );
 
-                for ( Object o : artifact.getMetadataList() )
+                for ( ArtifactMetadata metadata : artifact.getMetadataList() )
                 {
-                    ArtifactMetadata metadata = (ArtifactMetadata) o;
                     getLog().info( "Metadata[" + metadata.getKey() + "].filename = " + metadata.getRemoteFilename() );
                 }
                 exception = null;
@@ -692,13 +690,18 @@ public class SignAndDeployFileMojo
             this.result = result;
         }
 
-        public void add( Severity severity, String message, InputLocation location, Exception cause )
+        /**
+         * Adds the specified problem.
+         *
+         * @param req must not be null
+         */
+        @Override
+        public void add( ModelProblemCollectorRequest req )
         {
-            if ( !ModelProblem.Severity.WARNING.equals( severity ) )
+            if ( !req.getSeverity().equals( ModelProblem.Severity.WARNING ) )
             {
-                result.add( message );
+                result.add( req.getMessage() );
             }
         }
-
     }
 }

[maven-gpg-plugin] 02/02: Update deps

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

slachiewicz pushed a commit to branch next
in repository https://gitbox.apache.org/repos/asf/maven-gpg-plugin.git

commit 0a2191e763e00359304b010868f1a7222e83569a
Author: Sylwester Lachiewicz <sl...@apache.org>
AuthorDate: Wed May 5 20:24:48 2021 +0200

    Update deps
---
 pom.xml | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/pom.xml b/pom.xml
index 51a3cef..08b907f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -102,12 +102,38 @@ under the License.
     <dependency>
       <groupId>org.apache.maven.plugin-tools</groupId>
       <artifactId>maven-plugin-annotations</artifactId>
+      <version>3.6.1</version>
       <scope>provided</scope>
+      <exclusions>
+        <exclusion>
+          <artifactId>maven-artifact</artifactId>
+          <groupId>org.apache.maven</groupId>
+        </exclusion>
+      </exclusions>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.shared</groupId>
       <artifactId>maven-artifact-transfer</artifactId>
       <version>0.13.1</version>
+      <exclusions>
+        <exclusion>
+          <artifactId>maven-artifact</artifactId>
+          <groupId>org.apache.maven</groupId>
+        </exclusion>
+        <exclusion>
+          <artifactId>maven-common-artifact-filters</artifactId>
+          <groupId>org.apache.maven.shared</groupId>
+        </exclusion>
+        <exclusion>
+          <artifactId>maven-core</artifactId>
+          <groupId>org.apache.maven</groupId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.shared</groupId>
+      <artifactId>maven-common-artifact-filters</artifactId>
+      <version>3.2.0</version>
     </dependency>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>