mirror of https://github.com/apache/maven.git
o Changed boolean field to String to enable both filtering and three-valued logic for proper merging
git-svn-id: https://svn.apache.org/repos/asf/maven/components/branches/MNG-2766@773283 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e8a45c2ce3
commit
1e303faceb
|
@ -1356,11 +1356,16 @@
|
|||
<field>
|
||||
<name>optional</name>
|
||||
<version>4.0.0</version>
|
||||
<description>Indicates the dependency is optional for use of this library. While the
|
||||
<description>
|
||||
<![CDATA[
|
||||
Indicates the dependency is optional for use of this library. While the
|
||||
version of the dependency will be taken into account for dependency calculation if the
|
||||
library is used elsewhere, it will not be passed on transitively.</description>
|
||||
<type>boolean</type>
|
||||
<defaultValue>false</defaultValue>
|
||||
library is used elsewhere, it will not be passed on transitively. Note: While the type
|
||||
of this field is <code>String</code> for technical reasons, the semantic type is actually
|
||||
<code>Boolean</code>. Default value is <code>false</code>.
|
||||
]]>
|
||||
</description>
|
||||
<type>String</type>
|
||||
</field>
|
||||
</fields>
|
||||
<codeSegments>
|
||||
|
@ -1382,6 +1387,16 @@
|
|||
<version>4.0.0</version>
|
||||
<code>
|
||||
<![CDATA[
|
||||
public boolean isOptional()
|
||||
{
|
||||
return ( optional != null ) ? Boolean.parseBoolean( optional ) : false;
|
||||
}
|
||||
|
||||
public void setOptional( boolean optional )
|
||||
{
|
||||
this.optional = String.valueOf( optional );
|
||||
}
|
||||
|
||||
/**
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue