openrewrite / openrewrite/rewrite
Maven 3.9.0 Upgrade - Add plexus-utils dependency
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 3.7k
- Forks
- 570
- Avg merge
- 13h 12m
- Merged PRs (30d)
- 261
Description
Maven 2.x was auto-injecting an ancient version of plexus-utils dependency into the plugin classpath, and Maven 3.x continued doing this to preserve backward compatibility. Starting with Maven 3.9, it does not happen anymore. This change may lead to plugin breakage. The fix for affected plugin maintainers is to explicitly declare a dependency on plexus-utils. The workaround for affected plugin users is to add this dependency to plugin dependencies until issue is fixed by the affected plugin maintainer. See MNG-6965.
https://maven.apache.org/docs/3.9.0/release-notes.html
In my project, we solved this adding the dependency explicitly to the specific plugin that needed it
diff --git a/pom.xml b/pom.xml
index 1ec4a11df0..7ed8bb7eb1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -944,6 +944,13 @@
</goals>
</execution>
</executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>3.5.0</version>
+ </dependency>
+ </dependencies>
</plugin>
<plugin>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in pom.xml at the plugin block shown in the issue and review the Maven 3.9.0 release notes and MNG-6965 context. Confirm which plugin needs plexus-utils, add the explicit plugin dependency, and verify the Maven build no longer relies on the removed implicit dependency.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100