Author: bentmann Date: Wed Sep 3 15:04:55 2008 New Revision: 691803 URL: http://svn.apache.org/viewvc?rev=691803&view=rev Log: [MCLEAN-36] filesets with an absolute path directory are ignored when !project.isExecutionRoot()
o Added integration test to prove fix established by MCLEAN-31 Added: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-absolute-paths/ maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-absolute-paths/child-a/ maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-absolute-paths/child-a/pom.xml (with props) maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-absolute-paths/delete-me/ maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-absolute-paths/delete-me/test.txt (with props) maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-absolute-paths/pom.xml (with props) maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-absolute-paths/verify.bsh (with props) Added: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-absolute-paths/child-a/pom.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-absolute-paths/child-a/pom.xml?rev=691803&view=auto ============================================================================== --- maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-absolute-paths/child-a/pom.xml (added) +++ maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-absolute-paths/child-a/pom.xml Wed Sep 3 15:04:55 2008 @@ -0,0 +1,60 @@ +<?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> + + <parent> + <groupId>test</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <groupId>test</groupId> + <artifactId>child-a</artifactId> + <version>1.0-SNAPSHOT</version> + + <name>Child A</name> + <description>Check for proper cleaning of file sets with absolute paths during reactor build.</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> + <configuration> + <filesets> + <fileset> + <directory>${deploy.dir}</directory> + </fileset> + </filesets> + </configuration> + </plugin> + </plugins> + </build> + +</project> Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-absolute-paths/child-a/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-absolute-paths/child-a/pom.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-absolute-paths/delete-me/test.txt URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-absolute-paths/delete-me/test.txt?rev=691803&view=auto ============================================================================== --- maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-absolute-paths/delete-me/test.txt (added) +++ maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-absolute-paths/delete-me/test.txt Wed Sep 3 15:04:55 2008 @@ -0,0 +1 @@ +Test \ No newline at end of file Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-absolute-paths/delete-me/test.txt ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-absolute-paths/delete-me/test.txt ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-absolute-paths/pom.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-absolute-paths/pom.xml?rev=691803&view=auto ============================================================================== --- maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-absolute-paths/pom.xml (added) +++ maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-absolute-paths/pom.xml Wed Sep 3 15:04:55 2008 @@ -0,0 +1,55 @@ +<?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>parent</artifactId> + <version>1.0-SNAPSHOT</version> + <packaging>pom</packaging> + + <name>Test for clean</name> + + <modules> + <module>child-a</module> + </modules> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <deploy.dir>@project.build.directory@/it/file-sets-absolute-paths/delete-me</deploy.dir> + </properties> + + <build> + <pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-clean-plugin</artifactId> + <version>@pom.version@</version> + </plugin> + </plugins> + </pluginManagement> + </build> + +</project> Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-absolute-paths/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-absolute-paths/pom.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-absolute-paths/verify.bsh URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-absolute-paths/verify.bsh?rev=691803&view=auto ============================================================================== --- maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-absolute-paths/verify.bsh (added) +++ maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-absolute-paths/verify.bsh Wed Sep 3 15:04:55 2008 @@ -0,0 +1,28 @@ +import java.io.*; +import java.util.*; +import java.util.jar.*; +import java.util.regex.*; + +try +{ + String[] unexpected = { + "delete-me", + }; + 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; + } + } +} +catch( Throwable t ) +{ + t.printStackTrace(); + return false; +} + +return true; Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-absolute-paths/verify.bsh ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-absolute-paths/verify.bsh ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision