mirror of https://github.com/apache/maven.git
move MavenMetadataSource to maven-project from maven-core
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@164391 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
23835350c8
commit
00d581599b
|
@ -46,7 +46,7 @@ public abstract class AbstractArtifactTask
|
||||||
{
|
{
|
||||||
ArtifactRepositoryLayout repositoryLayout = (ArtifactRepositoryLayout) lookup( ArtifactRepositoryLayout.ROLE,
|
ArtifactRepositoryLayout repositoryLayout = (ArtifactRepositoryLayout) lookup( ArtifactRepositoryLayout.ROLE,
|
||||||
repository.getLayout() );
|
repository.getLayout() );
|
||||||
return new ArtifactRepository( "remote", repository.getUrl(), repository.getAuthentication(), repositoryLayout );
|
return new ArtifactRepository( "remote", repository.getUrl(), repositoryLayout );
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Object lookup( String role )
|
protected Object lookup( String role )
|
||||||
|
|
|
@ -17,7 +17,6 @@ package org.apache.maven.artifact.ant;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import org.apache.maven.artifact.Artifact;
|
import org.apache.maven.artifact.Artifact;
|
||||||
import org.apache.maven.artifact.MavenMetadataSource;
|
|
||||||
import org.apache.maven.artifact.factory.ArtifactFactory;
|
import org.apache.maven.artifact.factory.ArtifactFactory;
|
||||||
import org.apache.maven.artifact.manager.WagonManager;
|
import org.apache.maven.artifact.manager.WagonManager;
|
||||||
import org.apache.maven.artifact.repository.ArtifactRepository;
|
import org.apache.maven.artifact.repository.ArtifactRepository;
|
||||||
|
@ -26,6 +25,7 @@ import org.apache.maven.artifact.resolver.ArtifactResolutionException;
|
||||||
import org.apache.maven.artifact.resolver.ArtifactResolutionResult;
|
import org.apache.maven.artifact.resolver.ArtifactResolutionResult;
|
||||||
import org.apache.maven.artifact.resolver.ArtifactResolver;
|
import org.apache.maven.artifact.resolver.ArtifactResolver;
|
||||||
import org.apache.maven.project.MavenProjectBuilder;
|
import org.apache.maven.project.MavenProjectBuilder;
|
||||||
|
import org.apache.maven.project.artifact.MavenMetadataSource;
|
||||||
import org.apache.tools.ant.BuildException;
|
import org.apache.tools.ant.BuildException;
|
||||||
import org.apache.tools.ant.types.FileList;
|
import org.apache.tools.ant.types.FileList;
|
||||||
import org.apache.tools.ant.types.Path;
|
import org.apache.tools.ant.types.Path;
|
||||||
|
|
|
@ -21,7 +21,7 @@ import org.apache.maven.artifact.DefaultArtifact;
|
||||||
import org.apache.maven.artifact.deployer.ArtifactDeployer;
|
import org.apache.maven.artifact.deployer.ArtifactDeployer;
|
||||||
import org.apache.maven.artifact.deployer.ArtifactDeploymentException;
|
import org.apache.maven.artifact.deployer.ArtifactDeploymentException;
|
||||||
import org.apache.maven.artifact.metadata.ArtifactMetadata;
|
import org.apache.maven.artifact.metadata.ArtifactMetadata;
|
||||||
import org.apache.maven.artifact.metadata.MavenMetadata;
|
import org.apache.maven.artifact.metadata.ProjectArtifactMetadata;
|
||||||
import org.apache.maven.artifact.repository.ArtifactRepository;
|
import org.apache.maven.artifact.repository.ArtifactRepository;
|
||||||
import org.apache.maven.project.MavenProjectBuilder;
|
import org.apache.maven.project.MavenProjectBuilder;
|
||||||
import org.apache.tools.ant.BuildException;
|
import org.apache.tools.ant.BuildException;
|
||||||
|
@ -58,7 +58,7 @@ public class DeployTask
|
||||||
boolean isPomArtifact = "pom".equals( pom.getPackaging() );
|
boolean isPomArtifact = "pom".equals( pom.getPackaging() );
|
||||||
if ( !isPomArtifact )
|
if ( !isPomArtifact )
|
||||||
{
|
{
|
||||||
ArtifactMetadata metadata = new MavenMetadata( artifact, pom.getFile() );
|
ArtifactMetadata metadata = new ProjectArtifactMetadata( artifact, pom.getFile() );
|
||||||
artifact.addMetadata( metadata );
|
artifact.addMetadata( metadata );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ import org.apache.maven.artifact.DefaultArtifact;
|
||||||
import org.apache.maven.artifact.installer.ArtifactInstallationException;
|
import org.apache.maven.artifact.installer.ArtifactInstallationException;
|
||||||
import org.apache.maven.artifact.installer.ArtifactInstaller;
|
import org.apache.maven.artifact.installer.ArtifactInstaller;
|
||||||
import org.apache.maven.artifact.metadata.ArtifactMetadata;
|
import org.apache.maven.artifact.metadata.ArtifactMetadata;
|
||||||
import org.apache.maven.artifact.metadata.MavenMetadata;
|
import org.apache.maven.artifact.metadata.ProjectArtifactMetadata;
|
||||||
import org.apache.maven.artifact.repository.ArtifactRepository;
|
import org.apache.maven.artifact.repository.ArtifactRepository;
|
||||||
import org.apache.maven.project.MavenProjectBuilder;
|
import org.apache.maven.project.MavenProjectBuilder;
|
||||||
import org.apache.tools.ant.BuildException;
|
import org.apache.tools.ant.BuildException;
|
||||||
|
@ -55,7 +55,7 @@ public class InstallTask
|
||||||
boolean isPomArtifact = "pom".equals( pom.getPackaging() );
|
boolean isPomArtifact = "pom".equals( pom.getPackaging() );
|
||||||
if ( !isPomArtifact )
|
if ( !isPomArtifact )
|
||||||
{
|
{
|
||||||
ArtifactMetadata metadata = new MavenMetadata( artifact, pom.getFile() );
|
ArtifactMetadata metadata = new ProjectArtifactMetadata( artifact, pom.getFile() );
|
||||||
artifact.addMetadata( metadata );
|
artifact.addMetadata( metadata );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,6 @@ package org.apache.maven.plugin;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import org.apache.maven.artifact.Artifact;
|
import org.apache.maven.artifact.Artifact;
|
||||||
import org.apache.maven.artifact.MavenMetadataSource;
|
|
||||||
import org.apache.maven.artifact.factory.ArtifactFactory;
|
import org.apache.maven.artifact.factory.ArtifactFactory;
|
||||||
import org.apache.maven.artifact.resolver.ArtifactResolutionException;
|
import org.apache.maven.artifact.resolver.ArtifactResolutionException;
|
||||||
import org.apache.maven.artifact.resolver.ArtifactResolutionResult;
|
import org.apache.maven.artifact.resolver.ArtifactResolutionResult;
|
||||||
|
@ -34,6 +33,7 @@ import org.apache.maven.plugin.descriptor.PluginDescriptor;
|
||||||
import org.apache.maven.plugin.descriptor.PluginDescriptorBuilder;
|
import org.apache.maven.plugin.descriptor.PluginDescriptorBuilder;
|
||||||
import org.apache.maven.project.MavenProject;
|
import org.apache.maven.project.MavenProject;
|
||||||
import org.apache.maven.project.MavenProjectBuilder;
|
import org.apache.maven.project.MavenProjectBuilder;
|
||||||
|
import org.apache.maven.project.artifact.MavenMetadataSource;
|
||||||
import org.apache.maven.project.path.PathTranslator;
|
import org.apache.maven.project.path.PathTranslator;
|
||||||
import org.codehaus.plexus.ArtifactEnabledContainer;
|
import org.codehaus.plexus.ArtifactEnabledContainer;
|
||||||
import org.codehaus.plexus.ArtifactEnabledContainerException;
|
import org.codehaus.plexus.ArtifactEnabledContainerException;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.apache.maven.artifact;
|
package org.apache.maven.project.artifact;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright 2001-2005 The Apache Software Foundation.
|
* Copyright 2001-2005 The Apache Software Foundation.
|
||||||
|
@ -21,9 +21,9 @@ import org.apache.maven.artifact.factory.DefaultArtifactFactory;
|
||||||
import org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException;
|
import org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException;
|
||||||
import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
|
import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
|
||||||
import org.apache.maven.artifact.repository.ArtifactRepository;
|
import org.apache.maven.artifact.repository.ArtifactRepository;
|
||||||
import org.apache.maven.artifact.repository.layout.ArtifactPathFormatException;
|
|
||||||
import org.apache.maven.artifact.resolver.ArtifactResolutionException;
|
import org.apache.maven.artifact.resolver.ArtifactResolutionException;
|
||||||
import org.apache.maven.artifact.resolver.ArtifactResolver;
|
import org.apache.maven.artifact.resolver.ArtifactResolver;
|
||||||
|
import org.apache.maven.artifact.Artifact;
|
||||||
import org.apache.maven.model.Dependency;
|
import org.apache.maven.model.Dependency;
|
||||||
import org.apache.maven.model.Model;
|
import org.apache.maven.model.Model;
|
||||||
import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
|
import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
|
Loading…
Reference in New Issue