mirror of https://github.com/apache/maven.git
clean the artifact factory interface a little
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@164172 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c289cf4f7f
commit
21d261f503
|
@ -131,6 +131,6 @@ public class MavenMetadataSource
|
|||
IoUtils.close( reader );
|
||||
}
|
||||
}
|
||||
return artifactFactory.createArtifacts( dependencies, localRepository, artifact.getScope() );
|
||||
return artifactFactory.createArtifacts( dependencies, artifact.getScope() );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,9 +27,7 @@ public interface ArtifactFactory
|
|||
{
|
||||
static String ROLE = ArtifactFactory.class.getName();
|
||||
|
||||
Set createArtifacts( List dependencies, ArtifactRepository localRepository, String inheritedScope );
|
||||
|
||||
Artifact createArtifact( Dependency dependency, ArtifactRepository localRepository, String inheritedScope );
|
||||
Set createArtifacts( List dependencies, String inheritedScope );
|
||||
|
||||
Artifact createArtifact( String groupId, String artifactId, String version, String scope, String type,
|
||||
String inheritedScope );
|
||||
|
|
|
@ -30,7 +30,7 @@ public class DefaultArtifactFactory
|
|||
extends ArtifactConstructionSupport
|
||||
implements ArtifactFactory
|
||||
{
|
||||
public Set createArtifacts( List dependencies, ArtifactRepository localRepository, String inheritedScope )
|
||||
public Set createArtifacts( List dependencies, String inheritedScope )
|
||||
{
|
||||
Set projectArtifacts = new HashSet();
|
||||
|
||||
|
@ -38,7 +38,7 @@ public class DefaultArtifactFactory
|
|||
{
|
||||
Dependency d = (Dependency) i.next();
|
||||
|
||||
Artifact artifact = createArtifact( d, localRepository, inheritedScope );
|
||||
Artifact artifact = createArtifact( d, inheritedScope );
|
||||
if ( artifact != null )
|
||||
{
|
||||
projectArtifacts.add( artifact );
|
||||
|
@ -48,7 +48,7 @@ public class DefaultArtifactFactory
|
|||
return projectArtifacts;
|
||||
}
|
||||
|
||||
public Artifact createArtifact( Dependency dependency, ArtifactRepository localRepository, String inheritedScope )
|
||||
private Artifact createArtifact( Dependency dependency, String inheritedScope )
|
||||
{
|
||||
return createArtifact( dependency.getGroupId(), dependency.getArtifactId(), dependency.getVersion(),
|
||||
dependency.getScope(), dependency.getType(), inheritedScope );
|
||||
|
|
|
@ -251,7 +251,7 @@ public class DefaultMavenProjectBuilder
|
|||
|
||||
project.setParent( parentProject );
|
||||
project.setRemoteArtifactRepositories( remoteRepositories );
|
||||
project.setArtifacts( artifactFactory.createArtifacts( project.getDependencies(), localRepository, null ) );
|
||||
project.setArtifacts( artifactFactory.createArtifacts( project.getDependencies(), null ) );
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// Typically when the project builder is being used from maven proper
|
||||
|
|
|
@ -77,7 +77,7 @@ public class ProjectClasspathArtifactResolver
|
|||
{
|
||||
IOUtil.close( r );
|
||||
}
|
||||
return artifactFactory.createArtifacts( model.getDependencies(), localRepository, artifact.getScope() );
|
||||
return artifactFactory.createArtifacts( model.getDependencies(), artifact.getScope() );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -34,10 +34,10 @@
|
|||
<!-- TODO: versioning doc that discusses this -->
|
||||
</p>
|
||||
<p>
|
||||
User configuration is specified in
|
||||
<code>${user.home}/.m2/settings.xml</code>. A
|
||||
You can specify your user configuration in <code>${user.home}/.m2/settings.xml</code>. A
|
||||
<a href="settings-descriptor.html">full reference</a> to the
|
||||
configuration file is available. This section will show how to make some common configurations.
|
||||
Note that the file is not required - defaults will be used if it is not found.
|
||||
</p>
|
||||
<p style="font-weight: bold; font-size: larger">
|
||||
Configuring your Local Repository
|
||||
|
|
|
@ -97,6 +97,11 @@
|
|||
<p>
|
||||
This will do all of the steps - generating sources, compiling, copying resources, packaging and finally installing.
|
||||
</p>
|
||||
<p>
|
||||
If you try that, you'll see that the file is copied to a directory under <code>~/.m2/repository</code>.
|
||||
This is also where all those downloaded files go - it is called your <i>local repository</i>.
|
||||
The location is configurable - see <a href="configuration.html">Configuration</a> for more information.
|
||||
</p>
|
||||
<!-- TODO
|
||||
<p>
|
||||
For more information on the lifecycle, see the <a href="lifecycle.html">Build Lifecycle</a>.
|
||||
|
@ -106,6 +111,10 @@
|
|||
You can run other standalone goals as well, for example:
|
||||
</p>
|
||||
<source>m2 clean:clean install</source>
|
||||
<p>
|
||||
This will remove the <code>target</code> directory with all the build data before starting so that it is
|
||||
fresh.
|
||||
</p>
|
||||
<p>
|
||||
Perhaps you'd like to generate an IntelliJ IDEA descriptor for the project?
|
||||
</p>
|
||||
|
|
Loading…
Reference in New Issue