[
https://issues.apache.org/jira/browse/MENFORCER-410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17466486#comment-17466486
]
Rod Widdowson edited comment on MENFORCER-410 at 12/29/21, 3:09 PM:
--------------------------------------------------------------------
* Pom configuration (also available
[here|https://git.shibboleth.net/view/?p=java-identity-provider.git;a=blob;f=idp-distribution/pom.xml;h=af72441c88959f627cea2354b2c3c5f14e729f56;hb=HEAD#l253]
{code:java}
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<dependencies>
<dependency>
<groupId>net.shibboleth.maven.enforcer.rules</groupId>
<artifactId>maven-dist-enforcer</artifactId>
<version>3.0.0</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>idp-enforce</id>
<phase>verify</phase>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<jarEnforcer
implementation="net.shibboleth.mvn.enforcer.impl.JarEnforcer">
<dataGroupId>net.shibboleth.maven.enforcer.rules</dataGroupId>
<dataArtifactId>maven-dist-enforcer-data</dataArtifactId>
<dataVersion>1.0.0-SNAPSHOT</dataVersion>
<dataKeyRing>${basedir}/src/main/enforcer/shibbolethKeys.gpg</dataKeyRing>
<parentPomDir>${basedir}/../idp-parent</parentPomDir>
<zipFiles>${project.build.directory}/${idp.finalName}.zip</zipFiles>
<tgzFiles>${project.build.directory}/${idp.finalName}.tar.gz</tgzFiles>
<checkSignatures>true</checkSignatures>
<checkDependencies>true</checkDependencies>
<listJarSources>false</listJarSources>
<checkM2>${net.shibboleth.maven.enforcer.rules.checkM2}</checkM2>
</jarEnforcer>
</rules>
</configuration>
</execution>
</executions>
</plugin>
{code}
* Failure case (JDK11.0.13, Maven 3.8.4, not in local repo) Attached as
SNAPSHOT.TXT [^SNAPSHOT.TXT]
* Working case (JDK11.0.13, Maven 3.8.4, not in local repo) attached as
RELEASE.TXT [^RELEASE.TXT]
The only difference between the two cases was the version (3.0.0 vs
3.1.0-SNAPSHOT - noting that this latter is available in our nexus (starting
[here|https://build.shibboleth.net/nexus/#view-repositories;snapshots~browsestorage]
Many thanks
was (Author: rodwiddowson):
* Pom configuration (also available
[here|https://git.shibboleth.net/view/?p=java-identity-provider.git;a=blob;f=idp-distribution/pom.xml;h=af72441c88959f627cea2354b2c3c5f14e729f56;hb=HEAD#l253]
{code:java}
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<dependencies>
<dependency>
<groupId>net.shibboleth.maven.enforcer.rules</groupId>
<artifactId>maven-dist-enforcer</artifactId>
<version>3.0.0</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>idp-enforce</id>
<phase>verify</phase>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<jarEnforcer
implementation="net.shibboleth.mvn.enforcer.impl.JarEnforcer">
<dataGroupId>net.shibboleth.maven.enforcer.rules</dataGroupId>
<dataArtifactId>maven-dist-enforcer-data</dataArtifactId>
<dataVersion>1.0.0-SNAPSHOT</dataVersion>
<dataKeyRing>${basedir}/src/main/enforcer/shibbolethKeys.gpg</dataKeyRing>
<parentPomDir>${basedir}/../idp-parent</parentPomDir>
<zipFiles>${project.build.directory}/${idp.finalName}.zip</zipFiles>
<tgzFiles>${project.build.directory}/${idp.finalName}.tar.gz</tgzFiles>
<checkSignatures>true</checkSignatures>
<checkDependencies>true</checkDependencies>
<listJarSources>false</listJarSources>
<checkM2>${net.shibboleth.maven.enforcer.rules.checkM2}</checkM2>
</jarEnforcer>
</rules>
</configuration>
</execution>
</executions>
</plugin>
{code}
* Failure case (JDK11.0.13, Maven 3.8.4, not in local repo) Attached as
SNAPSHOT.TXT [^SNAPSHOT.TXT] [^RELEASE.TXT]
* Working case (JDK11.0.13, Maven 3.8.4, not in local repo) attached as
RELEASE.TXT [^RELEASE.TXT]
The only difference between the two cases was the version (3.0.0 vs
3.1.0-SNAPSHOT - noting that this latter is available in our nexus (starting
[here|https://build.shibboleth.net/nexus/#view-repositories;snapshots~browsestorage]
Many thanks
> SNAPSHOT versions of Custom rules appear to only come from
> repository.apache.org
> --------------------------------------------------------------------------------
>
> Key: MENFORCER-410
> URL: https://issues.apache.org/jira/browse/MENFORCER-410
> Project: Maven Enforcer Plugin
> Issue Type: Bug
> Components: Plugin
> Affects Versions: 3.0.0-M3
> Environment: Apache Maven 3.6.3
> (cecedd343002696d0abb50b32b541b8a6ba2883f)
> Maven home: C:\Program Files (x86)\apache-maven-3.6.1\bin\..
> Java version: 11.0.3, vendor: Amazon.com Inc., runtime: C:\Program
> Files\Java\jdk11.0.3
> Default locale: en_GB, platform encoding: Cp1252
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> Reporter: Rod Widdowson
> Priority: Major
> Fix For: waiting-for-feedback
>
> Attachments: RELEASE.TXT, SNAPSHOT.TXT
>
>
> We use a customer build enforcer in our build & CI process.
> It is configured in the canonical fashion
> {code:java}
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-enforcer-plugin</artifactId>
> <dependencies>
> <dependency>
> <groupId>net.shibboleth.maven.enforcer.rules</groupId>
> <artifactId>maven-dist-enforcer</artifactId>
> <version>3.0.0</version>
> </dependency>
> </dependencies>
> <executions>
> ..... {code}
> This collects the plugin from our repositories as defined with
> {{<repositories/>}}
> I recently wanted to start running from a SNAPSHOT version. If I build this
> locally everything works fine. But if I delete it from my local repository
> and start again it appears (from watching the denug outto want to only load
> the enforcer plugin from {{repository.apache.org}}
> This feels like a bug but I may have missed some configuration somewhere.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)