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

cstamas pushed a commit to branch maven-3.10.x
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git


The following commit(s) were added to refs/heads/maven-3.10.x by this push:
     new 0fb3228a2 fix: mng-0479 IT fix (#458)
0fb3228a2 is described below

commit 0fb3228a2a6dbf7483a5b141b1e5f32bdc52608c
Author: Tamas Cservenak <[email protected]>
AuthorDate: Wed Nov 4 21:02:20 2026 +0100

    fix: mng-0479 IT fix (#458)
    
    Added a slight change, that makes IT pass with Maven 3.10.0 and 3.10.1+, 
basically by introducing "alt central" as second repository. The new repository 
does not affect redefinition of "central" that is also asserted.
    
    Locally tested, and IT suite passes with both, 3.10.0 and latest 
3.10.1-SNAPSHOT
    
    <!-- Add your description here... what, why and how you resolve the issue 
-->
    
    ---
    
    To make clear that you license your contribution under
    the [Apache License Version 2.0, January 
2004](https://www.apache.org/licenses/LICENSE-2.0)
    check one of the following:
    
    - [x] I hereby declare this contribution to be licensed under the [Apache 
License Version 2.0, January 2004](https://www.apache.org/licenses/LICENSE-2.0)
    - [x] I hereby declare that I have filed an [Apache Individual Contributor 
License Agreement](https://www.apache.org/licenses/icla.pdf).
---
 .../it/MavenITmng0479OverrideCentralRepoTest.java  | 10 +++++++++
 .../resources/mng-0479/test/settings-template.xml  | 26 ++++++++++++++++++++++
 2 files changed, 36 insertions(+)

diff --git 
a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0479OverrideCentralRepoTest.java
 
b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0479OverrideCentralRepoTest.java
index 256c9c4ad..30cfb64f6 100644
--- 
a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0479OverrideCentralRepoTest.java
+++ 
b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0479OverrideCentralRepoTest.java
@@ -46,6 +46,16 @@ public class MavenITmng0479OverrideCentralRepoTest extends 
AbstractMavenIntegrat
     public void testitModel() throws Exception {
         File testDir = ResourceExtractor.simpleExtractResources(getClass(), 
"/mng-0479");
 
+        // Note: starting with Resolver 2.0.25 that contains this fix 
https://github.com/apache/maven-resolver/pull/2192
+        // this IT as is, pass-ok with 3.10.0, but it fails with 3.10.1 
(Resolver 2.0.25) due that pull request above.
+        // The fix in PR pulls out all repositories for consideration, as 
central is redefined as snapshot repository!
+        // Hence, added a fix that works for both, 3.10.0 and 3.10.1+: added 
second "alt central" that points to real
+        // Central, as after PR 2192, there is no more "way" to trick Maven, 
it is now strict.
+        //
+        // History: This IT is for MNG-479, but later was "refurbished" for 
MNG-4769, where the override of Central
+        // to "snapshot only" was added (and relevant assertions). Hence, the 
workaround above, as it leave all
+        // those things in place, but also makes IT pass with 3.10.1+
+
         // Phase 1: Ensure the test plugin is downloaded before the test cuts 
off access to central
         File child1 = new File(testDir, "setup");
         Verifier verifier = newVerifier(child1.getAbsolutePath());
diff --git 
a/core-it-suite/src/test/resources/mng-0479/test/settings-template.xml 
b/core-it-suite/src/test/resources/mng-0479/test/settings-template.xml
index 85ab21eb2..5bc3bc038 100644
--- a/core-it-suite/src/test/resources/mng-0479/test/settings-template.xml
+++ b/core-it-suite/src/test/resources/mng-0479/test/settings-template.xml
@@ -45,6 +45,19 @@ under the License.
             <updatePolicy>never</updatePolicy>
           </snapshots>
         </repository>
+        <repository>
+          <id>alt-central</id>
+          <name>alt-central-mng-0479</name>
+          <url>https://repo1.maven.org/maven2</url>
+          <releases>
+            <enabled>true</enabled>
+            <checksumPolicy>fail</checksumPolicy>
+            <updatePolicy>never</updatePolicy>
+          </releases>
+          <snapshots>
+            <enabled>false</enabled>
+          </snapshots>
+        </repository>
       </repositories>
       <pluginRepositories>
         <pluginRepository>
@@ -62,6 +75,19 @@ under the License.
             <updatePolicy>never</updatePolicy>
           </snapshots>
         </pluginRepository>
+        <pluginRepository>
+          <id>alt-central</id>
+          <name>alt-central-mng-0479</name>
+          <url>https://repo1.maven.org/maven2</url>
+          <releases>
+            <enabled>true</enabled>
+            <checksumPolicy>fail</checksumPolicy>
+            <updatePolicy>never</updatePolicy>
+          </releases>
+          <snapshots>
+            <enabled>false</enabled>
+          </snapshots>
+        </pluginRepository>
       </pluginRepositories>
     </profile>
   </profiles>

Reply via email to