o Fixed handling of optional dependencies

git-svn-id: https://svn.apache.org/repos/asf/maven/components/branches/MNG-2766@778344 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2009-05-25 08:10:18 +00:00
parent 88aa26ab45
commit 0e5b8e2bf3
1 changed files with 2 additions and 0 deletions

View File

@ -120,6 +120,8 @@ public class MavenMetadataSource
dependencyArtifact = repositorySystem.createArtifact( d.getGroupId(), d.getArtifactId(), d.getVersion(), effectiveScope, d.getType() ); dependencyArtifact = repositorySystem.createArtifact( d.getGroupId(), d.getArtifactId(), d.getVersion(), effectiveScope, d.getType() );
} }
dependencyArtifact.setOptional( d.isOptional() );
if ( Artifact.SCOPE_SYSTEM.equals( effectiveScope ) ) if ( Artifact.SCOPE_SYSTEM.equals( effectiveScope ) )
{ {
dependencyArtifact.setFile( new File( d.getSystemPath() ) ); dependencyArtifact.setFile( new File( d.getSystemPath() ) );