You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by be...@apache.org on 2010/01/10 19:55:02 UTC
svn commit: r897682 - in /maven/plugins/trunk/maven-clean-plugin: ./
src/it/dangling-symlinks/ src/it/symlink-dont-follow/
src/it/symlink-dont-follow/ext/ src/it/symlink-dont-follow/ext/dir/
src/it/symlink-dont-follow/target/ src/it/symlink-dont-follow...
Author: bentmann
Date: Sun Jan 10 18:55:01 2010
New Revision: 897682
URL: http://svn.apache.org/viewvc?rev=897682&view=rev
Log:
[MCLEAN-39] followSymLinks is always set to true
[MCLEAN-32] Out of Memory Error cleaning target directory with *large* number of sub-directories
Added:
maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/
maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/ext/
maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/ext/dir/
maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/ext/dir/file.txt (with props)
maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/ext/file.txt (with props)
maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/pom.xml (with props)
maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/setup.bsh (with props)
maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/target/
maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/target/dummy.txt (with props)
maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/target2/
maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/target2/dummy.txt (with props)
maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/verify.bsh (with props)
maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/Cleaner.java (with props)
maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/GlobSelector.java (with props)
maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/Selector.java (with props)
maven/plugins/trunk/maven-clean-plugin/src/test/java/org/apache/maven/plugin/clean/Utils.java (with props)
Removed:
maven/plugins/trunk/maven-clean-plugin/src/test/java/org/apache/maven/plugin/clean/stubs/
Modified:
maven/plugins/trunk/maven-clean-plugin/pom.xml
maven/plugins/trunk/maven-clean-plugin/src/it/dangling-symlinks/pom.xml
maven/plugins/trunk/maven-clean-plugin/src/it/dangling-symlinks/setup.bsh
maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/CleanMojo.java
maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/Fileset.java
maven/plugins/trunk/maven-clean-plugin/src/test/resources/unit/basic-clean-test/plugin-pom.xml
maven/plugins/trunk/maven-clean-plugin/src/test/resources/unit/empty-clean-test/plugin-pom.xml
maven/plugins/trunk/maven-clean-plugin/src/test/resources/unit/fileset-clean-test/plugin-pom.xml
maven/plugins/trunk/maven-clean-plugin/src/test/resources/unit/invalid-directory-test/plugin-pom.xml
maven/plugins/trunk/maven-clean-plugin/src/test/resources/unit/locked-file-test/plugin-pom.xml
maven/plugins/trunk/maven-clean-plugin/src/test/resources/unit/missing-directory-test/plugin-pom.xml
maven/plugins/trunk/maven-clean-plugin/src/test/resources/unit/nested-clean-test/plugin-pom.xml
Modified: maven/plugins/trunk/maven-clean-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/pom.xml?rev=897682&r1=897681&r2=897682&view=diff
==============================================================================
--- maven/plugins/trunk/maven-clean-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-clean-plugin/pom.xml Sun Jan 10 18:55:01 2010
@@ -25,7 +25,7 @@
<parent>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugins</artifactId>
- <version>14</version>
+ <version>16</version>
</parent>
<artifactId>maven-clean-plugin</artifactId>
@@ -61,20 +61,10 @@
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
- <artifactId>maven-project</artifactId>
- <version>2.0.6</version>
- </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0.6</version>
</dependency>
<dependency>
- <groupId>org.apache.maven.shared</groupId>
- <artifactId>file-management</artifactId>
- <version>1.2.1</version>
- </dependency>
- <dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>1.5.6</version>
@@ -96,9 +86,10 @@
<plugins>
<plugin>
<artifactId>maven-invoker-plugin</artifactId>
- <version>1.4</version>
+ <version>1.5</version>
<configuration>
<debug>true</debug>
+ <addTestClassPath>true</addTestClassPath>
<projectsDirectory>src/it</projectsDirectory>
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
<pomIncludes>
Modified: maven/plugins/trunk/maven-clean-plugin/src/it/dangling-symlinks/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/it/dangling-symlinks/pom.xml?rev=897682&r1=897681&r2=897682&view=diff
==============================================================================
--- maven/plugins/trunk/maven-clean-plugin/src/it/dangling-symlinks/pom.xml (original)
+++ maven/plugins/trunk/maven-clean-plugin/src/it/dangling-symlinks/pom.xml Sun Jan 10 18:55:01 2010
@@ -28,7 +28,7 @@
<artifactId>dangling-symlinks</artifactId>
<version>1.0-SNAPSHOT</version>
- <description>Check for proper cleaning of dangling symlinks.</description>
+ <description>Check for proper cleaning of dangling symlinks (MCLEAN-28).</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Modified: maven/plugins/trunk/maven-clean-plugin/src/it/dangling-symlinks/setup.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/it/dangling-symlinks/setup.bsh?rev=897682&r1=897681&r2=897682&view=diff
==============================================================================
--- maven/plugins/trunk/maven-clean-plugin/src/it/dangling-symlinks/setup.bsh (original)
+++ maven/plugins/trunk/maven-clean-plugin/src/it/dangling-symlinks/setup.bsh Sun Jan 10 18:55:01 2010
@@ -2,22 +2,7 @@
import java.util.*;
import java.util.jar.*;
import java.util.regex.*;
-
-boolean createSymlink( File link, File target )
-{
- try
- {
- String[] args = { "ln", "-s", target.getAbsolutePath(), link.getAbsolutePath() };
- Process process = Runtime.getRuntime().exec( args );
- process.waitFor();
- return 0 == process.exitValue();
- }
- catch ( Exception e )
- {
- // assume platform does not support "ln" command, test should be skipped
- return false;
- }
-}
+import org.apache.maven.plugin.clean.*;
try
{
@@ -26,7 +11,7 @@
File target = new File( targetDir, "link-target.txt" );
System.out.println( "Creating symlink " + link + " -> " + target );
- if ( !createSymlink( link, target ) )
+ if ( !Utils.createSymlink( target, link ) || !link.exists() )
{
System.out.println( "FAILURE, platform does not support symlinks, skipping test." );
}
Added: maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/ext/dir/file.txt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/ext/dir/file.txt?rev=897682&view=auto
==============================================================================
(empty)
Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/ext/dir/file.txt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/ext/dir/file.txt
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/ext/file.txt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/ext/file.txt?rev=897682&view=auto
==============================================================================
(empty)
Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/ext/file.txt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/ext/file.txt
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/pom.xml?rev=897682&view=auto
==============================================================================
--- maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/pom.xml (added)
+++ maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/pom.xml Sun Jan 10 18:55:01 2010
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>test</groupId>
+ <artifactId>symlinks-dont-follow</artifactId>
+ <version>1.0-SNAPSHOT</version>
+
+ <description>Check that symlinks are not followed if requested (MCLEAN-39).</description>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-clean-plugin</artifactId>
+ <version>@project.version@</version>
+ <configuration>
+ <followSymLinks>false</followSymLinks>
+ <filesets>
+ <fileset>
+ <directory>target2</directory>
+ <followSymlinks>false</followSymlinks>
+ </fileset>
+ </filesets>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/setup.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/setup.bsh?rev=897682&view=auto
==============================================================================
--- maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/setup.bsh (added)
+++ maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/setup.bsh Sun Jan 10 18:55:01 2010
@@ -0,0 +1,25 @@
+import java.io.*;
+import java.util.*;
+import java.util.jar.*;
+import java.util.regex.*;
+import org.apache.maven.plugin.clean.*;
+
+String[][] pairs =
+{
+ { "ext/file.txt", "target/link.txt" },
+ { "ext/dir", "target/link" },
+ { "ext/file.txt", "target2/link.txt" },
+ { "ext/dir", "target2/link" },
+};
+
+for ( String[] pair : pairs )
+{
+ File target = new File( basedir, pair[0] );
+ File link = new File( basedir, pair[1] );
+ System.out.println( "Creating symlink " + link + " -> " + target );
+ if ( !Utils.createSymlink( target, link ) || !link.exists() )
+ {
+ System.out.println( "FAILURE, platform does not support symlinks, skipping test." );
+ return;
+ }
+}
Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/setup.bsh
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/setup.bsh
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/target/dummy.txt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/target/dummy.txt?rev=897682&view=auto
==============================================================================
(empty)
Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/target/dummy.txt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/target/dummy.txt
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/target2/dummy.txt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/target2/dummy.txt?rev=897682&view=auto
==============================================================================
(empty)
Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/target2/dummy.txt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/target2/dummy.txt
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/verify.bsh?rev=897682&view=auto
==============================================================================
--- maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/verify.bsh (added)
+++ maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/verify.bsh Sun Jan 10 18:55:01 2010
@@ -0,0 +1,41 @@
+import java.io.*;
+import java.util.*;
+import java.util.jar.*;
+import java.util.regex.*;
+
+String[] expected = {
+ "ext",
+ "ext/file.txt",
+ "ext/dir/file.txt",
+};
+
+for ( String path : expected )
+{
+ File file = new File( basedir, path );
+ System.out.println( "Checking for existence of " + file );
+ if ( !file.exists() )
+ {
+ System.out.println( "FAILURE!" );
+ return false;
+ }
+}
+
+String[] unexpected = {
+ "target/link.txt",
+ "target/link",
+ "target",
+ "target2/link.txt",
+ "target2/link",
+ "target2",
+};
+
+for ( String path : unexpected )
+{
+ File file = new File( basedir, path );
+ System.out.println( "Checking for absence of " + file );
+ if ( file.exists() )
+ {
+ System.out.println( "FAILURE!" );
+ return false;
+ }
+}
Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/verify.bsh
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/symlink-dont-follow/verify.bsh
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Modified: maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/CleanMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/CleanMojo.java?rev=897682&r1=897681&r2=897682&view=diff
==============================================================================
--- maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/CleanMojo.java (original)
+++ maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/CleanMojo.java Sun Jan 10 18:55:01 2010
@@ -21,15 +21,9 @@
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.project.MavenProject;
-import org.apache.maven.shared.model.fileset.FileSet;
-import org.apache.maven.shared.model.fileset.util.FileSetManager;
import java.io.File;
import java.io.IOException;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
/**
* Goal which cleans the build.
@@ -53,15 +47,6 @@
public class CleanMojo
extends AbstractMojo
{
- /**
- * The Maven Project Object.
- *
- * @parameter default-value="${project}"
- * @required
- * @readonly
- * @since 2.2
- */
- private MavenProject project;
/**
* This is where build results go.
@@ -115,25 +100,20 @@
* @parameter
* @since 2.1
*/
- private List filesets;
+ private Fileset[] filesets;
/**
- * Sets whether the plugin should follow symbolic links to delete files.
- *
+ * Sets whether the plugin should follow symbolic links while deleting files from the default output directories of
+ * the project. Not following symlinks requires more IO operations and heap memory, regardless whether symlinks are
+ * actually present. So projects with a huge output directory that knowingly does not contain symlinks can improve
+ * performance by setting this parameter to <code>true</code>.
+ *
* @parameter expression="${clean.followSymLinks}" default-value="false"
* @since 2.1
*/
private boolean followSymLinks;
/**
- * Finds and retrieves included and excluded files, and handles their
- * deletion
- *
- * @since 2.1
- */
- private FileSetManager fileSetManager;
-
- /**
* Disables the plugin execution.
*
* @parameter expression="${clean.skip}" default-value="false"
@@ -159,10 +139,9 @@
private boolean excludeDefaultDirectories;
/**
- * Deletes file-sets in the following project build directory order:
- * (source) directory, output directory, test directory, report directory,
- * and then the additional file-sets.
- *
+ * Deletes file-sets in the following project build directory order: (source) directory, output directory, test
+ * directory, report directory, and then the additional file-sets.
+ *
* @see org.apache.maven.plugin.Mojo#execute()
* @throws MojoExecutionException When a directory failed to get deleted.
*/
@@ -175,28 +154,37 @@
return;
}
+ Cleaner cleaner = new Cleaner( getLog(), isVerbose() );
+
try
{
- fileSetManager = new FileSetManager( getLog(), isVerbose() );
-
- if ( !excludeDefaultDirectories )
+ File[] directories = getDirectories();
+ for ( int i = 0; i < directories.length; i++ )
{
- removeDirectory( directory );
- removeDirectory( outputDirectory );
- removeDirectory( testOutputDirectory );
- removeDirectory( reportDirectory );
+ File directory = directories[i];
+ if ( directory != null )
+ {
+ cleaner.delete( directory, null, followSymLinks, failOnError );
+ }
+ }
+
+ if ( filesets != null )
+ {
+ for ( int i = 0; i < filesets.length; i++ )
+ {
+ Fileset fileset = filesets[i];
+ if ( fileset.getDirectory() == null )
+ {
+ throw new MojoExecutionException( "Missing base directory for " + fileset );
+ }
+ GlobSelector selector = new GlobSelector( fileset.getIncludes(), fileset.getExcludes() );
+ cleaner.delete( fileset.getDirectory(), selector, fileset.isFollowSymlinks(), failOnError );
+ }
}
-
- removeAdditionalFilesets();
}
- catch ( MojoExecutionException e )
+ catch ( IOException e )
{
- if ( failOnError )
- {
- throw e;
- }
-
- getLog().warn( e.getMessage() );
+ throw new MojoExecutionException( "Failed to clean project: " + e.getMessage(), e );
}
}
@@ -211,142 +199,22 @@
}
/**
- * Deletes additional file-sets specified by the <code>filesets</code> tag.
- *
- * @throws MojoExecutionException When a directory failed to get deleted.
- */
- private void removeAdditionalFilesets()
- throws MojoExecutionException
- {
- if ( filesets != null && !filesets.isEmpty() )
- {
- for ( Iterator it = filesets.iterator(); it.hasNext(); )
- {
- FileSet fileset = (FileSet) it.next();
-
- removeFileSet( fileset );
- }
- }
- }
-
- /**
- * Deletes a directory and its contents.
- *
- * @param dir The base directory of the included and excluded files.
- * @throws MojoExecutionException When a directory failed to get deleted.
- */
- private void removeDirectory( File dir )
- throws MojoExecutionException
- {
- if ( dir != null )
- {
- FileSet fs = new Fileset();
- fs.setDirectory( dir.getPath() );
- fs.addInclude( "**" );
- fs.setFollowSymlinks( followSymLinks );
-
- removeFileSet( fs );
- }
- }
-
- /**
- * Deletes the specified file set. If the base directory of the file set is relative, it will be resolved against
- * the base directory of the current project.
- *
- * @param fileset The file set to delete, must not be <code>null</code>.
- * @throws MojoExecutionException When the file set failed to get deleted.
+ * Gets the directories to clean (if any). The returned array may contain null entries.
+ *
+ * @return The directories to clean or an empty array if none, never <code>null</code>.
*/
- private void removeFileSet( FileSet fileset )
- throws MojoExecutionException
+ private File[] getDirectories()
{
- try
- {
- File dir = new File( fileset.getDirectory() );
-
- if ( !dir.isAbsolute() )
- {
- dir = new File( project.getBasedir(), fileset.getDirectory() );
- fileset.setDirectory( dir.getPath() );
- }
-
- if ( !dir.exists() )
- {
- getLog().debug( "Skipping non-existing directory: " + dir );
- return;
- }
-
- if ( !dir.isDirectory() )
- {
- throw new MojoExecutionException( dir + " is not a directory." );
- }
-
- getLog().info( "Deleting " + fileset );
- fileSetManager.delete( fileset, failOnError );
- }
- catch ( IOException e )
+ File[] directories;
+ if ( excludeDefaultDirectories )
{
- throw new MojoExecutionException( "Failed to delete directory: " + fileset.getDirectory() + ". Reason: "
- + e.getMessage(), e );
+ directories = new File[0];
}
- catch ( IllegalStateException e )
+ else
{
- // TODO: IOException from plexus-utils should be acceptable here
- throw new MojoExecutionException( "Failed to delete directory: " + fileset.getDirectory() + ". Reason: "
- + e.getMessage(), e );
+ directories = new File[] { directory, outputDirectory, testOutputDirectory, reportDirectory };
}
+ return directories;
}
- /**
- * Sets the project build directory.
- *
- * @param newDirectory The project build directory to set.
- */
- protected void setDirectory( File newDirectory )
- {
- this.directory = newDirectory;
- }
-
- /**
- * Sets the project build output directory.
- *
- * @param newOutputDirectory The project build output directory to set.
- */
- protected void setOutputDirectory( File newOutputDirectory )
- {
- this.outputDirectory = newOutputDirectory;
- }
-
- /**
- * Sets the project build test output directory.
- *
- * @param newTestOutputDirectory The project build test output directory to set.
- */
- protected void setTestOutputDirectory( File newTestOutputDirectory )
- {
- this.testOutputDirectory = newTestOutputDirectory;
- }
-
- /**
- * Sets the project build report directory.
- *
- * @param newReportDirectory The project build report directory to set.
- */
- protected void setReportDirectory( File newReportDirectory )
- {
- this.reportDirectory = newReportDirectory;
- }
-
- /**
- * Adds a file-set to the list of file-sets to clean.
- *
- * @param fileset the fileset
- */
- public void addFileset( Fileset fileset )
- {
- if ( filesets == null )
- {
- filesets = new LinkedList();
- }
- filesets.add( fileset );
- }
}
Added: maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/Cleaner.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/Cleaner.java?rev=897682&view=auto
==============================================================================
--- maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/Cleaner.java (added)
+++ maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/Cleaner.java Sun Jan 10 18:55:01 2010
@@ -0,0 +1,265 @@
+package org.apache.maven.plugin.clean;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.File;
+import java.io.IOException;
+
+import org.apache.maven.plugin.logging.Log;
+import org.codehaus.plexus.util.Os;
+
+/**
+ * Cleans directories.
+ *
+ * @author Benjamin Bentmann
+ */
+class Cleaner
+{
+
+ private static final boolean ON_WINDOWS = Os.isFamily( Os.FAMILY_WINDOWS );
+
+ private final Logger logDebug;
+
+ private final Logger logInfo;
+
+ private final Logger logVerbose;
+
+ private final Logger logWarn;
+
+ /**
+ * Creates a new cleaner.
+ *
+ * @param log The logger to use, may be <code>null</code> to disable logging.
+ * @param verbose Whether to perform verbose logging.
+ */
+ public Cleaner( final Log log, boolean verbose )
+ {
+ logDebug = ( log == null || !log.isDebugEnabled() ) ? null : new Logger()
+ {
+ public void log( CharSequence message )
+ {
+ log.debug( message );
+ }
+ };
+
+ logInfo = ( log == null || !log.isInfoEnabled() ) ? null : new Logger()
+ {
+ public void log( CharSequence message )
+ {
+ log.info( message );
+ }
+ };
+
+ logWarn = ( log == null || !log.isWarnEnabled() ) ? null : new Logger()
+ {
+ public void log( CharSequence message )
+ {
+ log.warn( message );
+ }
+ };
+
+ logVerbose = verbose ? logInfo : logDebug;
+ }
+
+ /**
+ * Deletes the specified directories and its contents.
+ *
+ * @param basedir The directory to delete, must not be <code>null</code>. Non-existing directories will be silently
+ * ignored.
+ * @param selector The selector used to determine what contents to delete, may be <code>null</code> to delete
+ * everything.
+ * @param followSymlinks Whether to follow symlinks.
+ * @param failOnError Whether to abort with an exception in case a selected file/directory could not be deleted.
+ * @throws IOException If a file/directory could not be deleted and <code>failOnError</code> is <code>true</code>.
+ */
+ public void delete( File basedir, Selector selector, boolean followSymlinks, boolean failOnError )
+ throws IOException
+ {
+ if ( !basedir.isDirectory() )
+ {
+ if ( !basedir.exists() )
+ {
+ if ( logDebug != null )
+ {
+ logDebug.log( "Skipping non-existing directory " + basedir );
+ }
+ return;
+ }
+ throw new IOException( "Invalid base directory " + basedir );
+ }
+
+ if ( logInfo != null )
+ {
+ logInfo.log( "Deleting " + basedir + ( selector != null ? " (" + selector + ")" : "" ) );
+ }
+
+ File file = followSymlinks ? basedir : basedir.getCanonicalFile();
+
+ delete( file, "", selector, followSymlinks, failOnError );
+ }
+
+ /**
+ * Deletes the specified file or directory.
+ *
+ * @param file The file/directory to delete, must not be <code>null</code>. If <code>followSymlinks</code> is
+ * <code>false</code>, it is assumed that the parent file is canonical.
+ * @param pathname The relative pathname of the file, using {@link File#separatorChar}, must not be
+ * <code>null</code>.
+ * @param selector The selector used to determine what contents to delete, may be <code>null</code> to delete
+ * everything.
+ * @param followSymlinks Whether to follow symlinks.
+ * @param failOnError Whether to abort with an exception in case a selected file/directory could not be deleted.
+ * @return The result of the cleaning, never <code>null</code>.
+ * @throws IOException If a file/directory could not be deleted and <code>failOnError</code> is <code>true</code>.
+ */
+ private Result delete( File file, String pathname, Selector selector, boolean followSymlinks, boolean failOnError )
+ throws IOException
+ {
+ Result result = new Result();
+
+ boolean isDirectory = file.isDirectory();
+
+ if ( isDirectory )
+ {
+ if ( selector == null || selector.couldHoldSelected( pathname ) )
+ {
+ File canonical = followSymlinks ? file : file.getCanonicalFile();
+ if ( followSymlinks || file.equals( canonical ) )
+ {
+ String[] filenames = canonical.list();
+ if ( filenames != null )
+ {
+ String prefix = ( pathname.length() > 0 ) ? pathname + File.separatorChar : "";
+ for ( int i = filenames.length - 1; i >= 0; i-- )
+ {
+ String filename = filenames[i];
+ File child = new File( canonical, filename );
+ result.update( delete( child, prefix + filename, selector, followSymlinks, failOnError ) );
+ }
+ }
+ }
+ else if ( logDebug != null )
+ {
+ logDebug.log( "Not recursing into symlink " + file );
+ }
+ }
+ else if ( logDebug != null )
+ {
+ logDebug.log( "Not recursing into directory without included files " + file );
+ }
+ }
+
+ if ( !result.excluded && ( selector == null || selector.isSelected( pathname ) ) )
+ {
+ if ( logVerbose != null )
+ {
+ if ( isDirectory )
+ {
+ logVerbose.log( "Deleting directory " + file );
+ }
+ else if ( file.exists() )
+ {
+ logVerbose.log( "Deleting file " + file );
+ }
+ else
+ {
+ logVerbose.log( "Deleting dangling symlink " + file );
+ }
+ }
+ result.failures += delete( file, failOnError );
+ }
+ else
+ {
+ result.excluded = true;
+ }
+
+ return result;
+ }
+
+ /**
+ * Deletes the specified file, directory. If the path denotes a symlink, only the link is removed, its target is
+ * left untouched.
+ *
+ * @param file The file/directory to delete, must not be <code>null</code>.
+ * @param failOnError Whether to abort with an exception in case the file/directory could not be deleted.
+ * @return <code>0</code> if the file was deleted, <code>1</code> otherwise.
+ * @throws IOException If a file/directory could not be deleted and <code>failOnError</code> is <code>true</code>.
+ */
+ private int delete( File file, boolean failOnError )
+ throws IOException
+ {
+ if ( !file.delete() )
+ {
+ if ( ON_WINDOWS )
+ {
+ // try to release any locks held by non-closed files
+ System.gc();
+ }
+ try
+ {
+ Thread.sleep( 10 );
+ }
+ catch ( InterruptedException e )
+ {
+ // ignore
+ }
+ if ( !file.delete() )
+ {
+ if ( failOnError )
+ {
+ throw new IOException( "Failed to delete " + file );
+ }
+ else
+ {
+ if ( logWarn != null )
+ {
+ logWarn.log( "Failed to delete " + file );
+ }
+ return 1;
+ }
+ }
+ }
+
+ return 0;
+ }
+
+ private static class Result
+ {
+
+ public int failures;
+
+ public boolean excluded;
+
+ public void update( Result result )
+ {
+ failures += result.failures;
+ excluded |= result.excluded;
+ }
+
+ }
+
+ private static interface Logger
+ {
+
+ public void log( CharSequence message );
+
+ }
+
+}
Propchange: maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/Cleaner.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/Cleaner.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Modified: maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/Fileset.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/Fileset.java?rev=897682&r1=897681&r2=897682&view=diff
==============================================================================
--- maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/Fileset.java (original)
+++ maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/Fileset.java Sun Jan 10 18:55:01 2010
@@ -19,7 +19,8 @@
* under the License.
*/
-import org.apache.maven.shared.model.fileset.FileSet;
+import java.io.File;
+import java.util.Arrays;
/**
* Customizes the string representation of
@@ -30,11 +31,38 @@
*
* @version $Id$
* @since 2.1
- * @see org.apache.maven.shared.model.fileset.FileSet
*/
public class Fileset
- extends FileSet
{
+
+ private File directory;
+
+ private String[] includes;
+
+ private String[] excludes;
+
+ private boolean followSymlinks;
+
+ public File getDirectory()
+ {
+ return directory;
+ }
+
+ public String[] getIncludes()
+ {
+ return ( includes != null ) ? includes : new String[0];
+ }
+
+ public String[] getExcludes()
+ {
+ return ( excludes != null ) ? excludes : new String[0];
+ }
+
+ public boolean isFollowSymlinks()
+ {
+ return followSymlinks;
+ }
+
/**
* Retrieves the included and excluded files from this file-set's directory.
* Specifically, <code>"file-set: <I>[directory]</I> (included:
@@ -47,6 +75,8 @@
*/
public String toString()
{
- return "file set: " + getDirectory() + " (included: " + getIncludes() + ", excluded: " + getExcludes() + ")";
+ return "file set: " + getDirectory() + " (included: " + Arrays.asList( getIncludes() ) + ", excluded: "
+ + Arrays.asList( getExcludes() ) + ")";
}
+
}
Added: maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/GlobSelector.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/GlobSelector.java?rev=897682&view=auto
==============================================================================
--- maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/GlobSelector.java (added)
+++ maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/GlobSelector.java Sun Jan 10 18:55:01 2010
@@ -0,0 +1,149 @@
+package org.apache.maven.plugin.clean;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.File;
+import java.util.Arrays;
+
+import org.codehaus.plexus.util.DirectoryScanner;
+import org.codehaus.plexus.util.SelectorUtils;
+
+/**
+ * Selects paths based on Ant-like glob patterns.
+ *
+ * @author Benjamin Bentmann
+ */
+class GlobSelector
+ implements Selector
+{
+
+ private final String[] includes;
+
+ private final String[] excludes;
+
+ private final String str;
+
+ public GlobSelector( String[] includes, String[] excludes )
+ {
+ this( includes, excludes, false );
+ }
+
+ public GlobSelector( String[] includes, String[] excludes, boolean useDefaultExcludes )
+ {
+ this.str = "includes = " + toString( includes ) + ", excludes = " + toString( excludes );
+ this.includes = normalizePatterns( includes );
+ this.excludes = normalizePatterns( addDefaultExcludes( excludes, useDefaultExcludes ) );
+ }
+
+ private static String toString( String[] patterns )
+ {
+ return ( patterns == null ) ? "[]" : Arrays.asList( patterns ).toString();
+ }
+
+ private static String[] addDefaultExcludes( String[] excludes, boolean useDefaultExcludes )
+ {
+ String[] defaults = DirectoryScanner.DEFAULTEXCLUDES;
+ if ( !useDefaultExcludes )
+ {
+ return excludes;
+ }
+ else if ( excludes == null || excludes.length <= 0 )
+ {
+ return defaults;
+ }
+ else
+ {
+ String[] patterns = new String[excludes.length + defaults.length];
+ System.arraycopy( excludes, 0, patterns, 0, excludes.length );
+ System.arraycopy( defaults, 0, patterns, excludes.length, defaults.length );
+ return patterns;
+ }
+ }
+
+ private static String[] normalizePatterns( String[] patterns )
+ {
+ String[] normalized;
+
+ if ( patterns != null )
+ {
+ normalized = new String[patterns.length];
+ for ( int i = patterns.length - 1; i >= 0; i-- )
+ {
+ normalized[i] = normalizePattern( patterns[i] );
+ }
+ }
+ else
+ {
+ normalized = new String[0];
+ }
+
+ return normalized;
+ }
+
+ private static String normalizePattern( String pattern )
+ {
+ String normalized = pattern.replace( ( File.separatorChar == '/' ) ? '\\' : '/', File.separatorChar );
+
+ if ( normalized.endsWith( File.separator ) )
+ {
+ normalized += "**";
+ }
+
+ return normalized;
+ }
+
+ public boolean isSelected( String pathname )
+ {
+ return ( includes.length <= 0 || isMatched( pathname, includes ) )
+ && ( excludes.length <= 0 || !isMatched( pathname, excludes ) );
+ }
+
+ private static boolean isMatched( String pathname, String[] patterns )
+ {
+ for ( int i = patterns.length - 1; i >= 0; i-- )
+ {
+ String pattern = patterns[i];
+ if ( SelectorUtils.matchPath( pattern, pathname ) )
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public boolean couldHoldSelected( String pathname )
+ {
+ for ( int i = includes.length - 1; i >= 0; i-- )
+ {
+ String include = includes[i];
+ if ( SelectorUtils.matchPatternStart( include, pathname ) )
+ {
+ return true;
+ }
+ }
+ return includes.length <= 0;
+ }
+
+ public String toString()
+ {
+ return str;
+ }
+
+}
Propchange: maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/GlobSelector.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/GlobSelector.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/Selector.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/Selector.java?rev=897682&view=auto
==============================================================================
--- maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/Selector.java (added)
+++ maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/Selector.java Sun Jan 10 18:55:01 2010
@@ -0,0 +1,48 @@
+package org.apache.maven.plugin.clean;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * Determines whether a path is selected for deletion. The pathnames used for method parameters will be relative to some
+ * base directory and use {@link java.io.File#separatorChar} as separator.
+ *
+ * @author Benjamin Bentmann
+ */
+interface Selector
+{
+
+ /**
+ * Determines whether a path is selected for deletion.
+ *
+ * @param pathname The pathname to test, must not be <code>null</code>.
+ * @return <code>true</code> if the given path is selected for deletion, <code>false</code> otherwise.
+ */
+ boolean isSelected( String pathname );
+
+ /**
+ * Determines whether a directory could contain selected paths.
+ *
+ * @param pathname The directory pathname to test, must not be <code>null</code>.
+ * @return <code>true</code> if the given directory might contain selected paths, <code>false</code> if the
+ * directory will definitively not contain selected paths..
+ */
+ boolean couldHoldSelected( String pathname );
+
+}
Propchange: maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/Selector.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/Selector.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-clean-plugin/src/test/java/org/apache/maven/plugin/clean/Utils.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/test/java/org/apache/maven/plugin/clean/Utils.java?rev=897682&view=auto
==============================================================================
--- maven/plugins/trunk/maven-clean-plugin/src/test/java/org/apache/maven/plugin/clean/Utils.java (added)
+++ maven/plugins/trunk/maven-clean-plugin/src/test/java/org/apache/maven/plugin/clean/Utils.java Sun Jan 10 18:55:01 2010
@@ -0,0 +1,54 @@
+package org.apache.maven.plugin.clean;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.File;
+
+/**
+ * Testing helpers for the IT scripts.
+ *
+ * @author Benjamin Bentmann
+ */
+public class Utils
+{
+
+ /**
+ * Creates a symbolic link.
+ *
+ * @param target The target (file or directory) of the link, must not be <code>null</code>.
+ * @param link The path to the link, must not be <code>null</code>.
+ * @return <code>true</code> if the symlink could be created, <code>false</code> otherwise.
+ */
+ public static boolean createSymlink( File target, File link )
+ {
+ try
+ {
+ String[] args = { "ln", "-s", target.getAbsolutePath(), link.getAbsolutePath() };
+ Process process = Runtime.getRuntime().exec( args );
+ process.waitFor();
+ return 0 == process.exitValue();
+ }
+ catch ( Exception e )
+ {
+ return false;
+ }
+ }
+
+}
Propchange: maven/plugins/trunk/maven-clean-plugin/src/test/java/org/apache/maven/plugin/clean/Utils.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-clean-plugin/src/test/java/org/apache/maven/plugin/clean/Utils.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Modified: maven/plugins/trunk/maven-clean-plugin/src/test/resources/unit/basic-clean-test/plugin-pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/test/resources/unit/basic-clean-test/plugin-pom.xml?rev=897682&r1=897681&r2=897682&view=diff
==============================================================================
--- maven/plugins/trunk/maven-clean-plugin/src/test/resources/unit/basic-clean-test/plugin-pom.xml (original)
+++ maven/plugins/trunk/maven-clean-plugin/src/test/resources/unit/basic-clean-test/plugin-pom.xml Sun Jan 10 18:55:01 2010
@@ -23,7 +23,6 @@
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
- <project implementation="org.apache.maven.plugin.clean.stubs.CleanProjectStub"/>
<directory>${basedir}/target/test-classes/unit/basic-clean-test/buildDirectory</directory>
<outputDirectory>${basedir}/target/test-classes/unit/basic-clean-test/buildOutputDirectory</outputDirectory>
<testOutputDirectory>${basedir}/target/test-classes/unit/basic-clean-test/buildTestDirectory</testOutputDirectory>
Modified: maven/plugins/trunk/maven-clean-plugin/src/test/resources/unit/empty-clean-test/plugin-pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/test/resources/unit/empty-clean-test/plugin-pom.xml?rev=897682&r1=897681&r2=897682&view=diff
==============================================================================
--- maven/plugins/trunk/maven-clean-plugin/src/test/resources/unit/empty-clean-test/plugin-pom.xml (original)
+++ maven/plugins/trunk/maven-clean-plugin/src/test/resources/unit/empty-clean-test/plugin-pom.xml Sun Jan 10 18:55:01 2010
@@ -23,7 +23,6 @@
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
- <project implementation="org.apache.maven.plugin.clean.stubs.CleanProjectStub"/>
<verbose>true</verbose>
<failOnError>true</failOnError>
</configuration>
Modified: maven/plugins/trunk/maven-clean-plugin/src/test/resources/unit/fileset-clean-test/plugin-pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/test/resources/unit/fileset-clean-test/plugin-pom.xml?rev=897682&r1=897681&r2=897682&view=diff
==============================================================================
--- maven/plugins/trunk/maven-clean-plugin/src/test/resources/unit/fileset-clean-test/plugin-pom.xml (original)
+++ maven/plugins/trunk/maven-clean-plugin/src/test/resources/unit/fileset-clean-test/plugin-pom.xml Sun Jan 10 18:55:01 2010
@@ -23,7 +23,6 @@
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
- <project implementation="org.apache.maven.plugin.clean.stubs.CleanProjectStub"/>
<filesets>
<fileset>
<directory>${basedir}/target/test-classes/unit/fileset-clean-test/target</directory>
Modified: maven/plugins/trunk/maven-clean-plugin/src/test/resources/unit/invalid-directory-test/plugin-pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/test/resources/unit/invalid-directory-test/plugin-pom.xml?rev=897682&r1=897681&r2=897682&view=diff
==============================================================================
--- maven/plugins/trunk/maven-clean-plugin/src/test/resources/unit/invalid-directory-test/plugin-pom.xml (original)
+++ maven/plugins/trunk/maven-clean-plugin/src/test/resources/unit/invalid-directory-test/plugin-pom.xml Sun Jan 10 18:55:01 2010
@@ -23,7 +23,6 @@
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
- <project implementation="org.apache.maven.plugin.clean.stubs.CleanProjectStub"/>
<directory>${basedir}/target/test-classes/unit/invalid-directory-test/this-is-a-file</directory>
<verbose>true</verbose>
<failOnError>true</failOnError>
Modified: maven/plugins/trunk/maven-clean-plugin/src/test/resources/unit/locked-file-test/plugin-pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/test/resources/unit/locked-file-test/plugin-pom.xml?rev=897682&r1=897681&r2=897682&view=diff
==============================================================================
--- maven/plugins/trunk/maven-clean-plugin/src/test/resources/unit/locked-file-test/plugin-pom.xml (original)
+++ maven/plugins/trunk/maven-clean-plugin/src/test/resources/unit/locked-file-test/plugin-pom.xml Sun Jan 10 18:55:01 2010
@@ -23,7 +23,6 @@
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
- <project implementation="org.apache.maven.plugin.clean.stubs.CleanProjectStub"/>
<directory>${basedir}/target/test-classes/unit/locked-file-test/buildDirectory</directory>
<verbose>true</verbose>
<failOnError>true</failOnError>
Modified: maven/plugins/trunk/maven-clean-plugin/src/test/resources/unit/missing-directory-test/plugin-pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/test/resources/unit/missing-directory-test/plugin-pom.xml?rev=897682&r1=897681&r2=897682&view=diff
==============================================================================
--- maven/plugins/trunk/maven-clean-plugin/src/test/resources/unit/missing-directory-test/plugin-pom.xml (original)
+++ maven/plugins/trunk/maven-clean-plugin/src/test/resources/unit/missing-directory-test/plugin-pom.xml Sun Jan 10 18:55:01 2010
@@ -23,7 +23,6 @@
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
- <project implementation="org.apache.maven.plugin.clean.stubs.CleanProjectStub"/>
<directory>${basedir}/target/test-classes/unit/missing-clean-test/does-not-exist</directory>
<verbose>true</verbose>
<failOnError>true</failOnError>
Modified: maven/plugins/trunk/maven-clean-plugin/src/test/resources/unit/nested-clean-test/plugin-pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/test/resources/unit/nested-clean-test/plugin-pom.xml?rev=897682&r1=897681&r2=897682&view=diff
==============================================================================
--- maven/plugins/trunk/maven-clean-plugin/src/test/resources/unit/nested-clean-test/plugin-pom.xml (original)
+++ maven/plugins/trunk/maven-clean-plugin/src/test/resources/unit/nested-clean-test/plugin-pom.xml Sun Jan 10 18:55:01 2010
@@ -23,7 +23,6 @@
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
- <project implementation="org.apache.maven.plugin.clean.stubs.CleanProjectStub"/>
<directory>${basedir}/target/test-classes/unit/nested-clean-test/target</directory>
<outputDirectory>${basedir}/target/test-classes/unit/nested-clean-test/target/classes</outputDirectory>
<testOutputDirectory>${basedir}/target/test-classes/unit/nested-clean-test/target/test-classes</testOutputDirectory>