This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch fix-12303
in repository https://gitbox.apache.org/repos/asf/maven.git

commit b4227e63fb09376cd635e6d1451a381829252c16
Author: Guillaume Nodet <[email protected]>
AuthorDate: Thu Jun 18 17:20:13 2026 +0000

    [#12303] Add RED IT for CI-friendly ${revision} not interpolated with 
maven-remote-resources-plugin
---
 ...12303CIFriendlyRevisionRemoteResourcesTest.java |  51 +++++++++++++++++++++
 .../child-b/pom.xml                                |  21 +++++++++
 .../child/pom.xml                                  |  13 ++++++
 .../pom.xml                                        |  41 +++++++++++++++++
 .../resource-bundle/1.0/resource-bundle-1.0.jar    | Bin 0 -> 833 bytes
 .../resource-bundle/1.0/resource-bundle-1.0.pom    |   9 ++++
 .../resource-bundle/pom.xml                        |   9 ++++
 .../resources/META-INF/maven/remote-resources.xml  |   6 +++
 .../resource-bundle/src/main/resources/NOTICE.txt  |   1 +
 .../settings-template.xml                          |  33 +++++++++++++
 10 files changed, 184 insertions(+)

diff --git 
a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITgh12303CIFriendlyRevisionRemoteResourcesTest.java
 
b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITgh12303CIFriendlyRevisionRemoteResourcesTest.java
new file mode 100644
index 0000000000..b1ab171af6
--- /dev/null
+++ 
b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITgh12303CIFriendlyRevisionRemoteResourcesTest.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.it;
+
+import java.io.File;
+
+import org.junit.jupiter.api.Test;
+
+/**
+ * Verify that CI-friendly {@code ${revision}} versions are properly 
interpolated
+ * when the {@code maven-remote-resources-plugin} resolves the project's own 
artifact
+ * through the legacy resolver path.
+ *
+ * @see <a href="https://github.com/apache/maven/issues/12303";>gh-12303</a>
+ */
+class MavenITgh12303CIFriendlyRevisionRemoteResourcesTest extends 
AbstractMavenIntegrationTestCase {
+
+    MavenITgh12303CIFriendlyRevisionRemoteResourcesTest() {
+        super("[4.0.0-rc-3,)");
+    }
+
+    @Test
+    void testCiFriendlyRevisionWithRemoteResources() throws Exception {
+        File testDir = 
extractResources("/gh-12303-ci-friendly-revision-remote-resources");
+
+        Verifier verifier = newVerifier(testDir.getAbsolutePath());
+        verifier.deleteArtifacts("org.apache.maven.its.gh12303");
+        verifier.filterFile("settings-template.xml", "settings.xml");
+        verifier.addCliArgument("--settings");
+        verifier.addCliArgument("settings.xml");
+        verifier.addCliArgument("process-resources");
+        verifier.execute();
+        verifier.verifyErrorFreeLog();
+    }
+}
diff --git 
a/its/core-it-suite/src/test/resources/gh-12303-ci-friendly-revision-remote-resources/child-b/pom.xml
 
b/its/core-it-suite/src/test/resources/gh-12303-ci-friendly-revision-remote-resources/child-b/pom.xml
new file mode 100644
index 0000000000..bcf2f609a2
--- /dev/null
+++ 
b/its/core-it-suite/src/test/resources/gh-12303-ci-friendly-revision-remote-resources/child-b/pom.xml
@@ -0,0 +1,21 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0";
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.maven.its.gh12303</groupId>
+    <artifactId>parent</artifactId>
+    <version>${revision}</version>
+  </parent>
+
+  <artifactId>child-b</artifactId>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven.its.gh12303</groupId>
+      <artifactId>child</artifactId>
+      <version>${revision}</version>
+    </dependency>
+  </dependencies>
+</project>
diff --git 
a/its/core-it-suite/src/test/resources/gh-12303-ci-friendly-revision-remote-resources/child/pom.xml
 
b/its/core-it-suite/src/test/resources/gh-12303-ci-friendly-revision-remote-resources/child/pom.xml
new file mode 100644
index 0000000000..892c520eb6
--- /dev/null
+++ 
b/its/core-it-suite/src/test/resources/gh-12303-ci-friendly-revision-remote-resources/child/pom.xml
@@ -0,0 +1,13 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0";
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.maven.its.gh12303</groupId>
+    <artifactId>parent</artifactId>
+    <version>${revision}</version>
+  </parent>
+
+  <artifactId>child</artifactId>
+</project>
diff --git 
a/its/core-it-suite/src/test/resources/gh-12303-ci-friendly-revision-remote-resources/pom.xml
 
b/its/core-it-suite/src/test/resources/gh-12303-ci-friendly-revision-remote-resources/pom.xml
new file mode 100644
index 0000000000..8ac1c1b6fa
--- /dev/null
+++ 
b/its/core-it-suite/src/test/resources/gh-12303-ci-friendly-revision-remote-resources/pom.xml
@@ -0,0 +1,41 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0";
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.gh12303</groupId>
+  <artifactId>parent</artifactId>
+  <version>${revision}</version>
+  <packaging>pom</packaging>
+
+  <modules>
+    <module>child</module>
+    <module>child-b</module>
+  </modules>
+
+  <properties>
+    <revision>1.0.0-SNAPSHOT</revision>
+  </properties>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-remote-resources-plugin</artifactId>
+        <version>1.7.0</version>
+        <executions>
+          <execution>
+            <goals>
+              <goal>process</goal>
+            </goals>
+            <configuration>
+              <resourceBundles>
+                
<resourceBundle>org.apache.maven.its.gh12303:resource-bundle:1.0</resourceBundle>
+              </resourceBundles>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git 
a/its/core-it-suite/src/test/resources/gh-12303-ci-friendly-revision-remote-resources/repo/org/apache/maven/its/gh12303/resource-bundle/1.0/resource-bundle-1.0.jar
 
b/its/core-it-suite/src/test/resources/gh-12303-ci-friendly-revision-remote-resources/repo/org/apache/maven/its/gh12303/resource-bundle/1.0/resource-bundle-1.0.jar
new file mode 100644
index 0000000000..6f1b5c0898
Binary files /dev/null and 
b/its/core-it-suite/src/test/resources/gh-12303-ci-friendly-revision-remote-resources/repo/org/apache/maven/its/gh12303/resource-bundle/1.0/resource-bundle-1.0.jar
 differ
diff --git 
a/its/core-it-suite/src/test/resources/gh-12303-ci-friendly-revision-remote-resources/repo/org/apache/maven/its/gh12303/resource-bundle/1.0/resource-bundle-1.0.pom
 
b/its/core-it-suite/src/test/resources/gh-12303-ci-friendly-revision-remote-resources/repo/org/apache/maven/its/gh12303/resource-bundle/1.0/resource-bundle-1.0.pom
new file mode 100644
index 0000000000..c3199b2598
--- /dev/null
+++ 
b/its/core-it-suite/src/test/resources/gh-12303-ci-friendly-revision-remote-resources/repo/org/apache/maven/its/gh12303/resource-bundle/1.0/resource-bundle-1.0.pom
@@ -0,0 +1,9 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0";
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.gh12303</groupId>
+  <artifactId>resource-bundle</artifactId>
+  <version>1.0</version>
+</project>
diff --git 
a/its/core-it-suite/src/test/resources/gh-12303-ci-friendly-revision-remote-resources/resource-bundle/pom.xml
 
b/its/core-it-suite/src/test/resources/gh-12303-ci-friendly-revision-remote-resources/resource-bundle/pom.xml
new file mode 100644
index 0000000000..c3199b2598
--- /dev/null
+++ 
b/its/core-it-suite/src/test/resources/gh-12303-ci-friendly-revision-remote-resources/resource-bundle/pom.xml
@@ -0,0 +1,9 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0";
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.gh12303</groupId>
+  <artifactId>resource-bundle</artifactId>
+  <version>1.0</version>
+</project>
diff --git 
a/its/core-it-suite/src/test/resources/gh-12303-ci-friendly-revision-remote-resources/resource-bundle/src/main/resources/META-INF/maven/remote-resources.xml
 
b/its/core-it-suite/src/test/resources/gh-12303-ci-friendly-revision-remote-resources/resource-bundle/src/main/resources/META-INF/maven/remote-resources.xml
new file mode 100644
index 0000000000..45c118bebd
--- /dev/null
+++ 
b/its/core-it-suite/src/test/resources/gh-12303-ci-friendly-revision-remote-resources/resource-bundle/src/main/resources/META-INF/maven/remote-resources.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<remoteResourcesBundle>
+  <remoteResources>
+    <remoteResource>NOTICE.txt</remoteResource>
+  </remoteResources>
+</remoteResourcesBundle>
diff --git 
a/its/core-it-suite/src/test/resources/gh-12303-ci-friendly-revision-remote-resources/resource-bundle/src/main/resources/NOTICE.txt
 
b/its/core-it-suite/src/test/resources/gh-12303-ci-friendly-revision-remote-resources/resource-bundle/src/main/resources/NOTICE.txt
new file mode 100644
index 0000000000..a2e56e1ac4
--- /dev/null
+++ 
b/its/core-it-suite/src/test/resources/gh-12303-ci-friendly-revision-remote-resources/resource-bundle/src/main/resources/NOTICE.txt
@@ -0,0 +1 @@
+Test notice file for IT gh-12303.
diff --git 
a/its/core-it-suite/src/test/resources/gh-12303-ci-friendly-revision-remote-resources/settings-template.xml
 
b/its/core-it-suite/src/test/resources/gh-12303-ci-friendly-revision-remote-resources/settings-template.xml
new file mode 100644
index 0000000000..7e5ab0f680
--- /dev/null
+++ 
b/its/core-it-suite/src/test/resources/gh-12303-ci-friendly-revision-remote-resources/settings-template.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<settings>
+  <profiles>
+    <profile>
+      <id>it-repo</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
+      <repositories>
+        <repository>
+          <id>local-repo</id>
+          <url>@baseurl@/repo</url>
+          <releases>
+            <enabled>true</enabled>
+            <checksumPolicy>ignore</checksumPolicy>
+          </releases>
+          <snapshots>
+            <enabled>false</enabled>
+          </snapshots>
+        </repository>
+      </repositories>
+      <pluginRepositories>
+        <pluginRepository>
+          <id>central-plugins</id>
+          <url>https://repo.maven.apache.org/maven2</url>
+          <releases>
+            <enabled>true</enabled>
+          </releases>
+        </pluginRepository>
+      </pluginRepositories>
+    </profile>
+  </profiles>
+</settings>

Reply via email to