You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jv...@apache.org on 2009/05/11 22:50:06 UTC
svn commit: r773684 -
/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java
Author: jvanzyl
Date: Mon May 11 20:50:05 2009
New Revision: 773684
URL: http://svn.apache.org/viewvc?rev=773684&view=rev
Log:
o need to implement this method used by the assembly plugin
Modified:
maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java
Modified: maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java
URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java?rev=773684&r1=773683&r2=773684&view=diff
==============================================================================
--- maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java (original)
+++ maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java Mon May 11 20:50:05 2009
@@ -118,6 +118,24 @@
return new ResolutionGroup( pomArtifact, artifacts, remoteRepositories );
}
+ private Set<Artifact> createArtifacts( List<Dependency> dependencies )
+ {
+ Set<Artifact> artifacts = new LinkedHashSet<Artifact>();
+
+ for ( Dependency d : dependencies )
+ {
+ String effectiveScope = getEffectiveScope( d.getScope(), artifact.getScope() );
+
+ if ( effectiveScope != null )
+ {
+ Artifact dependencyArtifact = repositorySystem.createArtifact( d.getGroupId(), d.getArtifactId(), d.getVersion(), effectiveScope, d.getType() );
+
+ artifacts.add( dependencyArtifact );
+ }
+ }
+
+ }
+
private String getEffectiveScope( String originalScope, String inheritedScope )
{
String effectiveScope = Artifact.SCOPE_RUNTIME;
@@ -215,6 +233,7 @@
return versions;
}
+ /*
// USED BY MAVEN ASSEMBLY PLUGIN
@Deprecated
public static Set<Artifact> createArtifacts( ArtifactFactory artifactFactory, List<Dependency> dependencies, String inheritedScope, ArtifactFilter dependencyFilter, MavenProject project )
@@ -228,5 +247,6 @@
{
throw new InvalidDependencyVersionException( e.getProjectId(), e.getDependency(), e.getPomFile, e.getCauseException() );
}
- }
+ }
+ */
}