DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
This page contains information about how to upgrade plugins to newer Maven versions, parent version or Java versions.
TODO ideas:
- create OpenRewrite recipe to automate changes like https://github.com/openrewrite/rewrite-apache/blob/main/src/main/java/org/openrewrite/codehaus/plexus/AbstractLogEnabledToSlf4j.java
Can help other plugin developers to migrate easly
Java updates
Java 25
- Update Invoker plugin to 3.9.1
- Upgrade spotless palantir format
<version.palantirJavaFormat>2.82.0</version.palantirJavaFormat>
Update site descriptor (site.xml)
To 2.0.0
<!-- from -->
<project xmlns="http://maven.apache.org/DECORATION/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 http://maven.apache.org/xsd/decoration-1.0.0.xsd"
name="JXR">
</project>
<!-- to -->
<site xmlns="http://maven.apache.org/SITE/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SITE/2.0.0 https://maven.apache.org/xsd/site-2.0.0.xsd" name="JXR">
</site
There might be other changes required, depending of the elements used by the site, example banners
<!-- from -->
<bannerRight>
<name>Doxia</name>
<src>https://maven.apache.org/doxia/images/doxia-logo.png</src>
<href>https://maven.apache.org/doxia/</href>
</bannerRight>
<!-- to -->
<bannerRight name="Doxia" href="https://maven.apache.org/doxia/">
<image src="https://maven.apache.org/doxia/images/doxia-logo.png" />
</bannerRight>
Doxia 1 to 2
https://github.com/apache/maven-changelog-plugin/pull/208/changes
Update JUnit / Plugin harness
- Junit 4
- Add
<version>4.13.2</version>dependency and<artifactId>maven-plugin-testing-harness</artifactId>3.4.0 (Example: DOAP-Plguin Update to 3.9.11 and JUnit 4)- Maybe with vintage engine for JUnt Jupiter Inject Deploy-Plugin to JUnit Jupiter
- Add
- Junit 5 https://github.com/apache/maven-resources-plugin/pull/447
Maven upgrades
General
- Make sure Maven version is available on CI (must be done by INFRA, so request for install is needed)
- Do not update Maven version in ".github/workflows/maven-verify.yml" and "pom.xml". Instead update per project as those must match.
to 3.9.11 (e.g. from 3.6.3) (Example: DOAP-Plguin Update to 3.9.11)
- Update
mavenVersion property to 3.9.11 (<mavenVersion>3.9.11</mavenVersion>) - Replace org.apache.maven.plugins.annotations.Component; with import javax.inject.Inject;
to 4.0.0-rc3
to 4.0.0-rc4
to 4.0.0-rc5
Parent upgrades
To 45
- Update parent version
- Fix checkstyle violations (also in tests classes)
- Update site descriptor (if not done yet) (see above)
- Set version of maven-plugin-annotations
- Maybe fix IT by adding languages to expected directories https://github.com/apache/maven-archetypes/pull/126
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>${version.maven-plugin-tools}</version>
<scope>provided</scope>
</dependency>
<dependency>
To 46
- Check explicit set version 3.9.1 of maven-invoker-plugin and remove it, as it is set in parent 46
- Replace fixed verisons of plugins in ITs to placeholders of parent (https://github.com/apache/maven-apache-parent/blob/master/pom.xml)
Example parent-placeholder of deploy-plugin (of antrun-plugin https://github.com/apache/maven-antrun-plugin/pull/353)
<artifactId>maven-deploy-plugin</artifactId> <version>@version.maven-deploy-plugin@</version>
JUnit / Test cases update
- Migrate AbstractMojoTestCase to TestMojo (Example https://github.com/apache/maven-war-plugin/pull/579#pullrequestreview-3505113259 )
- Use Maven Plugin Testing Harness:
