Author: bentmann
Date: Tue Aug 12 02:20:53 2008
New Revision: 685101

URL: http://svn.apache.org/viewvc?rev=685101&view=rev
Log:
o Added integration test to check proper artifact staging (inspired by 
MINVOKER-40 and MINVOKER-43)

Added:
    maven/plugins/trunk/maven-invoker-plugin/src/it/staging/
    maven/plugins/trunk/maven-invoker-plugin/src/it/staging/mod1/
    maven/plugins/trunk/maven-invoker-plugin/src/it/staging/mod1-parent/
    maven/plugins/trunk/maven-invoker-plugin/src/it/staging/mod1-parent/pom.xml 
  (with props)
    maven/plugins/trunk/maven-invoker-plugin/src/it/staging/mod1/pom.xml   
(with props)
    maven/plugins/trunk/maven-invoker-plugin/src/it/staging/mod2/
    maven/plugins/trunk/maven-invoker-plugin/src/it/staging/mod2/pom.xml   
(with props)
    maven/plugins/trunk/maven-invoker-plugin/src/it/staging/pom.xml   (with 
props)
    maven/plugins/trunk/maven-invoker-plugin/src/it/staging/verify.bsh   (with 
props)
Modified:
    maven/plugins/trunk/maven-invoker-plugin/pom.xml

Modified: maven/plugins/trunk/maven-invoker-plugin/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/pom.xml?rev=685101&r1=685100&r2=685101&view=diff
==============================================================================
--- maven/plugins/trunk/maven-invoker-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-invoker-plugin/pom.xml Tue Aug 12 02:20:53 2008
@@ -158,6 +158,10 @@
               <goals>
                 <goal>verify</goal>
               </goals>
+              <properties>
+                <!-- TODO: Workaround for MINVOKER-50, remove once fixed -->
+                <invoker.version>${project.version}</invoker.version>
+              </properties>
             </configuration>
             <executions>
               <execution>

Added: 
maven/plugins/trunk/maven-invoker-plugin/src/it/staging/mod1-parent/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/it/staging/mod1-parent/pom.xml?rev=685101&view=auto
==============================================================================
--- maven/plugins/trunk/maven-invoker-plugin/src/it/staging/mod1-parent/pom.xml 
(added)
+++ maven/plugins/trunk/maven-invoker-plugin/src/it/staging/mod1-parent/pom.xml 
Tue Aug 12 02:20:53 2008
@@ -0,0 +1,39 @@
+<?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>mod1-parent</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>pom</packaging>
+
+  <description>
+    Test to check for proper staging during a multi module build, i.e. 
artifacts from the reactor need to be considered.
+  </description>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+</project>

Propchange: 
maven/plugins/trunk/maven-invoker-plugin/src/it/staging/mod1-parent/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-invoker-plugin/src/it/staging/mod1-parent/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-invoker-plugin/src/it/staging/mod1/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/it/staging/mod1/pom.xml?rev=685101&view=auto
==============================================================================
--- maven/plugins/trunk/maven-invoker-plugin/src/it/staging/mod1/pom.xml (added)
+++ maven/plugins/trunk/maven-invoker-plugin/src/it/staging/mod1/pom.xml Tue 
Aug 12 02:20:53 2008
@@ -0,0 +1,76 @@
+<?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>mod1-parent</artifactId>
+    <version>1.0-SNAPSHOT</version>
+    <relativePath>../mod1-parent</relativePath>
+  </parent>
+
+  <groupId>test</groupId>
+  <artifactId>mod1</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>jar</packaging>
+
+  <description>
+    Test to check for proper staging during a multi module build, i.e. 
artifacts from the reactor need to be considered.
+  </description>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>test</groupId>
+      <artifactId>mod2</artifactId>
+      <version>1.0-SNAPSHOT</version>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-invoker-plugin</artifactId>
+        <!-- TODO: Use @pom.version@ once MINVOKER-50 is fixed -->
+        <version>${invoker.version}</version>
+        <configuration>
+          
<localRepositoryPath>${project.build.directory}/it-repo</localRepositoryPath>
+        </configuration>
+        <executions>
+          <execution>
+            <id>integration-test</id>
+            <goals>
+              <goal>install</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>

Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/staging/mod1/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

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

Added: maven/plugins/trunk/maven-invoker-plugin/src/it/staging/mod2/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/it/staging/mod2/pom.xml?rev=685101&view=auto
==============================================================================
--- maven/plugins/trunk/maven-invoker-plugin/src/it/staging/mod2/pom.xml (added)
+++ maven/plugins/trunk/maven-invoker-plugin/src/it/staging/mod2/pom.xml Tue 
Aug 12 02:20:53 2008
@@ -0,0 +1,45 @@
+<?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>mod2-parent</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+
+  <groupId>test</groupId>
+  <artifactId>mod2</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>jar</packaging>
+
+  <description>
+    Test to check for proper staging during a multi module build, i.e. 
artifacts from the reactor need to be considered.
+  </description>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+</project>

Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/staging/mod2/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

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

Added: maven/plugins/trunk/maven-invoker-plugin/src/it/staging/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/it/staging/pom.xml?rev=685101&view=auto
==============================================================================
--- maven/plugins/trunk/maven-invoker-plugin/src/it/staging/pom.xml (added)
+++ maven/plugins/trunk/maven-invoker-plugin/src/it/staging/pom.xml Tue Aug 12 
02:20:53 2008
@@ -0,0 +1,44 @@
+<?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>mod2-parent</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>pom</packaging>
+
+  <description>
+    Test to check for proper staging during a multi module build, i.e. 
artifacts from the reactor need to be considered.
+  </description>
+
+  <modules>
+    <module>mod1</module>
+    <module>mod2</module>
+  </modules>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+</project>

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

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

Added: maven/plugins/trunk/maven-invoker-plugin/src/it/staging/verify.bsh
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/it/staging/verify.bsh?rev=685101&view=auto
==============================================================================
--- maven/plugins/trunk/maven-invoker-plugin/src/it/staging/verify.bsh (added)
+++ maven/plugins/trunk/maven-invoker-plugin/src/it/staging/verify.bsh Tue Aug 
12 02:20:53 2008
@@ -0,0 +1,49 @@
+import java.io.*;
+import java.util.*;
+import java.util.regex.*;
+
+try
+{
+    File itRepoDir = new File( basedir, "mod1/target/it-repo" );
+    System.out.println( "Checking for existence of: " + itRepoDir );
+    if ( !itRepoDir.isDirectory() )
+    {
+        System.out.println( "FAILED!" );
+        return false;
+    }
+
+    // NOTE: Checking the metadata is included to guard against regression of 
MINVOKER-43
+    String[] files = {
+            "test/mod1/maven-metadata-local.xml",
+            "test/mod1/1.0-SNAPSHOT/maven-metadata-local.xml",
+            "test/mod1/1.0-SNAPSHOT/mod1-1.0-SNAPSHOT.pom",
+            "test/mod1/1.0-SNAPSHOT/mod1-1.0-SNAPSHOT.jar",
+            "test/mod1-parent/maven-metadata-local.xml",
+            "test/mod1-parent/1.0-SNAPSHOT/maven-metadata-local.xml",
+            "test/mod1-parent/1.0-SNAPSHOT/mod1-parent-1.0-SNAPSHOT.pom",
+            "test/mod2/maven-metadata-local.xml",
+            "test/mod2/1.0-SNAPSHOT/maven-metadata-local.xml",
+            "test/mod2/1.0-SNAPSHOT/mod2-1.0-SNAPSHOT.pom",
+            "test/mod2/1.0-SNAPSHOT/mod2-1.0-SNAPSHOT.jar",
+            "test/mod2-parent/maven-metadata-local.xml",
+            "test/mod2-parent/1.0-SNAPSHOT/maven-metadata-local.xml",
+            "test/mod2-parent/1.0-SNAPSHOT/mod2-parent-1.0-SNAPSHOT.pom",
+      };
+    for ( String file : files )
+    {
+        File stagedFile = new File( itRepoDir, file );
+        System.out.println( "Checking for existence of: " + stagedFile );
+        if ( !stagedFile.isFile() )
+        {
+            System.out.println( "FAILED!" );
+            return false;
+        }
+    }
+}
+catch( Throwable t )
+{
+    t.printStackTrace();
+    return false;
+}
+
+return true;

Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/staging/verify.bsh
------------------------------------------------------------------------------
    svn:eol-style = native

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


Reply via email to