From 0e5b8e2bf39ea88ae7371a7ddaaad9cd2bce0902 Mon Sep 17 00:00:00 2001 From: Benjamin Bentmann Date: Mon, 25 May 2009 08:10:18 +0000 Subject: [PATCH] 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 --- .../org/apache/maven/project/artifact/MavenMetadataSource.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java b/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java index 17cef53267..f11706c1c9 100644 --- a/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java +++ b/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java @@ -120,6 +120,8 @@ public class MavenMetadataSource dependencyArtifact = repositorySystem.createArtifact( d.getGroupId(), d.getArtifactId(), d.getVersion(), effectiveScope, d.getType() ); } + dependencyArtifact.setOptional( d.isOptional() ); + if ( Artifact.SCOPE_SYSTEM.equals( effectiveScope ) ) { dependencyArtifact.setFile( new File( d.getSystemPath() ) );