mirror of https://github.com/apache/maven.git
o Updated to aether:1.9
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@1055552 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
46967393a6
commit
f455bcef5c
|
@ -36,6 +36,9 @@ import org.sonatype.aether.metadata.Metadata;
|
||||||
import org.sonatype.aether.repository.LocalArtifactRegistration;
|
import org.sonatype.aether.repository.LocalArtifactRegistration;
|
||||||
import org.sonatype.aether.repository.LocalArtifactRequest;
|
import org.sonatype.aether.repository.LocalArtifactRequest;
|
||||||
import org.sonatype.aether.repository.LocalArtifactResult;
|
import org.sonatype.aether.repository.LocalArtifactResult;
|
||||||
|
import org.sonatype.aether.repository.LocalMetadataRegistration;
|
||||||
|
import org.sonatype.aether.repository.LocalMetadataRequest;
|
||||||
|
import org.sonatype.aether.repository.LocalMetadataResult;
|
||||||
import org.sonatype.aether.repository.LocalRepository;
|
import org.sonatype.aether.repository.LocalRepository;
|
||||||
import org.sonatype.aether.repository.LocalRepositoryManager;
|
import org.sonatype.aether.repository.LocalRepositoryManager;
|
||||||
import org.sonatype.aether.repository.RemoteRepository;
|
import org.sonatype.aether.repository.RemoteRepository;
|
||||||
|
@ -121,11 +124,41 @@ public class LegacyLocalRepositoryManager
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LocalMetadataResult find( RepositorySystemSession session, LocalMetadataRequest request )
|
||||||
|
{
|
||||||
|
Metadata metadata = request.getMetadata();
|
||||||
|
|
||||||
|
String path;
|
||||||
|
if ( request.getRepository() == null )
|
||||||
|
{
|
||||||
|
path = getPathForLocalMetadata( metadata );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
path = getPathForRemoteMetadata( metadata, request.getRepository(), request.getContext() );
|
||||||
|
}
|
||||||
|
|
||||||
|
File file = new File( getRepository().getBasedir(), path );
|
||||||
|
|
||||||
|
LocalMetadataResult result = new LocalMetadataResult( request );
|
||||||
|
if ( file.isFile() )
|
||||||
|
{
|
||||||
|
result.setFile( file );
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
public void add( RepositorySystemSession session, LocalArtifactRegistration request )
|
public void add( RepositorySystemSession session, LocalArtifactRegistration request )
|
||||||
{
|
{
|
||||||
// noop
|
// noop
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void add( RepositorySystemSession session, LocalMetadataRegistration request )
|
||||||
|
{
|
||||||
|
// noop
|
||||||
|
}
|
||||||
|
|
||||||
static class ArtifactMetadataAdapter
|
static class ArtifactMetadataAdapter
|
||||||
implements ArtifactMetadata
|
implements ArtifactMetadata
|
||||||
{
|
{
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -50,7 +50,7 @@
|
||||||
<cipherVersion>1.4</cipherVersion>
|
<cipherVersion>1.4</cipherVersion>
|
||||||
<modelloVersion>1.4</modelloVersion>
|
<modelloVersion>1.4</modelloVersion>
|
||||||
<jxpathVersion>1.3</jxpathVersion>
|
<jxpathVersion>1.3</jxpathVersion>
|
||||||
<aetherVersion>1.8</aetherVersion>
|
<aetherVersion>1.9</aetherVersion>
|
||||||
<maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
|
<maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue