[Git][java-team/maven-repo-helper][master] mh_cleanpom: Keep the versions of the plugins in the build section

Emmanuel Bourg (@ebourg) gitlab at salsa.debian.org
Sun Nov 22 10:55:17 GMT 2026



Emmanuel Bourg pushed to branch master at Debian Java Maintainers / maven-repo-helper


Commits:
2981c2e7 by Emmanuel Bourg at 2026-11-22T11:53:11+01:00
mh_cleanpom: Keep the versions of the plugins in the build section

- - - - -


4 changed files:

- debian/changelog
- src/main/java/org/debian/maven/repo/POMCleaner.java
- src/test/resources/apache.cleaned
- src/test/resources/mojo-parent.cleaned


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+maven-repo-helper (1.14) unstable; urgency=medium
+
+  * mh_cleanpom: Keep the versions of the plugins in the build section
+
+ -- Emmanuel Bourg <ebourg at apache.org>  Sun, 22 Nov 2026 11:53:03 +0100
+
 maven-repo-helper (1.13) unstable; urgency=medium
 
   * Resolve the ${revision}, ${sha1} and ${changelist} properties used in the


=====================================
src/main/java/org/debian/maven/repo/POMCleaner.java
=====================================
@@ -113,14 +113,6 @@ public class POMCleaner extends POMTransformer {
         if (keepElements.contains(element)) {
             return false;
         }
-        if (path.size() > 2 && keepElements.contains(path.get(1))) {
-            if ("version".equals(element)) {
-                if ("plugin".equals(path.parent(1))) {
-                    return true;
-                }
-            }
-            
-        }
 //        if (WRITE_IGNORED_ELEMENTS.contains(element)) {
 //            System.out.println("Write ignored " + element + " " + printPath(path) + " for " + dependency);
 //        }


=====================================
src/test/resources/apache.cleaned
=====================================
@@ -51,18 +51,22 @@ under the License.
 				<plugin>
 					<groupId>org.apache.maven.plugins</groupId>
 					<artifactId>maven-antrun-plugin</artifactId>
+					<version>1.3</version>
 				</plugin>
 				<plugin>
 					<groupId>org.apache.maven.plugins</groupId>
 					<artifactId>maven-assembly-plugin</artifactId>
+					<version>2.2-beta-5</version>
 				</plugin>
 				<plugin>
 					<groupId>org.apache.maven.plugins</groupId>
 					<artifactId>maven-clean-plugin</artifactId>
+					<version>2.3</version>
 				</plugin>
 				<plugin>
 					<groupId>org.apache.maven.plugins</groupId>
 					<artifactId>maven-compiler-plugin</artifactId>
+					<version>2.0.2</version>
 					<configuration>
 						<source>1.4</source>
 						<target>1.4</target>
@@ -72,26 +76,32 @@ under the License.
 				<plugin>
 					<groupId>org.apache.maven.plugins</groupId>
 					<artifactId>maven-docck-plugin</artifactId>
+					<version>1.0</version>
 				</plugin>
 				<plugin>
 					<groupId>org.apache.maven.plugins</groupId>
 					<artifactId>maven-enforcer-plugin</artifactId>
+					<version>1.0-beta-1</version>
 				</plugin>
 				<plugin>
 					<groupId>org.apache.maven.plugins</groupId>
 					<artifactId>maven-gpg-plugin</artifactId>
+					<version>1.0-alpha-4</version>
 				</plugin>
 				<plugin>
 					<groupId>org.apache.maven.plugins</groupId>
 					<artifactId>maven-install-plugin</artifactId>
+					<version>2.3</version>
 				</plugin>
 				<plugin>
 					<groupId>org.apache.maven.plugins</groupId>
 					<artifactId>maven-invoker-plugin</artifactId>
+					<version>1.5</version>
 				</plugin>
 				<plugin>
 					<groupId>org.apache.maven.plugins</groupId>
 					<artifactId>maven-jar-plugin</artifactId>
+					<version>2.3</version>
 					<configuration>
 						<archive>
 							<manifest>
@@ -105,20 +115,24 @@ under the License.
 					<groupId>org.apache.maven.plugins</groupId>
 					<artifactId>maven-javadoc-plugin</artifactId>
 					<!-- NOTE: 2.6.x is generally unusuable due to MJAVADOC-275 -->
+					<version>2.5</version>
 				</plugin>
 				<plugin>
 					<groupId>org.apache.maven.plugins</groupId>
 					<artifactId>maven-plugin-plugin</artifactId>
+					<version>2.5.1</version>
 				</plugin>
 				<!-- START SNIPPET: release-plugin-configuration -->
 				<!-- END SNIPPET: release-plugin-configuration -->
 				<plugin>
 					<groupId>org.apache.maven.plugins</groupId>
 					<artifactId>maven-remote-resources-plugin</artifactId>
+					<version>1.1</version>
 				</plugin>
 				<plugin>
 					<groupId>org.apache.maven.plugins</groupId>
 					<artifactId>maven-resources-plugin</artifactId>
+					<version>2.4</version>
 					<configuration>
 						<encoding>${project.build.sourceEncoding}</encoding>
 					</configuration>
@@ -126,22 +140,27 @@ under the License.
 				<plugin>
 					<groupId>org.apache.maven.plugins</groupId>
 					<artifactId>maven-site-plugin</artifactId>
+					<version>2.0.1</version>
 				</plugin>
 				<plugin>
 					<groupId>org.apache.maven.plugins</groupId>
 					<artifactId>maven-surefire-plugin</artifactId>
+					<version>2.4.3</version>
 				</plugin>
 				<plugin>
 					<groupId>org.codehaus.mojo</groupId>
 					<artifactId>clirr-maven-plugin</artifactId>
+					<version>2.2.2</version>
 				</plugin>
 				<plugin>
 					<groupId>org.codehaus.plexus</groupId>
 					<artifactId>plexus-maven-plugin</artifactId>
+					<version>1.3.8</version>
 				</plugin>
 				<plugin>
 					<groupId>org.codehaus.modello</groupId>
 					<artifactId>modello-maven-plugin</artifactId>
+					<version>1.1</version>
 				</plugin>
 			</plugins>
 		</pluginManagement>
@@ -169,6 +188,7 @@ under the License.
 		<plugins>
 			<plugin>
 				<artifactId>maven-project-info-reports-plugin</artifactId>
+				<version>2.1.2</version>
 			</plugin>
 		</plugins>
 	</reporting>


=====================================
src/test/resources/mojo-parent.cleaned
=====================================
@@ -58,18 +58,22 @@
 				<plugin>
 					<groupId>org.apache.maven.plugins</groupId>
 					<artifactId>maven-antrun-plugin</artifactId>
+					<version>1.3</version>
 				</plugin>
 				<plugin>
 					<groupId>org.apache.maven.plugins</groupId>
 					<artifactId>maven-assembly-plugin</artifactId>
+					<version>2.2-beta-5</version>
 				</plugin>
 				<plugin>
 					<groupId>org.apache.maven.plugins</groupId>
 					<artifactId>maven-clean-plugin</artifactId>
+					<version>2.4.1</version>
 				</plugin>
 				<plugin>
 					<groupId>org.apache.maven.plugins</groupId>
 					<artifactId>maven-compiler-plugin</artifactId>
+					<version>2.3.2</version>
 					<configuration>
 						<encoding>${project.build.sourceEncoding}</encoding>
 						<source>${mojo.java.target}</source>
@@ -79,30 +83,37 @@
 				<plugin>
 					<groupId>org.apache.maven.plugins</groupId>
 					<artifactId>maven-deploy-plugin</artifactId>
+					<version>2.5</version>
 				</plugin>
 				<plugin>
 					<groupId>org.apache.maven.plugins</groupId>
 					<artifactId>maven-enforcer-plugin</artifactId>
+					<version>1.0-beta-1</version>
 				</plugin>
 				<plugin>
 					<groupId>org.apache.maven.plugins</groupId>
 					<artifactId>maven-install-plugin</artifactId>
+					<version>2.3.1</version>
 				</plugin>
 				<plugin>
 					<groupId>org.apache.maven.plugins</groupId>
 					<artifactId>maven-invoker-plugin</artifactId>
+					<version>1.5</version>
 				</plugin>
 				<plugin>
 					<groupId>org.apache.maven.plugins</groupId>
 					<artifactId>maven-jar-plugin</artifactId>
+					<version>2.3.1</version>
 				</plugin>
 				<plugin>
 					<groupId>org.apache.maven.plugins</groupId>
 					<artifactId>maven-javadoc-plugin</artifactId>
+					<version>2.7</version>
 				</plugin>
 				<plugin>
 					<groupId>org.apache.maven.plugins</groupId>
 					<artifactId>maven-plugin-plugin</artifactId>
+					<version>2.6</version>
 					<executions>
 						<execution>
 							<id>help-mojo</id>
@@ -115,10 +126,12 @@
 				<plugin>
 					<groupId>org.apache.maven.plugins</groupId>
 					<artifactId>maven-project-info-reports-plugin</artifactId>
+					<version>2.2</version>
 				</plugin>
 				<plugin>
 					<groupId>org.apache.maven.plugins</groupId>
 					<artifactId>maven-release-plugin</artifactId>
+					<version>2.0</version>
 					<configuration>
 						<tagBase>https://svn.codehaus.org/mojo/tags</tagBase>
 						<useReleaseProfile>false</useReleaseProfile>
@@ -128,10 +141,12 @@
 				<plugin>
 					<groupId>org.apache.maven.plugins</groupId>
 					<artifactId>maven-resources-plugin</artifactId>
+					<version>2.4.3</version>
 				</plugin>
 				<plugin>
 					<groupId>org.apache.maven.plugins</groupId>
 					<artifactId>maven-site-plugin</artifactId>
+					<version>2.1.1</version>
 					<!-- workaround for MSITE-459 -->
 					<dependencies>
 						<dependency>
@@ -150,10 +165,12 @@
 				<plugin>
 					<groupId>org.apache.maven.plugins</groupId>
 					<artifactId>maven-source-plugin</artifactId>
+					<version>2.1.2</version>
 				</plugin>
 				<plugin>
 					<groupId>org.apache.maven.plugins</groupId>
 					<artifactId>maven-surefire-plugin</artifactId>
+					<version>2.6</version>
 					<configuration>
 						<redirectTestOutputToFile>${surefire.redirectTestOutputToFile}</redirectTestOutputToFile>
 					</configuration>
@@ -161,15 +178,18 @@
 				<plugin>
 					<groupId>org.apache.maven.plugins</groupId>
 					<artifactId>maven-surefire-report-plugin</artifactId>
+					<version>2.6</version>
 				</plugin>
 				<!-- Codehaus plugins in alphabetical order -->
 				<plugin>
 					<groupId>org.codehaus.plexus</groupId>
 					<artifactId>plexus-maven-plugin</artifactId>
+					<version>1.3.8</version>
 				</plugin>
 				<plugin>
 					<groupId>org.codehaus.mojo</groupId>
 					<artifactId>taglist-maven-plugin</artifactId>
+					<version>2.4</version>
 				</plugin>
 			</plugins>
 		</pluginManagement>
@@ -224,6 +244,7 @@
 			<plugin>
 				<groupId>org.apache.maven.plugins</groupId>
 				<artifactId>maven-plugin-plugin</artifactId>
+				<version>2.6</version>
 				<configuration>
 					<requirements>
 						<!--
@@ -237,6 +258,7 @@
 			<plugin>
 				<groupId>org.apache.maven.plugins</groupId>
 				<artifactId>maven-project-info-reports-plugin</artifactId>
+				<version>2.2</version>
 				<reportSets>
 					<reportSet>
 						<reports>



View it on GitLab: https://salsa.debian.org/java-team/maven-repo-helper/-/commit/2981c2e73fd61bc083f0f20d4ec36cf7e7683003

-- 
View it on GitLab: https://salsa.debian.org/java-team/maven-repo-helper/-/commit/2981c2e73fd61bc083f0f20d4ec36cf7e7683003
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20261122/ca4ca6ad/attachment.htm>


More information about the pkg-java-commits mailing list