Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ public static Test suite()
// Tests that don't run stable and need to be fixed
// -------------------------------------------------------------------------------------------------------------
// suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137
suite.addTestSuite( MavenITmng7529VersionRangeRepositorySelection.class );
suite.addTestSuite( MavenITmng7443ConsistencyOfOptionalProjectsAndProfilesTest.class );
suite.addTestSuite( MavenITmng7353CliGoalInvocationTest.class );
suite.addTestSuite( MavenITmng7504NotWarnUnsupportedReportPluginsTest.class );
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
package org.apache.maven.it;

/*
* 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.
*/

import java.io.File;
import java.util.Properties;
import org.apache.maven.it.util.ResourceExtractor;

/**
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-7529">MNG-7529</a>.
*/
public class MavenITmng7529VersionRangeRepositorySelection
extends AbstractMavenIntegrationTestCase {

public MavenITmng7529VersionRangeRepositorySelection() {
super("(3.8.6,)");
}

/**
* Test dependency resolution from a version range using multiple remote repositories
* with snapshot or release enabled.
*
* @throws Exception in case of failure
*/
public void testit()
throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-7529");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
verifier.setAutoclean(false);
verifier.deleteDirectory("target");
verifier.deleteArtifacts("org.apache.maven.its.mng7529");
verifier.addCliOption("--settings");
verifier.addCliOption("settings.xml");

verifier.filterFile("settings-template.xml", "settings.xml", "UTF-8", verifier.newDefaultFilterProperties());
verifier.executeGoal("validate");
verifier.verifyErrorFreeLog();
verifier.resetStreams();
}
}
3 changes: 3 additions & 0 deletions core-it-suite/src/test/resources/mng-7529/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.pom text eol=lf
maven-metadata.xml text eol=lf

62 changes: 62 additions & 0 deletions core-it-suite/src/test/resources/mng-7529/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
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.
-->

<project>
<modelVersion>4.0.0</modelVersion>

<groupId>org.apache.maven.its.mng7529</groupId>
<artifactId>test</artifactId>
<version>0.1</version>
<packaging>jar</packaging>

<name>Maven Integration Test :: MNG-7529</name>
<description>
Verify that artifact ranges are resolved to the right release repository.
</description>

<dependencies>
<dependency>
<groupId>org.apache.maven.its.mng7529</groupId>
<artifactId>a</artifactId>
<version>(0.0,]</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.its.plugins</groupId>
<artifactId>mng-7529-version-range-repository-selection-plugin</artifactId>
<version>2.1-SNAPSHOT</version>
<executions>
<execution>
<id>resolve</id>
<phase>validate</phase>
<goals>
<goal>resolve</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
3 changes: 3 additions & 0 deletions core-it-suite/src/test/resources/mng-7529/repo/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.pom text eol=lf
maven-metadata.xml text eol=lf

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d532fcb4ba249192671e9954b80422819ce72679
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
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.
-->

<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven.its.mng7529</groupId>
<artifactId>a</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
e231c56d8ec5e15fa40147933ece7335cb450b80
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d532fcb4ba249192671e9954b80422819ce72679
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
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.
-->

<project>
<modelVersion>4.0.0</modelVersion>

<groupId>org.apache.maven.its.mng7529</groupId>
<artifactId>a</artifactId>
<version>1.1</version>
<packaging>jar</packaging>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2463dfbdb7f0a1efbb1163e39dfed1f5a4a8bdc5
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?><metadata>
<groupId>org.apache.maven.its.mng7529</groupId>
<artifactId>a</artifactId>
<version>1.0</version>
<versioning>
<release>1.1</release>
<versions>
<version>1.0</version>
<version>1.1</version>
</versions>
<lastUpdated>20220820180700</lastUpdated>
</versioning>
</metadata>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1879cdd62495339b931a092a7e899b2dce39b826
61 changes: 61 additions & 0 deletions core-it-suite/src/test/resources/mng-7529/settings-template.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
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.
-->

<settings>
<!-- <mirrors>-->
<!-- <mirror>-->
<!-- <id>maven-core-it</id>-->
<!-- <url>@baseurl@/repo</url>-->
<!-- <mirrorOf>central</mirrorOf>-->
<!-- </mirror>-->
<!-- </mirrors>-->

<profiles>
<profile>
<id>maven-core-it-repo</id>
<repositories>
<repository>
<id>maven-core-it-snapshots</id>
<url>@baseurl@/repo</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<checksumPolicy>ignore</checksumPolicy>
</snapshots>
</repository>
<repository>
<id>maven-core-it</id>
<url>@baseurl@/repo</url>
<releases>
<checksumPolicy>ignore</checksumPolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>maven-core-it-repo</activeProfile>
</activeProfiles>
</settings>
66 changes: 66 additions & 0 deletions core-it-support/core-it-plugins/mng7529-plugin/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
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.
-->

<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>
<artifactId>maven-it-plugins</artifactId>
<groupId>org.apache.maven.its.plugins</groupId>
<version>2.1-SNAPSHOT</version>
</parent>

<artifactId>mng-7529-version-range-repository-selection-plugin</artifactId>
<packaging>maven-plugin</packaging>

<properties>
<maven-version>3.6.0</maven-version>
</properties>

<name>Maven IT Plugin :: mng-7529 plugin</name>

<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>${maven-version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>${maven-version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-model</artifactId>
<version>${maven-version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
Loading