mirror of https://github.com/apache/maven.git
o Fixed file:// URL handling
git-svn-id: https://svn.apache.org/repos/asf/maven/components/branches/MNG-2766@775363 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7afb4637c8
commit
5a2ef49f1d
|
@ -42,8 +42,8 @@ public class MavenEmbedderBehaviorTest
|
||||||
|
|
||||||
MavenEmbedder maven = new MavenEmbedder( configuration );
|
MavenEmbedder maven = new MavenEmbedder( configuration );
|
||||||
|
|
||||||
String expectedPath = ( new File( "/global/maven/local-repository" ) ).getCanonicalPath();
|
File expectedPath = new File( "/global/maven/local-repository" ).getCanonicalFile();
|
||||||
String actualPath = maven.getLocalRepository().getBasedir();
|
File actualPath = new File( maven.getLocalRepository().getBasedir() );
|
||||||
assertEquals( expectedPath, actualPath );
|
assertEquals( expectedPath, actualPath );
|
||||||
|
|
||||||
maven.stop();
|
maven.stop();
|
||||||
|
|
|
@ -191,18 +191,11 @@ public class LegacyRepositorySystem
|
||||||
public ArtifactRepository createLocalRepository( File localRepository )
|
public ArtifactRepository createLocalRepository( File localRepository )
|
||||||
throws InvalidRepositoryException
|
throws InvalidRepositoryException
|
||||||
{
|
{
|
||||||
try
|
return createRepository( "file://" + localRepository.toURI().getRawPath(),
|
||||||
{
|
RepositorySystem.DEFAULT_LOCAL_REPO_ID, true,
|
||||||
return createRepository( localRepository.toURI().toURL().toString(),
|
ArtifactRepositoryPolicy.UPDATE_POLICY_ALWAYS, true,
|
||||||
RepositorySystem.DEFAULT_LOCAL_REPO_ID, true,
|
ArtifactRepositoryPolicy.UPDATE_POLICY_ALWAYS,
|
||||||
ArtifactRepositoryPolicy.UPDATE_POLICY_ALWAYS, true,
|
ArtifactRepositoryPolicy.CHECKSUM_POLICY_IGNORE );
|
||||||
ArtifactRepositoryPolicy.UPDATE_POLICY_ALWAYS,
|
|
||||||
ArtifactRepositoryPolicy.CHECKSUM_POLICY_IGNORE );
|
|
||||||
}
|
|
||||||
catch ( MalformedURLException e )
|
|
||||||
{
|
|
||||||
throw new InvalidRepositoryException( "Error creating local repository.", RepositorySystem.DEFAULT_LOCAL_REPO_ID, e );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArtifactRepository createDefaultRemoteRepository()
|
public ArtifactRepository createDefaultRemoteRepository()
|
||||||
|
|
Loading…
Reference in New Issue