o bits for mng-1577

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@521543 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2007-03-23 00:11:31 +00:00
parent dd48e05bb0
commit 05162de0d0
110 changed files with 2106 additions and 2 deletions

View File

@ -0,0 +1,39 @@
package org.apache.maven.artifact.resolver;
/*
* 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 org.apache.maven.artifact.Artifact;
/**
* Do not use!
*
* Should only be implmemented by DebugResolutionListener. Remove this
* when the ResolutionListener interface deprecation of the manageArtifact
* method (and the [yet to be done] addition of these methods to that
* interface) has had a chance to propagate to all interested plugins.
*
* @deprecated
*/
public interface ResolutionListenerForDepMgmt
{
void manageArtifactVersion( Artifact artifact, Artifact replacement );
void manageArtifactScope( Artifact artifact, Artifact replacement );
}

View File

@ -0,0 +1,52 @@
package org.apache.maven.artifact.versioning;
/*
* 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.util.HashMap;
import java.util.Map;
import java.util.Iterator;
public class ManagedVersionMap extends HashMap
{
public ManagedVersionMap(Map map)
{
super();
if (map != null)
{
putAll(map);
}
}
public String toString()
{
StringBuffer buffer = new StringBuffer("ManagedVersionMap\n");
Iterator iter = this.keySet().iterator();
while (iter.hasNext())
{
String key = (String)iter.next();
buffer.append(key).append("=").append(get(key));
if (iter.hasNext())
{
buffer.append("\n");
}
}
return buffer.toString();
}
}

View File

@ -71,6 +71,7 @@ under the License.
</execution>
</executions>
</plugin>
<!--
<plugin>
<artifactId>minijar-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
@ -88,16 +89,15 @@ under the License.
<exclude>jmock:jmock</exclude>
<exclude>xml-apis:xml-apis</exclude>
</excludes>
<!--
<dependenciesToHide>
<dependencyHide>org.codehaus.plexus:plexus-utils</dependencyHide>
<dependencyHide>jdom:jdom</dependencyHide>
</dependenciesToHide>
-->
</configuration>
</execution>
</executions>
</plugin>
-->
</plugins>
</build>
<dependencies>

View File

@ -0,0 +1,83 @@
package org.apache.maven.project.inheritance.t04;
/*
* 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.Set;
import java.util.Iterator;
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.inheritance.AbstractProjectInheritanceTestCase;
import org.apache.maven.artifact.Artifact;
/**
* Verifies the version of a dependency listed in a parent's
* dependencyManagement section is chosen over another version of the same
* dependency, listed transitively.
*
* @author <a href="mailto:pschneider@gmail.com">Patrick Schneider</a>
* @version $Id$
*/
public class ProjectInheritanceTest
extends AbstractProjectInheritanceTestCase
{
// ----------------------------------------------------------------------
//
// p1 inherits from p0
// p0 inhertis from super model
//
// or we can show it graphically as:
//
// p1 ---> p0 --> super model
//
// p1 has a depMgmt section that specifies versions 1.0 of jars "a" & "b"
// jar "a" has a transitive dependency on 2.0 of jar "b", but maven should
// prefer to use version 1.0.
//
// ----------------------------------------------------------------------
public void testDependencyManagementOverridesTransitiveDependencyVersion()
throws Exception
{
File localRepo = getLocalRepositoryPath();
File pom0 = new File( localRepo, "p0/pom.xml" );
File pom0Basedir = pom0.getParentFile();
File pom1 = new File( pom0Basedir, "p1/pom.xml" );
// load the child project, which inherits from p0...
MavenProject project0 = getProjectWithDependencies( pom0 );
MavenProject project1 = getProjectWithDependencies( pom1 );
assertEquals( pom0Basedir, project1.getParent().getBasedir() );
Set set = project1.getArtifacts();
assertNotNull("No artifacts", set);
assertTrue("No Artifacts", set.size() > 0);
assertTrue("Set size should be 3, is " + set.size(), set.size() == 3);
Iterator iter = set.iterator();
while (iter.hasNext()) {
Artifact artifact = (Artifact)iter.next();
System.out.println("Artifact: " + artifact.getDependencyConflictId() + " " + artifact.getVersion() +
" Optional=" + (artifact.isOptional() ? "true" : "false"));
assertTrue("Incorrect version for " + artifact.getDependencyConflictId(), artifact.getVersion().equals("1.0"));
}
}
}

View File

@ -0,0 +1,79 @@
package org.apache.maven.project.inheritance.t05;
/*
* 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.Set;
import java.util.Iterator;
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.inheritance.AbstractProjectInheritanceTestCase;
import org.apache.maven.artifact.Artifact;
/**
* A test which demonstrates maven's dependency management
*
* @author <a href="rgoers@apache.org">Ralph Goers</a>
* @version $Id$
*/
public class ProjectInheritanceTest
extends AbstractProjectInheritanceTestCase
{
// ----------------------------------------------------------------------
//
// p1 inherits from p0
// p0 inhertis from super model
//
// or we can show it graphically as:
//
// p1 ---> p0 --> super model
//
// ----------------------------------------------------------------------
public void testDependencyManagement()
throws Exception
{
File localRepo = getLocalRepositoryPath();
File pom0 = new File( localRepo, "p0/pom.xml" );
File pom0Basedir = pom0.getParentFile();
File pom1 = new File( pom0Basedir, "p1/pom.xml" );
// load everything...
MavenProject project0 = getProjectWithDependencies( pom0 );
MavenProject project1 = getProjectWithDependencies( pom1 );
assertEquals( pom0Basedir, project1.getParent().getBasedir() );
Set set = project1.getArtifacts();
assertNotNull("No artifacts", set);
assertTrue("No Artifacts", set.size() > 0);
Iterator iter = set.iterator();
while (iter.hasNext())
{
Artifact artifact = (Artifact)iter.next();
System.out.println("Artifact: " + artifact.getDependencyConflictId() + " " +
artifact.getVersion() + " Scope: " + artifact.getScope());
assertTrue("Incorrect version for " + artifact.getDependencyConflictId(), artifact.getVersion().equals("1.0"));
}
}
}

View File

@ -0,0 +1,80 @@
package org.apache.maven.project.inheritance.t06;
/*
* 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.Set;
import java.util.Iterator;
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.inheritance.AbstractProjectInheritanceTestCase;
import org.apache.maven.artifact.Artifact;
/**
* A test which demonstrates maven's dependency management
*
* @author <a href="rgoers@apache.org">Ralph Goers</a>
* @version $Id$
*/
public class ProjectInheritanceTest
extends AbstractProjectInheritanceTestCase
{
// ----------------------------------------------------------------------
//
// p1 inherits from p0
// p0 inhertis from super model
//
// or we can show it graphically as:
//
// p1 ---> p0 --> super model
//
// ----------------------------------------------------------------------
public void testDependencyManagement()
throws Exception
{
File localRepo = getLocalRepositoryPath();
File pom0 = new File( localRepo, "p0/pom.xml" );
File pom0Basedir = pom0.getParentFile();
File pom1 = new File( pom0Basedir, "p1/pom.xml" );
// load everything...
MavenProject project0 = getProjectWithDependencies( pom0 );
MavenProject project1 = getProjectWithDependencies( pom1 );
assertEquals( pom0Basedir, project1.getParent().getBasedir() );
Set set = project1.getArtifacts();
assertNotNull("No artifacts", set);
assertTrue("No Artifacts", set.size() > 0);
Iterator iter = set.iterator();
assertTrue("Set size should be 4, is " + set.size(), set.size() == 4);
while (iter.hasNext())
{
Artifact artifact = (Artifact)iter.next();
System.out.println("Artifact: " + artifact.getDependencyConflictId() + " " + artifact.getVersion() +
" Optional=" + (artifact.isOptional() ? "true" : "false"));
assertTrue("Incorrect version for " + artifact.getDependencyConflictId(), artifact.getVersion().equals("1.0"));
}
}
}

View File

@ -0,0 +1,91 @@
package org.apache.maven.project.inheritance.t07;
/*
* 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.List;
import java.util.Set;
import java.util.Iterator;
import org.apache.maven.model.Build;
import org.apache.maven.model.MailingList;
import org.apache.maven.model.Plugin;
import org.apache.maven.model.PluginExecution;
import org.apache.maven.model.Dependency;
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.inheritance.AbstractProjectInheritanceTestCase;
import org.apache.maven.artifact.Artifact;
import org.codehaus.plexus.util.xml.Xpp3Dom;
import org.codehaus.plexus.logging.LoggerManager;
import org.codehaus.plexus.logging.Logger;
/**
* A test which demonstrates maven's dependency management
*
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
* @version $Id$
*/
public class ProjectInheritanceTest
extends AbstractProjectInheritanceTestCase
{
// ----------------------------------------------------------------------
//
// p1 inherits from p0
// p0 inhertis from super model
//
// or we can show it graphically as:
//
// p1 ---> p0 --> super model
//
// ----------------------------------------------------------------------
public void testDependencyManagement()
throws Exception
{
File localRepo = getLocalRepositoryPath();
File pom0 = new File( localRepo, "p0/pom.xml" );
File pom0Basedir = pom0.getParentFile();
File pom1 = new File( pom0Basedir, "p1/pom.xml" );
// load everything...
MavenProject project0 = getProjectWithDependencies( pom0 );
MavenProject project1 = getProjectWithDependencies( pom1 );
assertEquals( pom0Basedir, project1.getParent().getBasedir() );
System.out.println("Project " + project1.getId() + " " + project1);
Set set = project1.getArtifacts();
assertNotNull("No artifacts", set);
assertTrue("No Artifacts", set.size() > 0);
Iterator iter = set.iterator();
assertTrue("Set size should be 3, is " + set.size(), set.size() == 3);
while (iter.hasNext())
{
Artifact artifact = (Artifact)iter.next();
assertFalse("", artifact.getArtifactId().equals("maven-test-d"));
System.out.println("Artifact: " + artifact.getDependencyConflictId() + " " + artifact.getVersion() +
" Optional=" + (artifact.isOptional() ? "true" : "false"));
assertTrue("Incorrect version for " + artifact.getDependencyConflictId(), artifact.getVersion().equals("1.0"));
}
}
}

View File

@ -0,0 +1,81 @@
package org.apache.maven.project.inheritance.t08;
/*
* 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.Set;
import java.util.Iterator;
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.inheritance.AbstractProjectInheritanceTestCase;
import org.apache.maven.artifact.Artifact;
/**
* A test which demonstrates maven's dependency management
*
* @author <a href="rgoers@apache.org">Ralph Goers</a>
* @version $Id$
*/
public class ProjectInheritanceTest
extends AbstractProjectInheritanceTestCase
{
// ----------------------------------------------------------------------
//
// p1 inherits from p0
// p0 inhertis from super model
//
// or we can show it graphically as:
//
// p1 ---> p0 --> super model
//
// ----------------------------------------------------------------------
public void testDependencyManagement()
throws Exception
{
File localRepo = getLocalRepositoryPath();
File pom0 = new File( localRepo, "p0/pom.xml" );
File pom0Basedir = pom0.getParentFile();
File pom1 = new File( pom0Basedir, "p1/pom.xml" );
// load everything...
MavenProject project0 = getProjectWithDependencies( pom0 );
MavenProject project1 = getProjectWithDependencies( pom1 );
assertEquals( pom0Basedir, project1.getParent().getBasedir() );
System.out.println("Project " + project1.getId() + " " + project1);
Set set = project1.getArtifacts();
assertNotNull("No artifacts", set);
assertTrue("No Artifacts", set.size() > 0);
Iterator iter = set.iterator();
assertTrue("Set size should be 4, is " + set.size(), set.size() == 4);
while (iter.hasNext())
{
Artifact artifact = (Artifact)iter.next();
System.out.println("Artifact: " + artifact.getDependencyConflictId() + " " + artifact.getVersion() +
" Optional=" + (artifact.isOptional() ? "true" : "false"));
assertTrue("Incorrect version for " + artifact.getDependencyConflictId(), artifact.getVersion().equals("1.0"));
}
}
}

View File

@ -0,0 +1,131 @@
package org.apache.maven.project.inheritance.t09;
/*
* 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.Collection;
import java.util.List;
import java.util.Map;
import java.util.Iterator;
import org.apache.maven.model.Build;
import org.apache.maven.model.MailingList;
import org.apache.maven.model.Plugin;
import org.apache.maven.model.PluginExecution;
import org.apache.maven.model.Dependency;
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.inheritance.AbstractProjectInheritanceTestCase;
import org.apache.maven.artifact.Artifact;
import org.codehaus.plexus.util.xml.Xpp3Dom;
import org.codehaus.plexus.logging.LoggerManager;
import org.codehaus.plexus.logging.Logger;
/**
* Verifies exclusions listed in dependencyManagement are valid for
* transitive dependencies.
*
* @author <a href="mailto:pschneider@gmail.com">Patrick Schneider</a>
* @version $Id$
*/
public class ProjectInheritanceTest
extends AbstractProjectInheritanceTestCase
{
// ----------------------------------------------------------------------
//
// p1 inherits from p0
// p0 inhertis from super model
//
// or we can show it graphically as:
//
// p1 ---> p0 --> super model
//
// ----------------------------------------------------------------------
/**
* How the test project is set up:
*
* 1. dependencyManagement lists dependencies on a & b,
* with an exclusion on c in b.
* 2. the child project lists a dependency on project a only
* 3. a depends on b (which is transitive to the child project),
* and b depends on c.
*
* We should see that the resulting size of collected artifacts is two:
* a & b only.
*/
public void testDependencyManagementExclusionsExcludeTransitively()
throws Exception
{
File localRepo = getLocalRepositoryPath();
File pom0 = new File( localRepo, "p0/pom.xml" );
File pom0Basedir = pom0.getParentFile();
File pom1 = new File( pom0Basedir, "p1/pom.xml" );
// load the child project, which inherits from p0...
MavenProject project0 = getProjectWithDependencies( pom0 );
MavenProject project1 = getProjectWithDependencies( pom1 );
assertEquals( pom0Basedir, project1.getParent().getBasedir() );
Map map = project1.getArtifactMap();
assertNotNull("No artifacts", map);
assertTrue("No Artifacts", map.size() > 0);
assertTrue("Set size should be 2, is " + map.size(), map.size() == 2);
assertTrue("maven-test:t09-a is not in the project", map.containsKey( "maven-test:t09-a" ));
assertTrue("maven-test:t09-b is not in the project", map.containsKey( "maven-test:t09-b" ));
}
/**
* Setup exactly the same as the above test, except that the child project
* now depends upon d, which has a transitive dependency on c. Even though
* we did list an exclusion on c, it was only from within the context of
* project b. We will pick up project c in this case because no
* restrictions were placed on d. This demonstrates that a, b, c, & d will
* all be collected.
*
* @throws Exception
*/
public void testDependencyManagementExclusionDoesNotOverrideGloballyForTransitives()
throws Exception
{
File localRepo = getLocalRepositoryPath();
File pom0 = new File( localRepo, "p0/pom.xml" );
File pom0Basedir = pom0.getParentFile();
File pom2 = new File( pom0Basedir, "p2/pom.xml" );
// load the child project, which inherits from p0...
MavenProject project0 = getProjectWithDependencies( pom0 );
MavenProject project2 = getProjectWithDependencies( pom2 );
assertEquals( pom0Basedir, project2.getParent().getBasedir() );
Map map = project2.getArtifactMap();
assertNotNull( "No artifacts", map );
assertTrue( "No Artifacts", map.size() > 0 );
assertTrue( "Set size should be 4, is " + map.size(), map.size() == 4 );
assertTrue( "maven-test:t09-a is not in the project", map.containsKey( "maven-test:t09-a" ) );
assertTrue( "maven-test:t09-b is not in the project", map.containsKey( "maven-test:t09-b" ) );
assertTrue( "maven-test:t09-c is not in the project", map.containsKey( "maven-test:t09-c" ) );
assertTrue( "maven-test:t09-d is not in the project", map.containsKey( "maven-test:t09-d" ) );
}
}

View File

@ -0,0 +1,105 @@
package org.apache.maven.project.inheritance.t10;
/*
* 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.Collection;
import java.util.List;
import java.util.Map;
import java.util.Iterator;
import org.apache.maven.model.Build;
import org.apache.maven.model.MailingList;
import org.apache.maven.model.Plugin;
import org.apache.maven.model.PluginExecution;
import org.apache.maven.model.Dependency;
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.inheritance.AbstractProjectInheritanceTestCase;
import org.apache.maven.artifact.Artifact;
import org.codehaus.plexus.util.xml.Xpp3Dom;
import org.codehaus.plexus.logging.LoggerManager;
import org.codehaus.plexus.logging.Logger;
/**
* Verifies scope inheritence of direct and transitive dependencies.
*
* Should show three behaviors:
*
* 1. dependencyManagement should override the scope of transitive dependencies.
* 2. Direct dependencies should override the scope of dependencyManagement.
* 3. Direct dependencies should inherit scope from dependencyManagement when
* they do not explicitly state a scope.
*
* @author <a href="mailto:pschneider@gmail.com">Patrick Schneider</a>
* @version $Id$
*/
public class ProjectInheritanceTest
extends AbstractProjectInheritanceTestCase
{
// ----------------------------------------------------------------------
//
// p1 inherits from p0
// p0 inhertis from super model
//
// or we can show it graphically as:
//
// p1 ---> p0 --> super model
//
// ----------------------------------------------------------------------
public void testDependencyManagementOverridesTransitiveDependencyVersion()
throws Exception
{
File localRepo = getLocalRepositoryPath();
File pom0 = new File( localRepo, "p0/pom.xml" );
File pom0Basedir = pom0.getParentFile();
File pom1 = new File( pom0Basedir, "p1/pom.xml" );
// load the child project, which inherits from p0...
MavenProject project0 = getProjectWithDependencies( pom0 );
MavenProject project1 = getProjectWithDependencies( pom1 );
assertEquals( pom0Basedir, project1.getParent().getBasedir() );
System.out.println("Project " + project1.getId() + " " + project1);
Map map = project1.getArtifactMap();
assertNotNull("No artifacts", map);
assertTrue("No Artifacts", map.size() > 0);
assertTrue("Set size should be 3, is " + map.size(), map.size() == 3);
Artifact a = (Artifact) map.get("maven-test:t10-a");
Artifact b = (Artifact) map.get("maven-test:t10-b");
Artifact c = (Artifact) map.get("maven-test:t10-c");
assertNotNull( a );
assertNotNull( b );
assertNotNull( c );
// inherited from depMgmt
assertTrue("Incorrect scope for " + a.getDependencyConflictId(), a.getScope().equals("test"));
// transitive dep, overridden b depMgmt
assertTrue("Incorrect scope for " + b.getDependencyConflictId(), b.getScope().equals("runtime"));
// direct dep, overrides depMgmt
assertTrue("Incorrect scope for " + c.getDependencyConflictId(), c.getScope().equals("runtime"));
}
}

View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven</groupId>
<artifactId>maven-core</artifactId>
<name>Maven</name>
<version>2.0-SNAPSHOT</version>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>maven-test</groupId>
<artifactId>maven-test-b</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<artifactId>maven-plexus-plugin</artifactId>
<version>1.0</version>
<configuration>
<plexusConfiguration>src/conf/plexus.conf</plexusConfiguration>
<plexusConfigurationPropertiesFile>src/conf/plexus.properties</plexusConfigurationPropertiesFile>
<plexusApplicationName>Continuum</plexusApplicationName>
</configuration>
<executions>
<execution>
<goals>
<goal>plexus:runtime</goal>
</goals>
<configuration>
<plexusApplicationName>ContinuumPro</plexusApplicationName>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,21 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-test</groupId>
<artifactId>t04-a</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<repositories>
<repository>
<id>central</id>
<name>Fake Maven Central Repository</name>
<url>file://dummy</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t04-b</artifactId>
<version>2.0</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,7 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-test</groupId>
<artifactId>t04-b</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
</project>

View File

@ -0,0 +1,7 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-test</groupId>
<artifactId>t04-b</artifactId>
<packaging>jar</packaging>
<version>2.0</version>
</project>

View File

@ -0,0 +1,7 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-test</groupId>
<artifactId>t04-c</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
</project>

View File

@ -0,0 +1,7 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-test</groupId>
<artifactId>t04-b</artifactId>
<packaging>jar</packaging>
<version>2.0</version>
</project>

View File

@ -0,0 +1,41 @@
<project>
<parent>
<artifactId>p0</artifactId>
<groupId>maven-t04</groupId>
<version>1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-t04</groupId>
<artifactId>p1</artifactId>
<packaging>pom</packaging>
<name>p1</name>
<version>1.0</version>
<scm>
<url>scm-url</url>
</scm>
<dependencies>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t04-a</artifactId>
</dependency>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t04-c</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<configuration>
<tasks><echo>${project.parent.basedir}</echo></tasks>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,37 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-t04</groupId>
<artifactId>p0</artifactId>
<packaging>pom</packaging>
<name>p0</name>
<version>1.0</version>
<organization>
<name>Codehaus</name>
</organization>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t04-a</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t04-b</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t04-c</artifactId>
<version>2.0</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>

View File

@ -0,0 +1,23 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-test</groupId>
<artifactId>t05-a</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<repositories>
<repository>
<id>central</id>
<name>Fake Maven Central Repository</name>
<url>file://dummy</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t05-b</artifactId>
<version>1.0</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,23 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-test</groupId>
<artifactId>t05-a</artifactId>
<packaging>jar</packaging>
<version>2.0</version>
<repositories>
<repository>
<id>central</id>
<name>Fake Maven Central Repository</name>
<url>file://dummy</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t05-b</artifactId>
<version>1.0</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,24 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-test</groupId>
<artifactId>t05-b</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<dependencies>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t05-c</artifactId>
<version>1.0</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t05-d</artifactId>
<version>1.1</version>
<type>jar</type>
<scope>compile</scope>
<optional>false</optional>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,24 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-test</groupId>
<artifactId>t05-b</artifactId>
<packaging>jar</packaging>
<version>1.1</version>
<dependencies>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t05-c</artifactId>
<version>1.0</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t05-d</artifactId>
<version>1.1</version>
<type>jar</type>
<scope>compile</scope>
<optional>false</optional>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,24 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-test</groupId>
<artifactId>t05-b</artifactId>
<packaging>jar</packaging>
<version>2.0</version>
<dependencies>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t05-c</artifactId>
<version>1.0</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t05-d</artifactId>
<version>1.1</version>
<type>jar</type>
<scope>compile</scope>
<optional>false</optional>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,17 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-test</groupId>
<artifactId>t05-c</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<dependencies>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t05-d</artifactId>
<version>1.1</version>
<type>jar</type>
<scope>compile</scope>
<optional>true</optional>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,7 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-test</groupId>
<artifactId>t05-d</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
</project>

View File

@ -0,0 +1,7 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-test</groupId>
<artifactId>t05-d</artifactId>
<packaging>jar</packaging>
<version>1.1</version>
</project>

View File

@ -0,0 +1,7 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-test</groupId>
<artifactId>t05-d</artifactId>
<packaging>jar</packaging>
<version>1.2</version>
</project>

View File

@ -0,0 +1,54 @@
<project>
<parent>
<artifactId>p0</artifactId>
<groupId>maven-t05</groupId>
<version>1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-t05</groupId>
<artifactId>p1</artifactId>
<packaging>pom</packaging>
<name>p1</name>
<version>1.0</version>
<scm>
<url>scm-url</url>
</scm>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t05-b</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t05-d</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t05-a</artifactId>
<version>1.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t05-c</artifactId>
<version>1.0</version>
<scope>runtime</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<configuration>
<tasks><echo>${project.parent.basedir}</echo></tasks>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,36 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-t05</groupId>
<artifactId>p0</artifactId>
<packaging>pom</packaging>
<name>p0</name>
<version>1.0</version>
<organization>
<name>Codehaus</name>
</organization>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t05-a</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t05-b</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t05-c</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t05-d</artifactId>
<version>1.2</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>

View File

@ -0,0 +1,23 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-test</groupId>
<artifactId>t06-a</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<repositories>
<repository>
<id>central</id>
<name>Fake Maven Central Repository</name>
<url>file://dummy</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t06-b</artifactId>
<version>1.0</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,24 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-test</groupId>
<artifactId>t06-b</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<dependencies>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t06-c</artifactId>
<version>1.0</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t06-d</artifactId>
<version>1.1</version>
<type>jar</type>
<scope>compile</scope>
<optional>false</optional>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,24 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-test</groupId>
<artifactId>t06-b</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<dependencies>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t06-c</artifactId>
<version>1.0</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t06-d</artifactId>
<version>1.1</version>
<type>jar</type>
<scope>compile</scope>
<optional>false</optional>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,17 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-test</groupId>
<artifactId>t06-c</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<dependencies>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t06-d</artifactId>
<version>1.1</version>
<type>jar</type>
<scope>compile</scope>
<optional>true</optional>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,7 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-test</groupId>
<artifactId>t06-d</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
</project>

View File

@ -0,0 +1,7 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-test</groupId>
<artifactId>t06-d</artifactId>
<packaging>jar</packaging>
<version>1.1</version>
</project>

View File

@ -0,0 +1,7 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-test</groupId>
<artifactId>t06-d</artifactId>
<packaging>jar</packaging>
<version>1.2</version>
</project>

View File

@ -0,0 +1,54 @@
<project>
<parent>
<artifactId>p0</artifactId>
<groupId>maven-t06</groupId>
<version>1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-t06</groupId>
<artifactId>p1</artifactId>
<packaging>pom</packaging>
<name>p1</name>
<version>1.0</version>
<scm>
<url>scm-url</url>
</scm>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t06-b</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t06-d</artifactId>
<version>1.0</version>
<scope>test</scope>
<optional>false</optional>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t06-a</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t06-c</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<configuration>
<tasks><echo>${project.parent.basedir}</echo></tasks>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,37 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-t06</groupId>
<artifactId>p0</artifactId>
<packaging>pom</packaging>
<name>p0</name>
<version>1.0</version>
<organization>
<name>Codehaus</name>
</organization>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t06-a</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t06-b</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t06-c</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t06-d</artifactId>
<version>1.2</version>
<scope>test</scope>
<optional>false</optional>
</dependency>
</dependencies>
</dependencyManagement>
</project>

View File

@ -0,0 +1,23 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-test</groupId>
<artifactId>t07-a</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<repositories>
<repository>
<id>central</id>
<name>Fake Maven Central Repository</name>
<url>file://dummy</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t07-b</artifactId>
<version>1.0</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,24 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-test</groupId>
<artifactId>t07-b</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<dependencies>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t07-c</artifactId>
<version>1.0</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t07-d</artifactId>
<version>1.1</version>
<type>jar</type>
<scope>compile</scope>
<optional>true</optional>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,24 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-test</groupId>
<artifactId>t07-b</artifactId>
<packaging>jar</packaging>
<version>1.1</version>
<dependencies>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t07-c</artifactId>
<version>1.0</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t07-d</artifactId>
<version>1.1</version>
<type>jar</type>
<scope>compile</scope>
<optional>true</optional>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,17 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-test</groupId>
<artifactId>t07-c</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<dependencies>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t07-d</artifactId>
<version>1.1</version>
<type>jar</type>
<scope>compile</scope>
<optional>true</optional>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,7 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-test</groupId>
<artifactId>t07-d</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
</project>

View File

@ -0,0 +1,7 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-test</groupId>
<artifactId>t07-d</artifactId>
<packaging>jar</packaging>
<version>1.1</version>
</project>

View File

@ -0,0 +1,7 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-test</groupId>
<artifactId>t07-d</artifactId>
<packaging>jar</packaging>
<version>1.2</version>
</project>

View File

@ -0,0 +1,54 @@
<project>
<parent>
<artifactId>p0</artifactId>
<groupId>maven-t07</groupId>
<version>1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-t07</groupId>
<artifactId>p1</artifactId>
<packaging>pom</packaging>
<name>p1</name>
<version>1.0</version>
<scm>
<url>scm-url</url>
</scm>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t07-b</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t07-d</artifactId>
<version>1.0</version>
<scope>test</scope>
<optional>false</optional>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t07-a</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t07-c</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<configuration>
<tasks><echo>${project.parent.basedir}</echo></tasks>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,37 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-t07</groupId>
<artifactId>p0</artifactId>
<packaging>pom</packaging>
<name>p0</name>
<version>1.0</version>
<organization>
<name>Codehaus</name>
</organization>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t07-a</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t07-b</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t07-c</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t07-d</artifactId>
<version>1.2</version>
<scope>test</scope>
<optional>false</optional>
</dependency>
</dependencies>
</dependencyManagement>
</project>

View File

@ -0,0 +1,23 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-test</groupId>
<artifactId>t08-a</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<repositories>
<repository>
<id>central</id>
<name>Fake Maven Central Repository</name>
<url>file://dummy</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t08-b</artifactId>
<version>1.0</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,24 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-test</groupId>
<artifactId>t08-b</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<dependencies>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t08-c</artifactId>
<version>1.0</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t08-d</artifactId>
<version>1.1</version>
<type>jar</type>
<scope>compile</scope>
<optional>false</optional>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,24 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-test</groupId>
<artifactId>t08-b</artifactId>
<packaging>jar</packaging>
<version>1.1</version>
<dependencies>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t08-c</artifactId>
<version>1.0</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t08-d</artifactId>
<version>1.1</version>
<type>jar</type>
<scope>compile</scope>
<optional>false</optional>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,17 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-test</groupId>
<artifactId>t08-c</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<dependencies>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t08-d</artifactId>
<version>1.1</version>
<type>jar</type>
<scope>compile</scope>
<optional>true</optional>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,7 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-test</groupId>
<artifactId>t08-d</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
</project>

View File

@ -0,0 +1,7 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-test</groupId>
<artifactId>t08-d</artifactId>
<packaging>jar</packaging>
<version>1.1</version>
</project>

View File

@ -0,0 +1,7 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-test</groupId>
<artifactId>t08-d</artifactId>
<packaging>jar</packaging>
<version>1.2</version>
</project>

View File

@ -0,0 +1,59 @@
<project>
<parent>
<artifactId>p0</artifactId>
<groupId>maven-t08</groupId>
<version>1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-t08</groupId>
<artifactId>p1</artifactId>
<packaging>pom</packaging>
<name>p1</name>
<version>1.0</version>
<scm>
<url>scm-url</url>
</scm>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t08-b</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t08-d</artifactId>
<version>1.0</version>
<scope>test</scope>
<optional>true</optional>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t08-a</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t08-c</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t08-d</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<configuration>
<tasks><echo>${project.parent.basedir}</echo></tasks>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,37 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-t08</groupId>
<artifactId>p0</artifactId>
<packaging>pom</packaging>
<name>p0</name>
<version>1.0</version>
<organization>
<name>Codehaus</name>
</organization>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t08-a</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t08-b</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t08-c</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t08-d</artifactId>
<version>1.2</version>
<scope>test</scope>
<optional>false</optional>
</dependency>
</dependencies>
</dependencyManagement>
</project>

View File

@ -0,0 +1,24 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-test</groupId>
<artifactId>t09-a</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<repositories>
<repository>
<id>central</id>
<name>Fake Maven Central Repository</name>
<url>file://dummy</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t09-b</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,17 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-test</groupId>
<artifactId>t09-b</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<dependencies>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t09-c</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,7 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-test</groupId>
<artifactId>t09-c</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
</project>

View File

@ -0,0 +1,17 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-test</groupId>
<artifactId>t09-d</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<dependencies>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t09-c</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,36 @@
<project>
<parent>
<artifactId>p0</artifactId>
<groupId>maven-t09</groupId>
<version>1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>maven-t09</groupId>
<artifactId>p1</artifactId>
<packaging>pom</packaging>
<name>p1</name>
<version>1.0</version>
<scm>
<url>scm-url</url>
</scm>
<dependencies>
<dependency>
<groupId>maven-test</groupId>
<artifactId>t09-a</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<configuration>
<tasks><echo>${project.parent.basedir}</echo></tasks>
</configuration>
</plugin>
</plugins>
</build>
</project>

Some files were not shown because too many files have changed in this diff Show More