o removing any notions of the local repository from MavenProject, not the

right place for it.


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@162967 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2004-08-12 17:55:48 +00:00
parent cc783005c1
commit 133a51a629
3 changed files with 0 additions and 56 deletions

View File

@ -4,7 +4,6 @@
import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.resolver.ArtifactResolver;
import org.apache.maven.artifact.resolver.ArtifactResolutionException;
import org.apache.maven.model.Dependency;
import org.apache.maven.model.Model;
import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
@ -64,8 +63,6 @@ public Set retrieve( Artifact artifact )
try
{
// This is using the current format for the metadata
Artifact metadataArtifact = new DefaultArtifact( artifact.getGroupId(),
artifact.getArtifactId(),
artifact.getVersion(),
@ -80,7 +77,6 @@ public Set retrieve( Artifact artifact )
catch ( Exception e )
{
throw new ArtifactMetadataRetrievalException( "Cannot read artifact source: ", e );
}
return artifacts;

View File

@ -548,45 +548,9 @@ public boolean getBooleanProperty( String key )
return false;
}
/**
* @return
* @todo create something like MavenContants class and put "maven.repo.local"
* @todo In fact I am not sure if this object should be used for accessing the information
* where maven local repository is. There should be only one local repository and it
* should be shared between all projects. Probably we can have a component like
* MavenEnvinromnent which will contain all behavioral settings shared between projects.
* This component can read on the startup ${user.home}/build.properties file
* <p/>
* <p/>
* there
*/
public String getLocalRepository()
{
return getProperty( "maven.repo.local" );
}
public void setLocalRepository( String path )
{
properties.put( "maven.repo.local", path );
}
public List getRepositories()
{
return model.getRepositories();
}
public void addRepository( Repository repository )
{
model.getRepositories().add( repository );
}
public void addRepository( String url )
{
Repository repository = new Repository();
repository.setUrl( url );
addRepository( repository );
}
}

View File

@ -71,20 +71,4 @@ protected MavenProject buildProject( File f, ArtifactRepository localRepository
{
return buildProject( f, localRepository, false );
}
protected void initRemoteRepositories( MavenProject project )
{
//we will remove ibiblio
project.getRepositories().clear();
File repo_1 = new File( getBasedir(), "target/test-classes/remote-repo-1" );
File repo_2 = new File( getBasedir(), "target/test-classes/remote-repo-2" );
project.addRepository( "file://" + repo_1.getPath() );
project.addRepository( "file://" + repo_2.getPath() );
assertEquals( 2, project.getRepositories().size() );
}
}