[java-mvn-enforcer] branch main updated: JMVN-26 Distribution signature checked cannot handle versions with dashes

Rod Widdowson rdw at steadingsoftware.com
Sat Mar 5 15:16:30 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=65b21c964f4be074be59d63334c3ee208cfc3048

The following commit(s) were added to refs/heads/main by this push:
     new 65b21c9  JMVN-26 Distribution signature checked cannot handle versions with dashes
65b21c9 is described below

commit 65b21c964f4be074be59d63334c3ee208cfc3048
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Sat Mar 5 15:15:59 2022 +0000

    JMVN-26 Distribution signature checked cannot handle versions with dashes
    
    https://shibboleth.atlassian.net/browse/JMVN-26
---
 .../java/net/shibboleth/mvn/enforcer/impl/ProjectPomContext.java  | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/main/java/net/shibboleth/mvn/enforcer/impl/ProjectPomContext.java b/src/main/java/net/shibboleth/mvn/enforcer/impl/ProjectPomContext.java
index 48ec056..442e08c 100644
--- a/src/main/java/net/shibboleth/mvn/enforcer/impl/ProjectPomContext.java
+++ b/src/main/java/net/shibboleth/mvn/enforcer/impl/ProjectPomContext.java
@@ -303,8 +303,14 @@ public final class ProjectPomContext implements AutoCloseable {
                 break;
             }
         }
-        final String base = name.substring(0, last);
+        String base = name.substring(0, last);
+        while (base.contains("-") && !artifactToGroup.containsKey(base)) {
+            log.debug("Splitting {}: {}:{} didn't work", inName, name.substring(last+1));
+            last = base.lastIndexOf("-");
+            base = name.substring(0, last);
+        }
         final String versionExtension = name.substring(last+1);
+        log.error("Splitting {}: found {}:{}", inName, base, versionExtension);
         return new Pair<>(base, versionExtension);
     }
 

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


More information about the commits mailing list