[java-mvn-enforcer] branch main updated: JMVN-13 Pom Parser cannot read the mvn-enforcer-data pom

Rod Widdowson rdw at steadingsoftware.com
Fri Dec 31 11:08:05 UTC 2021


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=75bf1b144194574b55127c9219ec62264795ca89

The following commit(s) were added to refs/heads/main by this push:
     new 75bf1b1  JMVN-13 Pom Parser cannot read the mvn-enforcer-data pom
75bf1b1 is described below

commit 75bf1b144194574b55127c9219ec62264795ca89
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Fri Dec 31 10:54:55 2021 +0000

    JMVN-13 Pom Parser cannot read the mvn-enforcer-data pom
    
    https://shibboleth.atlassian.net/browse/JMVN-13
    
    Make the enforcer collect the pom for the enforcer-data as well as
    the jar.  That way the m2 checking will find it.
---
 src/main/java/net/shibboleth/mvn/enforcer/impl/JarEnforcer.java | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/main/java/net/shibboleth/mvn/enforcer/impl/JarEnforcer.java b/src/main/java/net/shibboleth/mvn/enforcer/impl/JarEnforcer.java
index b6d2bf0..0c071d3 100644
--- a/src/main/java/net/shibboleth/mvn/enforcer/impl/JarEnforcer.java
+++ b/src/main/java/net/shibboleth/mvn/enforcer/impl/JarEnforcer.java
@@ -205,6 +205,11 @@ public class JarEnforcer implements EnforcerRule, MavenLoader{
      */
     private ClassLoader getGPGDataClassLoader() throws Exception {
 
+        final File pom = downloadArtifact(dataGroupId, dataArtifactId, dataVersion, "pom");
+        if (pom == null || !pom.exists()) {
+            log.error("Could not locate data artifact {}:{}:{}", dataGroupId, dataArtifactId, dataVersion);
+            throw new FileNotFoundException("Could not locate data artifact");
+        }
         final File jar = downloadArtifact(dataGroupId, dataArtifactId, dataVersion, "jar");
         if (jar == null || !jar.exists()) {
             log.error("Could not locate data artifact {}:{}:{}", dataGroupId, dataArtifactId, dataVersion);

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


More information about the commits mailing list