[java-mvn-enforcer] 03/03: JMVN-25 Artifact deriver gives wrong version information for garnished jar names

Rod Widdowson rdw at steadingsoftware.com
Mon Feb 7 15:17:43 UTC 2022


This is an automated email from the git hooks/post-receive script.

rdw pushed a commit to branch main
in repository java-mvn-enforcer.

View the commit online:
http://git.shibboleth.net/view/?p=java-mvn-enforcer.git;a=commit;h=0cc3d6b27a5094682e518f20856d3d34ff8a7edd

commit 0cc3d6b27a5094682e518f20856d3d34ff8a7edd
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Mon Feb 7 15:17:04 2022 +0000

    JMVN-25 Artifact deriver gives wrong version information for garnished jar names
    
    https://shibboleth.atlassian.net/browse/JMVN-25
    
    Better reporting of classifiers during signature check.
---
 src/main/java/net/shibboleth/mvn/enforcer/impl/BaseSigChecker.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/main/java/net/shibboleth/mvn/enforcer/impl/BaseSigChecker.java b/src/main/java/net/shibboleth/mvn/enforcer/impl/BaseSigChecker.java
index 3a6366b..dd97883 100644
--- a/src/main/java/net/shibboleth/mvn/enforcer/impl/BaseSigChecker.java
+++ b/src/main/java/net/shibboleth/mvn/enforcer/impl/BaseSigChecker.java
@@ -97,7 +97,12 @@ public class BaseSigChecker {
     protected boolean checkSignature(final InputStream jarFile, final PomArtifact artifact) {
         final String group = artifact.getGroupId();
         final String id = artifact.getArtifactId();
-        final String version = artifact.getVersion();
+        final String version;
+        if ("".equals(artifact.getClassifier())) {
+            version = artifact.getVersion();
+        } else {
+            version = artifact.getVersion() + " (" + artifact.getClassifier() + ")";
+        }
         
         if (projectContext.getParentPom().getGeneratedArtifacts().contains(artifact)) {
             report.format("%-30s: %-14s Generated by build.  Not checked\n", id, version);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list