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 2008/09/03 22:47:10 UTC

svn commit: r691767 - in /maven/plugins/trunk/maven-clean-plugin/src/it: default/ file-sets-relative-paths/ file-sets-relative-paths/child-a/ file-sets-relative-paths/child-a/target/ file-sets-relative-paths/child-a/temp-stuff/ file-sets-relative-paths...

Author: bentmann
Date: Wed Sep  3 13:47:09 2008
New Revision: 691767

URL: http://svn.apache.org/viewvc?rev=691767&view=rev
Log:
o Added integration test to check handling of relative for file sets

Added:
    maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/
    maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-a/
    maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-a/pom.xml   (with props)
    maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-a/target/
    maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-a/target/test.txt   (with props)
    maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-a/temp-stuff/
    maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-a/temp-stuff/test.txt   (with props)
    maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-b/
    maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-b/deploy/
    maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-b/deploy/test.txt   (with props)
    maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-b/pom.xml   (with props)
    maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-b/target/
    maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-b/target/test.txt   (with props)
    maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/deploy/
    maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/deploy/test.txt   (with props)
    maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/pom.xml   (with props)
    maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/target/
    maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/target/test.txt   (with props)
    maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/temp-stuff/
    maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/temp-stuff/test.txt   (with props)
    maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/verify.bsh   (with props)
Modified:
    maven/plugins/trunk/maven-clean-plugin/src/it/default/pom.xml

Modified: maven/plugins/trunk/maven-clean-plugin/src/it/default/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/it/default/pom.xml?rev=691767&r1=691766&r2=691767&view=diff
==============================================================================
--- maven/plugins/trunk/maven-clean-plugin/src/it/default/pom.xml (original)
+++ maven/plugins/trunk/maven-clean-plugin/src/it/default/pom.xml Wed Sep  3 13:47:09 2008
@@ -1,22 +1,23 @@
 <?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.
-  -->
+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"
@@ -28,6 +29,7 @@
   <version>1.0-SNAPSHOT</version>
 
   <name>Test for clean</name>
+  <description>Check for proper cleaning of default output files.</description>
 
   <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

Added: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-a/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-a/pom.xml?rev=691767&view=auto
==============================================================================
--- maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-a/pom.xml (added)
+++ maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-a/pom.xml Wed Sep  3 13:47:09 2008
@@ -0,0 +1,61 @@
+<?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 relative 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>
+              <!-- NOTE: It is part of the test design that this path is relative (to the project base directory) -->
+              <directory>temp-stuff</directory>
+            </fileset>
+          </filesets>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>

Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-a/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-a/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-a/target/test.txt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-a/target/test.txt?rev=691767&view=auto
==============================================================================
--- maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-a/target/test.txt (added)
+++ maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-a/target/test.txt Wed Sep  3 13:47:09 2008
@@ -0,0 +1 @@
+Test
\ No newline at end of file

Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-a/target/test.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-a/target/test.txt
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-a/temp-stuff/test.txt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-a/temp-stuff/test.txt?rev=691767&view=auto
==============================================================================
--- maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-a/temp-stuff/test.txt (added)
+++ maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-a/temp-stuff/test.txt Wed Sep  3 13:47:09 2008
@@ -0,0 +1 @@
+Test
\ No newline at end of file

Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-a/temp-stuff/test.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-a/temp-stuff/test.txt
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-b/deploy/test.txt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-b/deploy/test.txt?rev=691767&view=auto
==============================================================================
--- maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-b/deploy/test.txt (added)
+++ maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-b/deploy/test.txt Wed Sep  3 13:47:09 2008
@@ -0,0 +1 @@
+Test
\ No newline at end of file

Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-b/deploy/test.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-b/deploy/test.txt
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-b/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-b/pom.xml?rev=691767&view=auto
==============================================================================
--- maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-b/pom.xml (added)
+++ maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-b/pom.xml Wed Sep  3 13:47:09 2008
@@ -0,0 +1,62 @@
+<?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-b</artifactId>
+  <version>1.0-SNAPSHOT</version>
+
+  <name>Child B</name>
+  <description>Check for proper cleaning of file sets with relative paths during reactor build.</description>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <!-- NOTE: It is part of the test design that this path is relative (to the project base directory) -->
+    <deploy.dir>deploy</deploy.dir>
+  </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-relative-paths/child-b/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-b/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-b/target/test.txt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-b/target/test.txt?rev=691767&view=auto
==============================================================================
--- maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-b/target/test.txt (added)
+++ maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-b/target/test.txt Wed Sep  3 13:47:09 2008
@@ -0,0 +1 @@
+Test
\ No newline at end of file

Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-b/target/test.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/child-b/target/test.txt
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/deploy/test.txt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/deploy/test.txt?rev=691767&view=auto
==============================================================================
--- maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/deploy/test.txt (added)
+++ maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/deploy/test.txt Wed Sep  3 13:47:09 2008
@@ -0,0 +1 @@
+Test
\ No newline at end of file

Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/deploy/test.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/deploy/test.txt
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/pom.xml?rev=691767&view=auto
==============================================================================
--- maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/pom.xml (added)
+++ maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/pom.xml Wed Sep  3 13:47:09 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>
+    <module>child-b</module>
+  </modules>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </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-relative-paths/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/target/test.txt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/target/test.txt?rev=691767&view=auto
==============================================================================
--- maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/target/test.txt (added)
+++ maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/target/test.txt Wed Sep  3 13:47:09 2008
@@ -0,0 +1 @@
+Test
\ No newline at end of file

Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/target/test.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/target/test.txt
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/temp-stuff/test.txt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/temp-stuff/test.txt?rev=691767&view=auto
==============================================================================
--- maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/temp-stuff/test.txt (added)
+++ maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/temp-stuff/test.txt Wed Sep  3 13:47:09 2008
@@ -0,0 +1 @@
+Test
\ No newline at end of file

Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/temp-stuff/test.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/temp-stuff/test.txt
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/verify.bsh?rev=691767&view=auto
==============================================================================
--- maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/verify.bsh (added)
+++ maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/verify.bsh Wed Sep  3 13:47:09 2008
@@ -0,0 +1,47 @@
+import java.io.*;
+import java.util.*;
+import java.util.jar.*;
+import java.util.regex.*;
+
+try
+{
+    String[] expected = {
+        "temp-stuff/test.txt",
+        "deploy/test.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",
+        "child-a/target",
+        "child-a/temp-stuff",
+        "child-b/target",
+        "child-b/deploy",
+    };
+    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-relative-paths/verify.bsh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/file-sets-relative-paths/verify.bsh
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision