Cleaning up faulty logic in MavenMetadataSource related to the last commit, and updating the it2001 test to (hopefully) straighten out the repository definitions.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@280761 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
John Dennis Casey 2005-09-14 04:13:38 +00:00
parent 5911c6c00f
commit 30ee4ffdcd
3 changed files with 10 additions and 9 deletions

View File

@ -0,0 +1,4 @@
<settings>
<localRepository>file:../target/local-repo</localRepository>
<usePluginRegistry>false</usePluginRegistry>
</settings>

View File

@ -10,13 +10,13 @@ echo "Installing 'b'"
(cd b && m2 --settings ../settings.xml install)
echo "Installing 'a'"
(cd a && m2 --settings ../settings.xml install)
(cd a && m2 --settings ../settings-norepo.xml install)
echo "Removing 'c' from local repository"
rm -Rf target/local-repository/org/apache/maven/it2001/c
echo "Re-running 'a' install"
(cd a && m2 --settings ../settings.xml install)
(cd a && m2 --settings ../settings-norepo.xml install)
echo "Cleaning up."
rm -Rf `find . -type d -name target`

View File

@ -181,12 +181,7 @@ public ResolutionGroup retrieve( Artifact artifact, ArtifactRepository localRepo
// if the project is null, we encountered an invalid model (read: m1 POM)
// we'll just return an empty resolution group.
// or used the inherited scope (should that be passed to the buildFromRepository method above?)
Set artifacts = project.createArtifacts( artifactFactory, artifact.getScope(),
artifact.getDependencyFilter() );
List repositories = aggregateRepositoryLists( remoteRepositories, project.getRemoteArtifactRepositories() );
result = new ResolutionGroup( pomArtifact, artifacts, repositories );
result = new ResolutionGroup( pomArtifact, Collections.EMPTY_SET, Collections.EMPTY_LIST );
}
else
{
@ -195,7 +190,9 @@ public ResolutionGroup retrieve( Artifact artifact, ArtifactRepository localRepo
Set artifacts = project.createArtifacts( artifactFactory, artifact.getScope(),
artifact.getDependencyFilter() );
result = new ResolutionGroup( pomArtifact, artifacts, project.getRemoteArtifactRepositories() );
List repositories = aggregateRepositoryLists( remoteRepositories, project.getRemoteArtifactRepositories() );
result = new ResolutionGroup( pomArtifact, artifacts, repositories );
}
return result;