mirror of https://github.com/apache/maven.git
o adding in a test project to try and solve MNG-2289. working with patrick so we'll call this something else later
git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@544253 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5b60cb74b9
commit
4dc2f57442
|
@ -0,0 +1,26 @@
|
|||
<?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">
|
||||
<parent>
|
||||
<groupId>org.codehaus.jira.mng.2289</groupId>
|
||||
<artifactId>parent</artifactId>
|
||||
<version>SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>mng-issue-2289</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>Issue 2289</name>
|
||||
<version>SNAPSHOT</version>
|
||||
<description><![CDATA[Demonstration of issue 2289.]]></description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,12 @@
|
|||
package mng;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class Issue2289
|
||||
{
|
||||
public static void main(final String[] args)
|
||||
{
|
||||
TestCase tc = new TestCase("Dummy") {};
|
||||
System.exit(tc == null ? -1 : 0);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
1. Go to the parent directory and call mvn deploy
|
||||
2. Go to the issue directory and call mvn eclipse:eclipse, the project is now dependent on junit-3.7 as defined in the dependencyManagement of the parent
|
||||
3. Set your local repo in settings.xml to something else e.g. <localRepository>/temp/repo-m2-local</localRepository>
|
||||
4. Go to the parent directory and change the version of junit to 3.8
|
||||
5. Call again mvn deploy, but Maven will now use the temporary local repo for installation of the updated POM
|
||||
6. Go to the issue directory and call noformat}}mvn eclipse:eclipse{{noformat, the project is now dependent on junit-3.8 as defined in the dependencyManagement of the parent
|
||||
7. Restore your settings.xml
|
||||
8. Call mvn eclipse:eclipse again for the issue, the project is still dependent on junit-3.7 the available newer version of the snapshot parent is ignored
|
|
@ -0,0 +1,52 @@
|
|||
<?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>
|
||||
<groupId>org.codehaus.jira.mng.2289</groupId>
|
||||
<artifactId>parent</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<name>Parent POM for issue 2289</name>
|
||||
<version>SNAPSHOT</version>
|
||||
<inceptionYear>2006</inceptionYear>
|
||||
|
||||
<build/>
|
||||
<profiles/>
|
||||
<reporting/>
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>3.7</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<releases>
|
||||
<enabled>false</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
<updatePolicy>always</updatePolicy>
|
||||
</snapshots>
|
||||
<id>local-snapshot-repo</id>
|
||||
<name>Local snapshot repository</name>
|
||||
<url>file:///temp/repo-m2-snapshot</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<!-- Define the locations for artifact distribution -->
|
||||
<distributionManagement>
|
||||
<snapshotRepository>
|
||||
<id>demo-snapshot</id>
|
||||
<name>Demo Maven 2 snapshot repository</name>
|
||||
<url>file:///temp/repo-m2-snapshot</url>
|
||||
<uniqueVersion>false</uniqueVersion>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
</project>
|
Loading…
Reference in New Issue