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/08/10 23:22:41 UTC

svn commit: r684598 - in /maven/plugins/trunk/maven-clean-plugin: ./ src/it/ src/it/default/ src/it/default/target/ src/it/default/target/classes/ src/it/default/target/site/ src/it/default/target/test-classes/

Author: bentmann
Date: Sun Aug 10 14:22:41 2008
New Revision: 684598

URL: http://svn.apache.org/viewvc?rev=684598&view=rev
Log:
o Added basic integration test

Added:
    maven/plugins/trunk/maven-clean-plugin/src/it/
    maven/plugins/trunk/maven-clean-plugin/src/it/default/
    maven/plugins/trunk/maven-clean-plugin/src/it/default/pom.xml   (with props)
    maven/plugins/trunk/maven-clean-plugin/src/it/default/setup.bsh   (with props)
    maven/plugins/trunk/maven-clean-plugin/src/it/default/target/
    maven/plugins/trunk/maven-clean-plugin/src/it/default/target/classes/
    maven/plugins/trunk/maven-clean-plugin/src/it/default/target/classes/main.properties   (with props)
    maven/plugins/trunk/maven-clean-plugin/src/it/default/target/site/
    maven/plugins/trunk/maven-clean-plugin/src/it/default/target/site/index.html   (with props)
    maven/plugins/trunk/maven-clean-plugin/src/it/default/target/test-1.0-SNAPSHOT.jar   (with props)
    maven/plugins/trunk/maven-clean-plugin/src/it/default/target/test-classes/
    maven/plugins/trunk/maven-clean-plugin/src/it/default/target/test-classes/test.properties   (with props)
    maven/plugins/trunk/maven-clean-plugin/src/it/default/verify.bsh   (with props)
    maven/plugins/trunk/maven-clean-plugin/src/it/settings.xml   (with props)
Modified:
    maven/plugins/trunk/maven-clean-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=684598&r1=684597&r2=684598&view=diff
==============================================================================
--- maven/plugins/trunk/maven-clean-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-clean-plugin/pom.xml Sun Aug 10 14:22:41 2008
@@ -94,20 +94,27 @@
       <build>
         <plugins>
           <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-antrun-plugin</artifactId>
+            <artifactId>maven-invoker-plugin</artifactId>
+            <configuration>
+              <debug>true</debug>
+              <projectsDirectory>src/it</projectsDirectory>
+              <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
+              <pomIncludes>
+                <pomInclude>*/pom.xml</pomInclude>
+              </pomIncludes>
+              <preBuildHookScript>setup.bsh</preBuildHookScript>
+              <postBuildHookScript>verify.bsh</postBuildHookScript>
+              <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
+              <settingsFile>src/it/settings.xml</settingsFile>
+              <goals>
+                <goal>clean</goal>
+              </goals>
+            </configuration>
             <executions>
               <execution>
                 <id>integration-test</id>
-                <phase>integration-test</phase>
-                <configuration>
-                  <tasks>
-                    <echo/><echo/><echo/><echo/><echo/>
-                    <echo level="warning">NO INTEGRATION TESTS DEFINED</echo>
-                    <echo/><echo/><echo/><echo/><echo/>
-                  </tasks>
-                </configuration>
                 <goals>
+                  <goal>install</goal>
                   <goal>run</goal>
                 </goals>
               </execution>

Added: 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=684598&view=auto
==============================================================================
--- maven/plugins/trunk/maven-clean-plugin/src/it/default/pom.xml (added)
+++ maven/plugins/trunk/maven-clean-plugin/src/it/default/pom.xml Sun Aug 10 14:22:41 2008
@@ -0,0 +1,46 @@
+<?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>default</artifactId>
+  <version>1.0-SNAPSHOT</version>
+
+  <name>Test for clean</name>
+
+  <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>@pom.version@</version>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>

Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/default/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

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

Added: maven/plugins/trunk/maven-clean-plugin/src/it/default/setup.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/it/default/setup.bsh?rev=684598&view=auto
==============================================================================
--- maven/plugins/trunk/maven-clean-plugin/src/it/default/setup.bsh (added)
+++ maven/plugins/trunk/maven-clean-plugin/src/it/default/setup.bsh Sun Aug 10 14:22:41 2008
@@ -0,0 +1,22 @@
+import java.io.*;
+import java.util.*;
+import java.util.jar.*;
+import java.util.regex.*;
+
+try
+{
+    File targetDir = new File( basedir, "target" );
+    System.out.println( "Checking for existence of " + targetDir );
+    if ( !targetDir.isDirectory() )
+    {
+        System.out.println( "FAILURE!" );
+        return false;
+    }
+}
+catch( Throwable t )
+{
+    t.printStackTrace();
+    return false;
+}
+
+return true;

Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/default/setup.bsh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/default/setup.bsh
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-clean-plugin/src/it/default/target/classes/main.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/it/default/target/classes/main.properties?rev=684598&view=auto
==============================================================================
    (empty)

Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/default/target/classes/main.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/default/target/classes/main.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-clean-plugin/src/it/default/target/site/index.html
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/it/default/target/site/index.html?rev=684598&view=auto
==============================================================================
    (empty)

Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/default/target/site/index.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/default/target/site/index.html
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-clean-plugin/src/it/default/target/test-1.0-SNAPSHOT.jar
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/it/default/target/test-1.0-SNAPSHOT.jar?rev=684598&view=auto
==============================================================================
Binary file - no diff available.

Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/default/target/test-1.0-SNAPSHOT.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: maven/plugins/trunk/maven-clean-plugin/src/it/default/target/test-classes/test.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/it/default/target/test-classes/test.properties?rev=684598&view=auto
==============================================================================
    (empty)

Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/default/target/test-classes/test.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/default/target/test-classes/test.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-clean-plugin/src/it/default/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/it/default/verify.bsh?rev=684598&view=auto
==============================================================================
--- maven/plugins/trunk/maven-clean-plugin/src/it/default/verify.bsh (added)
+++ maven/plugins/trunk/maven-clean-plugin/src/it/default/verify.bsh Sun Aug 10 14:22:41 2008
@@ -0,0 +1,22 @@
+import java.io.*;
+import java.util.*;
+import java.util.jar.*;
+import java.util.regex.*;
+
+try
+{
+    File targetDir = new File( basedir, "target" );
+    System.out.println( "Checking for absence of " + targetDir );
+    if ( targetDir.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/default/verify.bsh
------------------------------------------------------------------------------
    svn:eol-style = native

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

Added: maven/plugins/trunk/maven-clean-plugin/src/it/settings.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/it/settings.xml?rev=684598&view=auto
==============================================================================
--- maven/plugins/trunk/maven-clean-plugin/src/it/settings.xml (added)
+++ maven/plugins/trunk/maven-clean-plugin/src/it/settings.xml Sun Aug 10 14:22:41 2008
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<settings>
+  <profiles>
+    <profile>
+      <id>it-repo</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
+      <repositories>
+        <repository>
+          <id>local.central</id>
+          <url>file://@localRepository@</url>
+          <releases>
+            <enabled>true</enabled>
+          </releases>
+          <snapshots>
+            <enabled>true</enabled>
+          </snapshots>
+        </repository>
+      </repositories>
+      <pluginRepositories>
+        <pluginRepository>
+          <id>local.central</id>
+          <url>file://@localRepository@</url>
+          <releases>
+            <enabled>true</enabled>
+          </releases>
+          <snapshots>
+            <enabled>true</enabled>
+          </snapshots>
+        </pluginRepository>
+      </pluginRepositories>
+    </profile>
+  </profiles>
+</settings>

Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/settings.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-clean-plugin/src/it/settings.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision