You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2020/12/26 21:10:25 UTC
[maven-integration-testing] branch MNG-4963_fix created (now
1a1e2cc)
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a change to branch MNG-4963_fix
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git.
at 1a1e2cc [MNG-4963] Parent POM not downloaded when settings define global mirror and one snapshot repo but no other release repository
This branch includes the following new commits:
new 1a1e2cc [MNG-4963] Parent POM not downloaded when settings define global mirror and one snapshot repo but no other release repository
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[maven-integration-testing] 01/01: [MNG-4963] Parent POM not
downloaded when settings define global mirror and one snapshot repo but no
other release repository
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch MNG-4963_fix
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git
commit 1a1e2cc8eb42414ad41dbd61a601d476b1381421
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sat Dec 26 22:04:21 2020 +0100
[MNG-4963] Parent POM not downloaded when settings define global mirror and one snapshot repo but no other release repository
This IT was written with implicit black magic in mind. A mirror simply exchanges
a URL of repo with another one while retaining the entire config for
releases/snapshots. Logically this IT should have failed because there is no
release repo. But it works because Maven adds Maven Central internally which is
a release repo. For MNG-4645 one has to add a release repo in the settings to
mimic that behavior.
This closes #96
---
.../MavenITmng4963ParentResolutionFromMirrorTest.java | 4 ++++
.../src/test/resources/mng-4963/settings-template.xml | 18 ++++++++++++++++++
2 files changed, 22 insertions(+)
diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4963ParentResolutionFromMirrorTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4963ParentResolutionFromMirrorTest.java
index c0efab3..fb1df45 100644
--- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4963ParentResolutionFromMirrorTest.java
+++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4963ParentResolutionFromMirrorTest.java
@@ -55,6 +55,10 @@ public class MavenITmng4963ParentResolutionFromMirrorTest
verifier.addCliOption( "-s" );
verifier.addCliOption( "settings.xml" );
verifier.filterFile( "settings-template.xml", "settings.xml", "UTF-8", verifier.newDefaultFilterProperties() );
+ if ( matchesVersionRange( "[4.0.0-alpha-1,)" ) )
+ {
+ verifier.addCliOption( "-Pit-defaults-4.0.0" );
+ }
verifier.executeGoal( "validate" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
diff --git a/core-it-suite/src/test/resources/mng-4963/settings-template.xml b/core-it-suite/src/test/resources/mng-4963/settings-template.xml
index 16d84ab..332795a 100644
--- a/core-it-suite/src/test/resources/mng-4963/settings-template.xml
+++ b/core-it-suite/src/test/resources/mng-4963/settings-template.xml
@@ -46,6 +46,24 @@ under the License.
</repository>
</repositories>
</profile>
+ <profile>
+ <!--
+ NOTE: Since Maven Central (release repo) is not added implicitly by Maven Core anymore we cannot rely on the implicit behavior of MNG-4963.
+ -->
+ <id>it-defaults-4.0.0</id>
+ <repositories>
+ <repository>
+ <id>maven-core-it-4.0.0</id>
+ <url>@baseurl@/repo</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ </profile>
</profiles>
<activeProfiles>
<activeProfile>it-defaults</activeProfile>