From 71aa8e7f51c693ca6543d185351b43e53113c35a Mon Sep 17 00:00:00 2001 From: Ralph Goers Date: Sun, 23 Sep 2007 07:20:24 +0000 Subject: [PATCH] Allow the managed dependencies of projects to be imported into the managed dependencies of other projects. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@578553 13f79535-47bb-0310-9956-ffa450edef68 --- .../project/DefaultMavenProjectBuilder.java | 63 +++++++++ .../AbstractProjectImportsTestCase.java | 53 +++++++ .../imports/t01/ProjectImportsTest.java | 130 ++++++++++++++++++ .../t01/maven-test/jars/maven-test-a-1.0.jar | 1 + .../t01/maven-test/jars/maven-test-a-1.1.jar | 1 + .../t01/maven-test/jars/maven-test-b-1.0.jar | 1 + .../t01/maven-test/jars/maven-test-b-1.1.jar | 1 + .../t01/maven-test/jars/maven-test-c-1.0.jar | 1 + .../t01/maven-test/jars/maven-test-c-1.1.jar | 1 + .../t01/maven-test/jars/maven-test-d-1.0.jar | 1 + .../t01/maven-test/jars/maven-test-d-1.1.jar | 1 + .../t01/maven-test/jars/maven-test-d-1.2.jar | 1 + .../t01/maven-test/poms/maven-test-a-1.0.pom | 14 ++ .../t01/maven-test/poms/maven-test-a-1.1.pom | 14 ++ .../t01/maven-test/poms/maven-test-b-1.0.pom | 7 + .../t01/maven-test/poms/maven-test-b-1.1.pom | 7 + .../t01/maven-test/poms/maven-test-c-1.0.pom | 7 + .../t01/maven-test/poms/maven-test-c-1.1.pom | 7 + .../t01/maven-test/poms/maven-test-d-1.0.pom | 7 + .../t01/maven-test/poms/maven-test-d-1.1.pom | 7 + .../t01/maven-test/poms/maven-test-d-1.2.pom | 7 + .../resources/imports-repo/t01/p0/p1/pom.xml | 45 ++++++ .../resources/imports-repo/t01/p0/p2/pom.xml | 56 ++++++++ .../resources/imports-repo/t01/p0/p3/pom.xml | 59 ++++++++ .../resources/imports-repo/t01/p0/p4/pom.xml | 67 +++++++++ .../resources/imports-repo/t01/p0/pom.xml | 26 ++++ 26 files changed, 585 insertions(+) create mode 100644 maven-project/src/test/java/org/apache/maven/project/imports/AbstractProjectImportsTestCase.java create mode 100644 maven-project/src/test/java/org/apache/maven/project/imports/t01/ProjectImportsTest.java create mode 100644 maven-project/src/test/resources/imports-repo/t01/maven-test/jars/maven-test-a-1.0.jar create mode 100644 maven-project/src/test/resources/imports-repo/t01/maven-test/jars/maven-test-a-1.1.jar create mode 100644 maven-project/src/test/resources/imports-repo/t01/maven-test/jars/maven-test-b-1.0.jar create mode 100644 maven-project/src/test/resources/imports-repo/t01/maven-test/jars/maven-test-b-1.1.jar create mode 100644 maven-project/src/test/resources/imports-repo/t01/maven-test/jars/maven-test-c-1.0.jar create mode 100644 maven-project/src/test/resources/imports-repo/t01/maven-test/jars/maven-test-c-1.1.jar create mode 100644 maven-project/src/test/resources/imports-repo/t01/maven-test/jars/maven-test-d-1.0.jar create mode 100644 maven-project/src/test/resources/imports-repo/t01/maven-test/jars/maven-test-d-1.1.jar create mode 100644 maven-project/src/test/resources/imports-repo/t01/maven-test/jars/maven-test-d-1.2.jar create mode 100644 maven-project/src/test/resources/imports-repo/t01/maven-test/poms/maven-test-a-1.0.pom create mode 100644 maven-project/src/test/resources/imports-repo/t01/maven-test/poms/maven-test-a-1.1.pom create mode 100644 maven-project/src/test/resources/imports-repo/t01/maven-test/poms/maven-test-b-1.0.pom create mode 100644 maven-project/src/test/resources/imports-repo/t01/maven-test/poms/maven-test-b-1.1.pom create mode 100644 maven-project/src/test/resources/imports-repo/t01/maven-test/poms/maven-test-c-1.0.pom create mode 100644 maven-project/src/test/resources/imports-repo/t01/maven-test/poms/maven-test-c-1.1.pom create mode 100644 maven-project/src/test/resources/imports-repo/t01/maven-test/poms/maven-test-d-1.0.pom create mode 100644 maven-project/src/test/resources/imports-repo/t01/maven-test/poms/maven-test-d-1.1.pom create mode 100644 maven-project/src/test/resources/imports-repo/t01/maven-test/poms/maven-test-d-1.2.pom create mode 100644 maven-project/src/test/resources/imports-repo/t01/p0/p1/pom.xml create mode 100644 maven-project/src/test/resources/imports-repo/t01/p0/p2/pom.xml create mode 100644 maven-project/src/test/resources/imports-repo/t01/p0/p3/pom.xml create mode 100644 maven-project/src/test/resources/imports-repo/t01/p0/p4/pom.xml create mode 100644 maven-project/src/test/resources/imports-repo/t01/p0/pom.xml diff --git a/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java b/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java index da08d95454..3fc2ea8e01 100644 --- a/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java +++ b/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java @@ -100,6 +100,7 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; +import java.util.TreeMap; /*:apt @@ -758,6 +759,8 @@ public class DefaultMavenProjectBuilder } } + mergeManagedDependencies(project.getModel(), localRepository, parentSearchRepositories); + try { project = processProjectLogic( pomLocation, project, externalProfileManager, projectDir, strict ); @@ -1107,6 +1110,66 @@ public class DefaultMavenProjectBuilder return result; } + private void mergeManagedDependencies(Model model, ArtifactRepository localRepository, List parentSearchRepositories) + throws ProjectBuildingException + { + DependencyManagement modelDepMgmt = model.getDependencyManagement(); + + if (modelDepMgmt != null) + { + Map depsMap = new TreeMap(); + Iterator iter = modelDepMgmt.getDependencies().iterator(); + boolean doInclude = false; + while (iter.hasNext()) + { + Dependency dep = (Dependency) iter.next(); + depsMap.put( dep.getManagementKey(), dep ); + if (dep.getType().equals("pom") && Artifact.SCOPE_IMPORT.equals(dep.getScope())) + { + doInclude = true; + } + } + Map newDeps = new TreeMap(depsMap); + iter = modelDepMgmt.getDependencies().iterator(); + if (doInclude) + { + while (iter.hasNext()) + { + Dependency dep = (Dependency)iter.next(); + if (dep.getType().equals("pom") && Artifact.SCOPE_IMPORT.equals(dep.getScope())) + { + Artifact artifact = artifactFactory.createProjectArtifact( dep.getGroupId(), dep.getArtifactId(), + dep.getVersion(), dep.getScope() ); + MavenProject project = buildFromRepository(artifact, parentSearchRepositories, localRepository, false); + + DependencyManagement depMgmt = project.getDependencyManagement(); + + if (depMgmt != null) + { + if ( getLogger().isDebugEnabled() ) + { + getLogger().debug( "Importing managed dependencies for " + dep.toString() ); + } + + for ( Iterator it = depMgmt.getDependencies().iterator(); it.hasNext(); ) + { + Dependency includedDep = (Dependency) it.next(); + String key = includedDep.getManagementKey(); + if (!newDeps.containsKey(key)) + { + newDeps.put( includedDep.getManagementKey(), includedDep ); + } + } + newDeps.remove(dep.getManagementKey()); + } + } + } + List deps = new ArrayList(newDeps.values()); + modelDepMgmt.setDependencies(deps); + } + } + } + private Model readModel( String projectId, File file, boolean strict ) diff --git a/maven-project/src/test/java/org/apache/maven/project/imports/AbstractProjectImportsTestCase.java b/maven-project/src/test/java/org/apache/maven/project/imports/AbstractProjectImportsTestCase.java new file mode 100644 index 0000000000..ec1fef53a2 --- /dev/null +++ b/maven-project/src/test/java/org/apache/maven/project/imports/AbstractProjectImportsTestCase.java @@ -0,0 +1,53 @@ +package org.apache.maven.project.imports; + +/* + * 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.project.AbstractMavenProjectTestCase; + +import java.io.File; + +/** + * @author Jason van Zyl + * @version $Id: AbstractProjectInheritanceTestCase.java 495147 2007-01-11 07:47:53Z jvanzyl $ + */ +public abstract class AbstractProjectImportsTestCase + extends AbstractMavenProjectTestCase +{ + protected String getTestSeries() + { + String className = getClass().getPackage().getName(); + + return className.substring( className.lastIndexOf( "." ) + 1 ); + } + + protected File projectFile( String name ) + { + return new File( getLocalRepositoryPath(), "/maven/poms/" + name + "-1.0.pom" ); + } + + // ---------------------------------------------------------------------- + // The local repository for this category of tests + // ---------------------------------------------------------------------- + + protected File getLocalRepositoryPath() + { + return getTestFile( "src/test/resources/imports-repo/" + getTestSeries() ); + } +} diff --git a/maven-project/src/test/java/org/apache/maven/project/imports/t01/ProjectImportsTest.java b/maven-project/src/test/java/org/apache/maven/project/imports/t01/ProjectImportsTest.java new file mode 100644 index 0000000000..9695023e3b --- /dev/null +++ b/maven-project/src/test/java/org/apache/maven/project/imports/t01/ProjectImportsTest.java @@ -0,0 +1,130 @@ +package org.apache.maven.project.imports.t01; + +/* + * 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.Map; + +import org.apache.maven.project.MavenProject; +import org.apache.maven.project.imports.AbstractProjectImportsTestCase; +import org.apache.maven.artifact.Artifact; + + +/** + * Verifies managed dependencies are imported into other projects correctly. + * + * @version $Id: $ + */ +public class ProjectImportsTest extends AbstractProjectImportsTestCase +{ + // ---------------------------------------------------------------------- + // + // p1 inherits from p0 + // p0 inhertis from super model + // + // or we can show it graphically as: + // + // p1 ---> p0 --> super model + // + // ---------------------------------------------------------------------- + + public void testDependencyManagementImportsVersions() throws Exception + { + File localRepo = getLocalRepositoryPath(); + File pom0 = new File( localRepo, "p0/pom.xml" ); + File pom0Basedir = pom0.getParentFile(); + System.out.println("basedir " + pom0Basedir.getAbsolutePath()); + File pom1 = new File( pom0Basedir, "p1/pom.xml" ); + File pom2 = new File( pom0Basedir, "p2/pom.xml" ); + File pom3 = new File( pom0Basedir, "p3/pom.xml" ); + File pom4 = new File( pom0Basedir, "p4/pom.xml" ); + getProjectWithDependencies( pom0 ); + + // 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); + + Artifact a = (Artifact) map.get("maven-test:maven-test-a"); + Artifact b = (Artifact) map.get("maven-test:maven-test-b"); + + assertTrue("Incorrect version for " + a.getDependencyConflictId(), a.getVersion().equals("1.0")); + assertTrue("Incorrect version for " + b.getDependencyConflictId(), b.getVersion().equals("1.0")); + + // load the child project, which inherits from p0... + // MavenProject project0 = getProjectWithDependencies( pom0 ); + MavenProject project2 = getProjectWithDependencies( pom2 ); + + map = project2.getArtifactMap(); + assertNotNull("No artifacts", map); + assertTrue("No Artifacts", map.size() > 0); + assertTrue("Set size should be 3, is " + map.size(), map.size() == 3); + + a = (Artifact) map.get("maven-test:maven-test-a"); + b = (Artifact) map.get("maven-test:maven-test-b"); + Artifact c = (Artifact) map.get("maven-test:maven-test-c"); + + assertTrue("Incorrect version for " + a.getDependencyConflictId(), a.getVersion().equals("1.0")); + assertTrue("Incorrect version for " + b.getDependencyConflictId(), b.getVersion().equals("1.0")); + assertTrue("Incorrect version for " + c.getDependencyConflictId(), c.getVersion().equals("1.0")); + + // load the child project, which inherits from p0... + // MavenProject project0 = getProjectWithDependencies( pom0 ); + MavenProject project3 = getProjectWithDependencies( pom3 ); + + map = project3.getArtifactMap(); + assertNotNull("No artifacts", map); + assertTrue("No Artifacts", map.size() > 0); + assertTrue("Set size should be 3, is " + map.size(), map.size() == 3); + + a = (Artifact) map.get("maven-test:maven-test-a"); + c = (Artifact) map.get("maven-test:maven-test-c"); + Artifact d = (Artifact) map.get("maven-test:maven-test-d"); + + assertTrue("Incorrect version for " + a.getDependencyConflictId(), a.getVersion().equals("1.1")); + assertTrue("Incorrect version for " + c.getDependencyConflictId(), c.getVersion().equals("1.1")); + assertTrue("Incorrect version for " + d.getDependencyConflictId(), d.getVersion().equals("1.0")); + + // load the child project, which inherits from p0... + // MavenProject project0 = getProjectWithDependencies( pom0 ); + MavenProject project4 = getProjectWithDependencies( pom4 ); + + map = project4.getArtifactMap(); + assertNotNull("No artifacts", map); + assertTrue("No Artifacts", map.size() > 0); + assertTrue("Set size should be 4, is " + map.size(), map.size() == 4); + + a = (Artifact) map.get("maven-test:maven-test-a"); + b = (Artifact) map.get("maven-test:maven-test-b"); + c = (Artifact) map.get("maven-test:maven-test-c"); + d = (Artifact) map.get("maven-test:maven-test-d"); + + assertTrue("Incorrect version for " + a.getDependencyConflictId(), a.getVersion().equals("1.0")); + assertTrue("Incorrect version for " + b.getDependencyConflictId(), b.getVersion().equals("1.1")); + assertTrue("Incorrect version for " + c.getDependencyConflictId(), c.getVersion().equals("1.0")); + assertTrue("Incorrect version for " + d.getDependencyConflictId(), d.getVersion().equals("1.0")); + } +} \ No newline at end of file diff --git a/maven-project/src/test/resources/imports-repo/t01/maven-test/jars/maven-test-a-1.0.jar b/maven-project/src/test/resources/imports-repo/t01/maven-test/jars/maven-test-a-1.0.jar new file mode 100644 index 0000000000..257cc5642c --- /dev/null +++ b/maven-project/src/test/resources/imports-repo/t01/maven-test/jars/maven-test-a-1.0.jar @@ -0,0 +1 @@ +foo diff --git a/maven-project/src/test/resources/imports-repo/t01/maven-test/jars/maven-test-a-1.1.jar b/maven-project/src/test/resources/imports-repo/t01/maven-test/jars/maven-test-a-1.1.jar new file mode 100644 index 0000000000..257cc5642c --- /dev/null +++ b/maven-project/src/test/resources/imports-repo/t01/maven-test/jars/maven-test-a-1.1.jar @@ -0,0 +1 @@ +foo diff --git a/maven-project/src/test/resources/imports-repo/t01/maven-test/jars/maven-test-b-1.0.jar b/maven-project/src/test/resources/imports-repo/t01/maven-test/jars/maven-test-b-1.0.jar new file mode 100644 index 0000000000..257cc5642c --- /dev/null +++ b/maven-project/src/test/resources/imports-repo/t01/maven-test/jars/maven-test-b-1.0.jar @@ -0,0 +1 @@ +foo diff --git a/maven-project/src/test/resources/imports-repo/t01/maven-test/jars/maven-test-b-1.1.jar b/maven-project/src/test/resources/imports-repo/t01/maven-test/jars/maven-test-b-1.1.jar new file mode 100644 index 0000000000..257cc5642c --- /dev/null +++ b/maven-project/src/test/resources/imports-repo/t01/maven-test/jars/maven-test-b-1.1.jar @@ -0,0 +1 @@ +foo diff --git a/maven-project/src/test/resources/imports-repo/t01/maven-test/jars/maven-test-c-1.0.jar b/maven-project/src/test/resources/imports-repo/t01/maven-test/jars/maven-test-c-1.0.jar new file mode 100644 index 0000000000..257cc5642c --- /dev/null +++ b/maven-project/src/test/resources/imports-repo/t01/maven-test/jars/maven-test-c-1.0.jar @@ -0,0 +1 @@ +foo diff --git a/maven-project/src/test/resources/imports-repo/t01/maven-test/jars/maven-test-c-1.1.jar b/maven-project/src/test/resources/imports-repo/t01/maven-test/jars/maven-test-c-1.1.jar new file mode 100644 index 0000000000..257cc5642c --- /dev/null +++ b/maven-project/src/test/resources/imports-repo/t01/maven-test/jars/maven-test-c-1.1.jar @@ -0,0 +1 @@ +foo diff --git a/maven-project/src/test/resources/imports-repo/t01/maven-test/jars/maven-test-d-1.0.jar b/maven-project/src/test/resources/imports-repo/t01/maven-test/jars/maven-test-d-1.0.jar new file mode 100644 index 0000000000..257cc5642c --- /dev/null +++ b/maven-project/src/test/resources/imports-repo/t01/maven-test/jars/maven-test-d-1.0.jar @@ -0,0 +1 @@ +foo diff --git a/maven-project/src/test/resources/imports-repo/t01/maven-test/jars/maven-test-d-1.1.jar b/maven-project/src/test/resources/imports-repo/t01/maven-test/jars/maven-test-d-1.1.jar new file mode 100644 index 0000000000..257cc5642c --- /dev/null +++ b/maven-project/src/test/resources/imports-repo/t01/maven-test/jars/maven-test-d-1.1.jar @@ -0,0 +1 @@ +foo diff --git a/maven-project/src/test/resources/imports-repo/t01/maven-test/jars/maven-test-d-1.2.jar b/maven-project/src/test/resources/imports-repo/t01/maven-test/jars/maven-test-d-1.2.jar new file mode 100644 index 0000000000..257cc5642c --- /dev/null +++ b/maven-project/src/test/resources/imports-repo/t01/maven-test/jars/maven-test-d-1.2.jar @@ -0,0 +1 @@ +foo diff --git a/maven-project/src/test/resources/imports-repo/t01/maven-test/poms/maven-test-a-1.0.pom b/maven-project/src/test/resources/imports-repo/t01/maven-test/poms/maven-test-a-1.0.pom new file mode 100644 index 0000000000..93fc0d0b3e --- /dev/null +++ b/maven-project/src/test/resources/imports-repo/t01/maven-test/poms/maven-test-a-1.0.pom @@ -0,0 +1,14 @@ + + 4.0.0 + maven-test + maven-test-a + jar + 1.0 + + + central + Fake Maven Central Repository + file://dummy + + + \ No newline at end of file diff --git a/maven-project/src/test/resources/imports-repo/t01/maven-test/poms/maven-test-a-1.1.pom b/maven-project/src/test/resources/imports-repo/t01/maven-test/poms/maven-test-a-1.1.pom new file mode 100644 index 0000000000..a08308610b --- /dev/null +++ b/maven-project/src/test/resources/imports-repo/t01/maven-test/poms/maven-test-a-1.1.pom @@ -0,0 +1,14 @@ + + 4.0.0 + maven-test + maven-test-a + jar + 1.1 + + + central + Fake Maven Central Repository + file://dummy + + + \ No newline at end of file diff --git a/maven-project/src/test/resources/imports-repo/t01/maven-test/poms/maven-test-b-1.0.pom b/maven-project/src/test/resources/imports-repo/t01/maven-test/poms/maven-test-b-1.0.pom new file mode 100644 index 0000000000..c173c663de --- /dev/null +++ b/maven-project/src/test/resources/imports-repo/t01/maven-test/poms/maven-test-b-1.0.pom @@ -0,0 +1,7 @@ + + 4.0.0 + maven-test + maven-test-b + jar + 1.0 + \ No newline at end of file diff --git a/maven-project/src/test/resources/imports-repo/t01/maven-test/poms/maven-test-b-1.1.pom b/maven-project/src/test/resources/imports-repo/t01/maven-test/poms/maven-test-b-1.1.pom new file mode 100644 index 0000000000..fff241a19b --- /dev/null +++ b/maven-project/src/test/resources/imports-repo/t01/maven-test/poms/maven-test-b-1.1.pom @@ -0,0 +1,7 @@ + + 4.0.0 + maven-test + maven-test-b + jar + 1.1 + \ No newline at end of file diff --git a/maven-project/src/test/resources/imports-repo/t01/maven-test/poms/maven-test-c-1.0.pom b/maven-project/src/test/resources/imports-repo/t01/maven-test/poms/maven-test-c-1.0.pom new file mode 100644 index 0000000000..1f0497860f --- /dev/null +++ b/maven-project/src/test/resources/imports-repo/t01/maven-test/poms/maven-test-c-1.0.pom @@ -0,0 +1,7 @@ + + 4.0.0 + maven-test + maven-test-c + jar + 1.0 + \ No newline at end of file diff --git a/maven-project/src/test/resources/imports-repo/t01/maven-test/poms/maven-test-c-1.1.pom b/maven-project/src/test/resources/imports-repo/t01/maven-test/poms/maven-test-c-1.1.pom new file mode 100644 index 0000000000..8bd52514ce --- /dev/null +++ b/maven-project/src/test/resources/imports-repo/t01/maven-test/poms/maven-test-c-1.1.pom @@ -0,0 +1,7 @@ + + 4.0.0 + maven-test + maven-test-c + jar + 1.1 + \ No newline at end of file diff --git a/maven-project/src/test/resources/imports-repo/t01/maven-test/poms/maven-test-d-1.0.pom b/maven-project/src/test/resources/imports-repo/t01/maven-test/poms/maven-test-d-1.0.pom new file mode 100644 index 0000000000..ac6ef12ec5 --- /dev/null +++ b/maven-project/src/test/resources/imports-repo/t01/maven-test/poms/maven-test-d-1.0.pom @@ -0,0 +1,7 @@ + + 4.0.0 + maven-test + maven-test-d + jar + 1.0 + \ No newline at end of file diff --git a/maven-project/src/test/resources/imports-repo/t01/maven-test/poms/maven-test-d-1.1.pom b/maven-project/src/test/resources/imports-repo/t01/maven-test/poms/maven-test-d-1.1.pom new file mode 100644 index 0000000000..6e22f6083e --- /dev/null +++ b/maven-project/src/test/resources/imports-repo/t01/maven-test/poms/maven-test-d-1.1.pom @@ -0,0 +1,7 @@ + + 4.0.0 + maven-test + maven-test-d + jar + 1.1 + \ No newline at end of file diff --git a/maven-project/src/test/resources/imports-repo/t01/maven-test/poms/maven-test-d-1.2.pom b/maven-project/src/test/resources/imports-repo/t01/maven-test/poms/maven-test-d-1.2.pom new file mode 100644 index 0000000000..16f8d90515 --- /dev/null +++ b/maven-project/src/test/resources/imports-repo/t01/maven-test/poms/maven-test-d-1.2.pom @@ -0,0 +1,7 @@ + + 4.0.0 + maven-test + maven-test-d + jar + 1.2 + \ No newline at end of file diff --git a/maven-project/src/test/resources/imports-repo/t01/p0/p1/pom.xml b/maven-project/src/test/resources/imports-repo/t01/p0/p1/pom.xml new file mode 100644 index 0000000000..7bfca34249 --- /dev/null +++ b/maven-project/src/test/resources/imports-repo/t01/p0/p1/pom.xml @@ -0,0 +1,45 @@ + + + p0 + maven + 1.0 + + 4.0.0 + maven + p1 + pom + p1 + 1.0 + + scm-url + + + + + maven-test + maven-test-b + 1.0 + + + + + + maven-test + maven-test-a + + + maven-test + maven-test-b + + + + + + maven-antrun-plugin + + ${project.parent.basedir} + + + + + \ No newline at end of file diff --git a/maven-project/src/test/resources/imports-repo/t01/p0/p2/pom.xml b/maven-project/src/test/resources/imports-repo/t01/p0/p2/pom.xml new file mode 100644 index 0000000000..b45ce9c618 --- /dev/null +++ b/maven-project/src/test/resources/imports-repo/t01/p0/p2/pom.xml @@ -0,0 +1,56 @@ + + + p0 + maven + 1.0 + + 4.0.0 + maven + p2 + pom + p2 + 1.0 + + scm-url + + + + + maven + p1 + 1.0 + pom + import + + + maven-test + maven-test-c + 1.0 + + + + + + maven-test + maven-test-a + + + maven-test + maven-test-b + + + maven-test + maven-test-c + + + + + + maven-antrun-plugin + + ${project.parent.basedir} + + + + + \ No newline at end of file diff --git a/maven-project/src/test/resources/imports-repo/t01/p0/p3/pom.xml b/maven-project/src/test/resources/imports-repo/t01/p0/p3/pom.xml new file mode 100644 index 0000000000..e9648e393d --- /dev/null +++ b/maven-project/src/test/resources/imports-repo/t01/p0/p3/pom.xml @@ -0,0 +1,59 @@ + + + p0 + maven + 1.0 + + 4.0.0 + maven + p3 + pom + p3 + 1.0 + + scm-url + + + + + maven-test + maven-test-a + 1.1 + + + maven-test + maven-test-c + 1.1 + + + maven-test + maven-test-d + 1.0 + + + + + + maven-test + maven-test-a + + + maven-test + maven-test-c + + + maven-test + maven-test-d + + + + + + maven-antrun-plugin + + ${project.parent.basedir} + + + + + \ No newline at end of file diff --git a/maven-project/src/test/resources/imports-repo/t01/p0/p4/pom.xml b/maven-project/src/test/resources/imports-repo/t01/p0/p4/pom.xml new file mode 100644 index 0000000000..7ffef9d727 --- /dev/null +++ b/maven-project/src/test/resources/imports-repo/t01/p0/p4/pom.xml @@ -0,0 +1,67 @@ + + + p0 + maven + 1.0 + + 4.0.0 + maven + p4 + pom + p4 + 1.0 + + scm-url + + + + + maven + p2 + 1.0 + pom + import + + + maven + p3 + 1.0 + pom + import + + + maven-test + maven-test-b + 1.1 + + + + + + maven-test + maven-test-a + + + maven-test + maven-test-b + + + maven-test + maven-test-c + + + maven-test + maven-test-d + + + + + + maven-antrun-plugin + + ${project.parent.basedir} + + + + + \ No newline at end of file diff --git a/maven-project/src/test/resources/imports-repo/t01/p0/pom.xml b/maven-project/src/test/resources/imports-repo/t01/p0/pom.xml new file mode 100644 index 0000000000..3ccf7e6336 --- /dev/null +++ b/maven-project/src/test/resources/imports-repo/t01/p0/pom.xml @@ -0,0 +1,26 @@ + + 4.0.0 + maven + p0 + pom + p0 + 1.0 + + Codehaus + + + + + maven-test + maven-test-a + 1.0 + + + + + p1 + p2 + p3 + p4 + + \ No newline at end of file