You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jd...@apache.org on 2006/07/24 21:38:35 UTC
svn commit: r425157 - in /maven/shared/trunk/file-management: pom.xml
src/main/java/org/apache/maven/shared/model/fileset/util/FileSetManager.java
src/main/mdo/fileset.mdo
Author: jdcasey
Date: Mon Jul 24 12:38:35 2006
New Revision: 425157
URL: http://svn.apache.org/viewvc?rev=425157&view=rev
Log:
Fixing inclusion stuff.
Modified:
maven/shared/trunk/file-management/pom.xml
maven/shared/trunk/file-management/src/main/java/org/apache/maven/shared/model/fileset/util/FileSetManager.java
maven/shared/trunk/file-management/src/main/mdo/fileset.mdo
Modified: maven/shared/trunk/file-management/pom.xml
URL: http://svn.apache.org/viewvc/maven/shared/trunk/file-management/pom.xml?rev=425157&r1=425156&r2=425157&view=diff
==============================================================================
--- maven/shared/trunk/file-management/pom.xml (original)
+++ maven/shared/trunk/file-management/pom.xml Mon Jul 24 12:38:35 2006
@@ -35,7 +35,7 @@
</execution>
</executions>
<configuration>
- <version>1.0.0</version>
+ <version>1.1.0</version>
</configuration>
</plugin>
</plugins>
Modified: maven/shared/trunk/file-management/src/main/java/org/apache/maven/shared/model/fileset/util/FileSetManager.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/file-management/src/main/java/org/apache/maven/shared/model/fileset/util/FileSetManager.java?rev=425157&r1=425156&r2=425157&view=diff
==============================================================================
--- maven/shared/trunk/file-management/src/main/java/org/apache/maven/shared/model/fileset/util/FileSetManager.java (original)
+++ maven/shared/trunk/file-management/src/main/java/org/apache/maven/shared/model/fileset/util/FileSetManager.java Mon Jul 24 12:38:35 2006
@@ -530,7 +530,7 @@
private DirectoryScanner scan( FileSet fileSet )
{
File basedir = new File( fileSet.getDirectory() );
- if ( !basedir.exists() )
+ if ( !basedir.exists() || !basedir.isDirectory() )
{
return null;
}
@@ -540,14 +540,19 @@
String[] includesArray = fileSet.getIncludesArray();
String[] excludesArray = fileSet.getExcludesArray();
- if ( includesArray.length < 1 && excludesArray.length < 1 )
+ if ( includesArray.length > 0 )
{
- scanner.setIncludes( new String[]{ "**" } );
+ scanner.setIncludes( includesArray );
}
- else
+
+ if ( excludesArray.length > 0 )
{
- scanner.setIncludes( includesArray );
scanner.setExcludes( excludesArray );
+ }
+
+ if ( fileSet.isUseDefaultExcludes() )
+ {
+ scanner.addDefaultExcludes();
}
scanner.setBasedir( basedir );
Modified: maven/shared/trunk/file-management/src/main/mdo/fileset.mdo
URL: http://svn.apache.org/viewvc/maven/shared/trunk/file-management/src/main/mdo/fileset.mdo?rev=425157&r1=425156&r2=425157&view=diff
==============================================================================
--- maven/shared/trunk/file-management/src/main/mdo/fileset.mdo (original)
+++ maven/shared/trunk/file-management/src/main/mdo/fileset.mdo Mon Jul 24 12:38:35 2006
@@ -20,11 +20,11 @@
<classes>
<class>
<name>SetBase</name>
- <version>1.0.0</version>
+ <version>1.1.0</version>
<fields>
<field>
<name>followSymlinks</name>
- <version>1.0.0</version>
+ <version>1.0.0+</version>
<type>boolean</type>
<default>false</default>
<description>
@@ -33,7 +33,7 @@
</field>
<field>
<name>outputDirectory</name>
- <version>1.0.0</version>
+ <version>1.0.0+</version>
<type>String</type>
<description>
Specifies the output directory relative to the root
@@ -42,8 +42,15 @@
</description>
</field>
<field>
+ <name>useDefaultExcludes</name>
+ <version>1.1.0</version>
+ <type>boolean</type>
+ <default>true</default>
+ <description>Whether to include exclusion patterns for common temporary and SCM control files (true by default).</description>
+ </field>
+ <field>
<name>includes</name>
- <version>1.0.0</version>
+ <version>1.0.0+</version>
<association>
<type>String</type>
<multiplicity>*</multiplicity>
@@ -57,7 +64,7 @@
</field>
<field>
<name>excludes</name>
- <version>1.0.0</version>
+ <version>1.0.0+</version>
<association>
<type>String</type>
<multiplicity>*</multiplicity>
@@ -71,7 +78,7 @@
</field>
<field>
<name>fileMode</name>
- <version>1.0.0</version>
+ <version>1.0.0+</version>
<type>String</type>
<defaultValue>0644</defaultValue>
<description>
@@ -86,7 +93,7 @@
</field>
<field>
<name>directoryMode</name>
- <version>1.0.0</version>
+ <version>1.0.0+</version>
<type>String</type>
<defaultValue>0755</defaultValue>
<description>
@@ -101,7 +108,7 @@
</field>
<field>
<name>mapper</name>
- <version>1.0.0</version>
+ <version>1.1.0</version>
<association>
<type>Mapper</type>
</association>
@@ -113,7 +120,7 @@
</fields>
<codeSegments>
<codeSegment>
- <version>1.0.0</version>
+ <version>1.0.0+</version>
<code><![CDATA[
/**
* Return the file-set inclusion rules in array form.
@@ -124,8 +131,7 @@
java.util.Collection includes = getIncludes();
if ( includes != null && !includes.isEmpty() )
{
- includesArry = new String[includes.size()];
- includesArry = (String[]) includes.toArray( includesArry );
+ includesArry = (String[]) includes.toArray( new String[0] );
}
else if ( includes != null )
{
@@ -144,8 +150,7 @@
java.util.Collection excludes = getExcludes();
if ( excludes != null && !excludes.isEmpty() )
{
- excludesArry = new String[excludes.size()];
- excludesArry = (String[]) excludes.toArray( excludesArry );
+ excludesArry = (String[]) excludes.toArray( new String[0] );
}
else if ( excludes != null )
{
@@ -161,11 +166,11 @@
</class>
<class>
<name>Mapper</name>
- <version>1.0.0</version>
+ <version>1.1.0</version>
<fields>
<field>
<name>type</name>
- <version>1.0.0</version>
+ <version>1.1.0</version>
<type>String</type>
<defaultValue>identity</defaultValue>
<description>
@@ -187,7 +192,7 @@
</field>
<field>
<name>from</name>
- <version>1.0.0</version>
+ <version>1.1.0</version>
<type>String</type>
<description>
the from attribute for the given implementation. Depends on the implementation
@@ -195,7 +200,7 @@
</field>
<field>
<name>to</name>
- <version>1.0.0</version>
+ <version>1.1.0</version>
<type>String</type>
<description>
the to attribute for the given implementation. Depends on the implementation
@@ -203,7 +208,7 @@
</field>
<field>
<name>classname</name>
- <version>1.0.0</version>
+ <version>1.1.0</version>
<type>String</type>
<description>
Specify your own implementation of the mapper. The class has to be in the classpath of the project.
@@ -214,7 +219,7 @@
</class>
<class rootElement="true" xml.tagName="fileSet">
<name>FileSet</name>
- <version>1.0.0</version>
+ <version>1.1.0</version>
<superClass>SetBase</superClass>
<description>
Defines the rules for matching and working with files in a given base directory.
@@ -222,7 +227,7 @@
<fields>
<field>
<name>directory</name>
- <version>1.0.0</version>
+ <version>1.0.0+</version>
<type>String</type>
<description>
Absolute or relative from the module's directory. For
@@ -233,7 +238,7 @@
</field>
<field>
<name>lineEnding</name>
- <version>1.0.0</version>
+ <version>1.0.0+</version>
<type>String</type>
<description>
<![CDATA[