o Changed boolean fiels 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@772758 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2009-05-07 20:06:41 +00:00
parent e4205f145a
commit 1e26baf0a1
3 changed files with 65 additions and 21 deletions

View File

@ -159,7 +159,7 @@ public class BuildProcessor
{ {
Resource r = new Resource(); Resource r = new Resource();
r.setDirectory( resource.getDirectory()); r.setDirectory( resource.getDirectory());
r.setFilteringValue( resource.getFilteringValue() ); r.setFiltering( resource.getFiltering() );
r.setMergeId( resource.getMergeId() ); r.setMergeId( resource.getMergeId() );
r.setTargetPath( resource.getTargetPath() ); r.setTargetPath( resource.getTargetPath() );
r.setExcludes( new ArrayList<String>(resource.getExcludes()) ); r.setExcludes( new ArrayList<String>(resource.getExcludes()) );

View File

@ -91,7 +91,7 @@ public class RepositoriesProcessor extends BaseProcessor
{ {
RepositoryPolicy p = new RepositoryPolicy(); RepositoryPolicy p = new RepositoryPolicy();
p.setChecksumPolicy( policy.getChecksumPolicy() ); p.setChecksumPolicy( policy.getChecksumPolicy() );
p.setEnabledValue(policy.getEnabledValue()); p.setEnabled(policy.getEnabled());
p.setUpdatePolicy( policy.getUpdatePolicy() ); p.setUpdatePolicy( policy.getUpdatePolicy() );
return p; return p;
} }

View File

@ -2116,14 +2116,16 @@
</description> </description>
<type>String</type> <type>String</type>
</field> </field>
<field xml.tagName="filtering"> <field>
<name>filteringValue</name> <name>filtering</name>
<version>3.0.0+</version> <version>3.0.0+</version>
<description> <description>
<![CDATA[ <![CDATA[
Whether resources are filtered to replace tokens with parameterised values or not. Whether resources are filtered to replace tokens with parameterised values or not.
The values are taken from the <code>properties</code> element and from the The values are taken from the <code>properties</code> element and from the
properties in the files listed in the <code>filters</code> element. properties in the files listed in the <code>filters</code> element. 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> </description>
<type>String</type> <type>String</type>
@ -2160,12 +2162,12 @@
public boolean isFiltering() public boolean isFiltering()
{ {
return ( filteringValue != null ) ? Boolean.parseBoolean( filteringValue ) : false; return ( filtering != null ) ? Boolean.parseBoolean( filtering ) : false;
} }
public void setFiltering( boolean filtering ) public void setFiltering( boolean filtering )
{ {
filteringValue = String.valueOf( filtering ); this.filtering = String.valueOf( filtering );
} }
/** /**
@ -2448,10 +2450,16 @@
<version>4.0.0</version> <version>4.0.0</version>
<description>Download policy.</description> <description>Download policy.</description>
<fields> <fields>
<field xml.tagName="enabled"> <field>
<name>enabledValue</name> <name>enabled</name>
<version>4.0.0</version> <version>4.0.0</version>
<description>Whether to use this repository for downloading this type of artifact.</description> <description>
<![CDATA[
Whether to use this repository for downloading this type of artifact. 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>true</code>.
]]>
</description>
<type>String</type> <type>String</type>
</field> </field>
<field> <field>
@ -2496,12 +2504,12 @@
public boolean isEnabled() public boolean isEnabled()
{ {
return ( enabledValue != null ) ? Boolean.parseBoolean( enabledValue ) : true; return ( enabled != null ) ? Boolean.parseBoolean( enabled ) : true;
} }
public void setEnabled( boolean enabled ) public void setEnabled( boolean enabled )
{ {
enabledValue = String.valueOf( enabled ); this.enabled = String.valueOf( enabled );
} }
]]> ]]>
@ -2554,7 +2562,13 @@
<field> <field>
<name>inherited</name> <name>inherited</name>
<version>4.0.0</version> <version>4.0.0</version>
<description>Whether any configuration should be propagated to child POMs.</description> <description>
<![CDATA[
Whether any configuration should be propagated to child POMs. 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>true</code>.
]]>
</description>
<type>String</type> <type>String</type>
</field> </field>
<field> <field>
@ -2617,10 +2631,15 @@
<field> <field>
<name>extensions</name> <name>extensions</name>
<version>4.0.0</version> <version>4.0.0</version>
<type>boolean</type> <type>String</type>
<description>Whether to load Maven extensions (such as packaging and type handlers) from <description>
this plugin. For performance reasons, this should only be enabled when necessary.</description> <![CDATA[
<defaultValue>false</defaultValue> Whether to load Maven extensions (such as packaging and type handlers) from
this plugin. For performance reasons, this should only be enabled when necessary. 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>
</field> </field>
<field> <field>
<name>executions</name> <name>executions</name>
@ -2658,6 +2677,16 @@
<version>4.0.0</version> <version>4.0.0</version>
<code> <code>
<![CDATA[ <![CDATA[
public boolean isExtensions()
{
return ( extensions != null ) ? Boolean.parseBoolean( extensions ) : true;
}
public void setExtensions( boolean extensions )
{
this.extensions = String.valueOf( extensions );
}
private java.util.Map<String, PluginExecution> executionMap = null; private java.util.Map<String, PluginExecution> executionMap = null;
/** /**
@ -2836,10 +2865,15 @@
<field> <field>
<name>excludeDefaults</name> <name>excludeDefaults</name>
<version>4.0.0</version> <version>4.0.0</version>
<type>boolean</type> <type>String</type>
<description>If true, then the default reports are not included in the site generation. <description>
This includes the reports in the "Project Info" menu.</description> <![CDATA[
<defaultValue>false</defaultValue> If true, then the default reports are not included in the site generation.
This includes the reports in the "Project Info" menu. 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>
</field> </field>
<field> <field>
<name>outputDirectory</name> <name>outputDirectory</name>
@ -2869,6 +2903,16 @@
<version>4.0.0</version> <version>4.0.0</version>
<code> <code>
<![CDATA[ <![CDATA[
public boolean isExcludeDefaults()
{
return ( excludeDefaults != null ) ? Boolean.parseBoolean( excludeDefaults ) : false;
}
public void setExcludeDefaults( boolean excludeDefaults )
{
this.excludeDefaults = String.valueOf( excludeDefaults );
}
java.util.Map<String, ReportPlugin> reportPluginMap; java.util.Map<String, ReportPlugin> reportPluginMap;
/** /**