mirror of https://github.com/apache/maven.git
Add IT for MNG-3396 and MNG-3410
git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@629011 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b2d1a38cde
commit
f7617ed3d2
|
@ -164,6 +164,7 @@ public class IntegrationTestSuite
|
|||
suite.addTestSuite( MavenIT0129ResourceProvidedToAPluginAsAPluginDependency.class );
|
||||
suite.addTestSuite( MavenITmng2045testJarDependenciesBrokenInReactorTest.class );
|
||||
suite.addTestSuite( MavenITmng2277AggregatorAndResolutionPluginsTest.class );
|
||||
//suite.addTestSuite( MavenITmng3396DependencyManagementForOverConstrainedRanges.class );
|
||||
|
||||
// ----------------------------------------------------------------------------------------------------
|
||||
// Tests that need to be fixed.
|
||||
|
|
|
@ -0,0 +1,69 @@
|
|||
package org.apache.maven.integrationtests;
|
||||
|
||||
/*
|
||||
* 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 org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
|
||||
public class MavenITmng3396DependencyManagementForOverConstrainedRanges
|
||||
extends AbstractMavenIntegrationTestCase
|
||||
{
|
||||
private static final String GROUP_ID = "org.apache.maven.its.mng3396";
|
||||
|
||||
public void testDependencyManagementForOverConstrainedRanges()
|
||||
throws Exception
|
||||
{
|
||||
String baseDir = "/mng-3396-dependencyManagementForOverConstrainedRanges";
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), baseDir + "/dependencies" );
|
||||
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.deleteArtifact( GROUP_ID, "A", "1.0", "pom" );
|
||||
verifier.deleteArtifact( GROUP_ID, "A", "1.0", "jar" );
|
||||
verifier.deleteArtifact( GROUP_ID, "B", "1.0", "pom" );
|
||||
verifier.deleteArtifact( GROUP_ID, "B", "1.0", "jar" );
|
||||
verifier.executeGoal( "install" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
|
||||
testDir = ResourceExtractor.simpleExtractResources( getClass(), baseDir + "/plugin" );
|
||||
|
||||
verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.deleteArtifact( GROUP_ID, "A", "1.0", "pom" );
|
||||
verifier.deleteArtifact( GROUP_ID, "A", "1.0", "jar" );
|
||||
verifier.deleteArtifact( GROUP_ID, "A", "3.0", "pom" );
|
||||
verifier.deleteArtifact( GROUP_ID, "A", "3.0", "jar" );
|
||||
verifier.deleteArtifact( GROUP_ID, "plugin", "1.0", "pom" );
|
||||
verifier.deleteArtifact( GROUP_ID, "plugin", "1.0", "jar" );
|
||||
verifier.executeGoal( "install" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
|
||||
testDir = ResourceExtractor.simpleExtractResources( getClass(), baseDir + "/pluginuser" );
|
||||
|
||||
verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.deleteArtifact( GROUP_ID, "pluginuser", "1.0", "pom" );
|
||||
verifier.deleteArtifact( GROUP_ID, "pluginuser", "1.0", "jar" );
|
||||
verifier.executeGoal( "install" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<name>Maven Integration Test :: mng3396 :: A</name>
|
||||
<parent>
|
||||
<groupId>org.apache.maven.its.mng3396</groupId>
|
||||
<artifactId>dependencies</artifactId>
|
||||
<version>1</version>
|
||||
</parent>
|
||||
<artifactId>A</artifactId>
|
||||
<version>1.0</version>
|
||||
</project>
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<name>Maven Integration Test :: mng3396 :: B</name>
|
||||
<parent>
|
||||
<groupId>org.apache.maven.its.mng3396</groupId>
|
||||
<artifactId>dependencies</artifactId>
|
||||
<version>1</version>
|
||||
</parent>
|
||||
<artifactId>B</artifactId>
|
||||
<version>1.0</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>${pom.groupId}</groupId>
|
||||
<artifactId>A</artifactId>
|
||||
<version>[1.0,2.0)</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<name>Maven Integration Test :: mng3396</name>
|
||||
<groupId>org.apache.maven.its.mng3396</groupId>
|
||||
<artifactId>dependencies</artifactId>
|
||||
<description>Managed versions dont affect over constrained ranges. [MNG-3396]</description>
|
||||
<version>1</version>
|
||||
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<modules>
|
||||
<module>a1</module>
|
||||
<module>b</module>
|
||||
</modules>
|
||||
</project>
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<name>Maven Integration Test :: mng3396 :: A</name>
|
||||
<parent>
|
||||
<groupId>org.apache.maven.its.mng3396</groupId>
|
||||
<artifactId>plugin-parent</artifactId>
|
||||
<version>1</version>
|
||||
</parent>
|
||||
<artifactId>A</artifactId>
|
||||
<version>3.0</version>
|
||||
</project>
|
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<name>Maven Integration Test :: mng3396 :: plugin</name>
|
||||
<parent>
|
||||
<groupId>org.apache.maven.its.mng3396</groupId>
|
||||
<artifactId>plugin-parent</artifactId>
|
||||
<version>1</version>
|
||||
</parent>
|
||||
<artifactId>plugin</artifactId>
|
||||
<version>1.0</version>
|
||||
<packaging>maven-plugin</packaging>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>${pom.groupId}</groupId>
|
||||
<artifactId>B</artifactId>
|
||||
<version>1.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>${pom.groupId}</groupId>
|
||||
<artifactId>${pom.groupId}</artifactId>
|
||||
<version>3.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
</project>
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<name>Maven Integration Test :: mng3396</name>
|
||||
<groupId>org.apache.maven.its.mng3396</groupId>
|
||||
<artifactId>plugin-parent</artifactId>
|
||||
<description>Managed versions dont affect over constrained ranges. [MNG-3396]</description>
|
||||
<version>1</version>
|
||||
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<modules>
|
||||
<module>a</module>
|
||||
<module>plugin</module>
|
||||
</modules>
|
||||
</project>
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<name>Maven Integration Test :: mng3396 :: pluginuser</name>
|
||||
<groupId>org.apache.maven.its.mng3396</groupId>
|
||||
<artifactId>pluginuser</artifactId>
|
||||
<version>1.0</version>
|
||||
<packaging>maven-plugin</packaging>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>${pom.groupId}</groupId>
|
||||
<artifactId>plugin</artifactId>
|
||||
<version>1.0</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
Loading…
Reference in New Issue