Enforcer plugin prevents maven-deploy plugin from uploading artifacts
Description
Environment
Confluence content
Activity
Rod WiddowsonFebruary 25, 2022 at 4:27 PM
I believe this to be fixed.
Rod WiddowsonFebruary 25, 2022 at 4:25 PM
This is an IdP issue.
Rod WiddowsonFebruary 25, 2022 at 4:23 PM
Not sure if this is helpful,
Extra-ordinarily so. I was removing the enforcer stanza, but left the <pluginRepositories/>
one. Removing that fixes everything (because I have the important stuff cached).
From my reading about classpaths the solution is to move anything which might effect classpaths up into idp-parent
With that done everything works.
Mainline works because that change is in the parent pom.
Of course we probably want to move off a snapshot build of the enforcer asap (at which stage we can remove that <pluginRepositories/>
stanza.
I’ll push the changes.
Philip SmartFebruary 25, 2022 at 3:56 PMEdited
Not sure if this is helpful, but this is the commit diff I made to get deploy working with 4.1.5:
(This crossed with your discovery below)
Rod WiddowsonFebruary 25, 2022 at 3:55 PM
Appears to work on mainline (which is a relief).
Meanwhile spelunking the
-X
logs for a failure shows the second MOJO being created[DEBUG] Created new class realm plugin>org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1--2065829986
The initial one was created like this:
[DEBUG] Created new class realm plugin>org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1
Configuring the enforcer plugin prevents the maven deploy plugin from uploading artifacts. This happens silently, with no error or warning.
I doubt the fault of the enforcer. It seems the deploy plugin has a history of doing this e.g. https://issues.apache.org/jira/browse/MDEPLOY-201, and https://robinhowlett.com/blog/2019/05/15/solved-when-the-maven-deploy-plugin-silently-fails-to-deploy/.
We need to fix this before 4.2. This ticket will tack any findings.