Author: bentmann
Date: Fri Aug 28 20:13:22 2009
New Revision: 809013

URL: http://svn.apache.org/viewvc?rev=809013&view=rev
Log:
o Added ITs

Added:
    maven/plugins/trunk/maven-repository-plugin/src/it/
    maven/plugins/trunk/maven-repository-plugin/src/it/bundle-create/
    
maven/plugins/trunk/maven-repository-plugin/src/it/bundle-create/invoker.properties
   (with props)
    maven/plugins/trunk/maven-repository-plugin/src/it/bundle-create/pom.xml   
(with props)
    maven/plugins/trunk/maven-repository-plugin/src/it/bundle-create/src/
    maven/plugins/trunk/maven-repository-plugin/src/it/bundle-create/src/main/
    
maven/plugins/trunk/maven-repository-plugin/src/it/bundle-create/src/main/java/
    
maven/plugins/trunk/maven-repository-plugin/src/it/bundle-create/src/main/java/Main.java
   (with props)
    maven/plugins/trunk/maven-repository-plugin/src/it/bundle-create/verify.bsh 
  (with props)
    maven/plugins/trunk/maven-repository-plugin/src/it/bundle-pack/
    
maven/plugins/trunk/maven-repository-plugin/src/it/bundle-pack/invoker.properties
   (with props)
    maven/plugins/trunk/maven-repository-plugin/src/it/bundle-pack/pom.xml   
(with props)
    
maven/plugins/trunk/maven-repository-plugin/src/it/bundle-pack/test.properties  
 (with props)
    maven/plugins/trunk/maven-repository-plugin/src/it/bundle-pack/verify.bsh   
(with props)
    maven/plugins/trunk/maven-repository-plugin/src/it/settings.xml   (with 
props)
Modified:
    maven/plugins/trunk/maven-repository-plugin/pom.xml

Modified: maven/plugins/trunk/maven-repository-plugin/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-repository-plugin/pom.xml?rev=809013&r1=809012&r2=809013&view=diff
==============================================================================
--- maven/plugins/trunk/maven-repository-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-repository-plugin/pom.xml Fri Aug 28 20:13:22 2009
@@ -117,6 +117,12 @@
       <artifactId>plexus-utils</artifactId>
       <version>1.5.1</version>
     </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.2</version>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 
   <profiles>
@@ -125,20 +131,44 @@
       <build>
         <plugins>
           <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-antrun-plugin</artifactId>
+            <artifactId>maven-dependency-plugin</artifactId>
+            <version>2.0</version>
             <executions>
               <execution>
-                <id>integration-test</id>
-                <phase>integration-test</phase>
+                <id>stage-junit</id>
+                <phase>pre-integration-test</phase>
+                <goals>
+                  <goal>copy-dependencies</goal>
+                </goals>
                 <configuration>
-                  <tasks>
-                    <echo /><echo /><echo /><echo /><echo />
-                    <echo level="warning">NO INTEGRATION TESTS DEFINED</echo>
-                    <echo /><echo /><echo /><echo /><echo />
-                  </tasks>
+                  <copyPom>true</copyPom>
+                  <outputDirectory>target/local-repo</outputDirectory>
+                  <useRepositoryLayout>true</useRepositoryLayout>
+                  <includeGroupIds>junit</includeGroupIds>
                 </configuration>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <artifactId>maven-invoker-plugin</artifactId>
+            <version>1.3</version>
+            <configuration>
+              <debug>true</debug>
+              <projectsDirectory>src/it</projectsDirectory>
+              <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
+              <pomIncludes>
+                <pomInclude>*/pom.xml</pomInclude>
+              </pomIncludes>
+              <preBuildHookScript>setup</preBuildHookScript>
+              <postBuildHookScript>verify</postBuildHookScript>
+              
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
+              <settingsFile>src/it/settings.xml</settingsFile>
+            </configuration>
+            <executions>
+              <execution>
+                <id>integration-test</id>
                 <goals>
+                  <goal>install</goal>
                   <goal>run</goal>
                 </goals>
               </execution>
@@ -178,14 +208,14 @@
   <build>
     <pluginManagement>
       <plugins>
-       <plugin>
-         <artifactId>maven-surefire-plugin</artifactId>
-         <configuration>
-           <excludes>
-             <exclude>**/testutil/**</exclude>
-           </excludes>
-         </configuration>
-       </plugin>
+        <plugin>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <configuration>
+            <excludes>
+              <exclude>**/testutil/**</exclude>
+            </excludes>
+          </configuration>
+        </plugin>
       </plugins>
     </pluginManagement>
   </build>

Added: 
maven/plugins/trunk/maven-repository-plugin/src/it/bundle-create/invoker.properties
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-repository-plugin/src/it/bundle-create/invoker.properties?rev=809013&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-repository-plugin/src/it/bundle-create/invoker.properties
 (added)
+++ 
maven/plugins/trunk/maven-repository-plugin/src/it/bundle-create/invoker.properties
 Fri Aug 28 20:13:22 2009
@@ -0,0 +1 @@
+invoker.goals = 
${project.groupId}:${project.artifactId}:${project.version}:bundle-create

Propchange: 
maven/plugins/trunk/maven-repository-plugin/src/it/bundle-create/invoker.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-repository-plugin/src/it/bundle-create/invoker.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-repository-plugin/src/it/bundle-create/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-repository-plugin/src/it/bundle-create/pom.xml?rev=809013&view=auto
==============================================================================
--- maven/plugins/trunk/maven-repository-plugin/src/it/bundle-create/pom.xml 
(added)
+++ maven/plugins/trunk/maven-repository-plugin/src/it/bundle-create/pom.xml 
Fri Aug 28 20:13:22 2009
@@ -0,0 +1,95 @@
+<?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/xsd/maven-4.0.0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.repository</groupId>
+  <artifactId>test</artifactId>
+  <version>1.0</version>
+  <packaging>jar</packaging>
+
+       <name>Test</name>
+  <description>
+    Tests the creation of a simple bundle.
+  </description>
+  <url>http://maven.apache.org/</url>
+
+  <scm>
+    
<connection>scm:svn:http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-repository-plugin/</connection>
+    
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-repository-plugin/</developerConnection>
+    
<url>http://svn.apache.org/viewvc/maven/plugins/trunk/maven-repository-plugin/</url>
+  </scm>
+  <issueManagement>
+    <system>jira</system>
+    <url>http://jira.codehaus.org/browse/MREPOSITORY</url>
+  </issueManagement>
+  <licenses>
+    <license>
+      <name>The Apache Software License, Version 2.0</name>
+      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+      <distribution>repo</distribution>
+    </license>
+  </licenses>
+
+  <properties>
+    <maven.test.skip>true</maven.test.skip>
+  </properties>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>2.0.2</version>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <version>2.1</version>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-resources-plugin</artifactId>
+        <version>2.2</version>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-source-plugin</artifactId>
+        <version>2.0.4</version>
+        <executions>
+          <execution>
+            <id>attach-sources</id>
+            <goals>
+              <goal>jar</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <version>2.3.1</version>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>

Propchange: 
maven/plugins/trunk/maven-repository-plugin/src/it/bundle-create/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

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

Added: 
maven/plugins/trunk/maven-repository-plugin/src/it/bundle-create/src/main/java/Main.java
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-repository-plugin/src/it/bundle-create/src/main/java/Main.java?rev=809013&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-repository-plugin/src/it/bundle-create/src/main/java/Main.java
 (added)
+++ 
maven/plugins/trunk/maven-repository-plugin/src/it/bundle-create/src/main/java/Main.java
 Fri Aug 28 20:13:22 2009
@@ -0,0 +1,6 @@
+/**
+ * Appliation entry point.
+ */
+public class Main
+{
+}

Propchange: 
maven/plugins/trunk/maven-repository-plugin/src/it/bundle-create/src/main/java/Main.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-repository-plugin/src/it/bundle-create/src/main/java/Main.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-repository-plugin/src/it/bundle-create/verify.bsh
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-repository-plugin/src/it/bundle-create/verify.bsh?rev=809013&view=auto
==============================================================================
--- maven/plugins/trunk/maven-repository-plugin/src/it/bundle-create/verify.bsh 
(added)
+++ maven/plugins/trunk/maven-repository-plugin/src/it/bundle-create/verify.bsh 
Fri Aug 28 20:13:22 2009
@@ -0,0 +1,31 @@
+import java.io.*;
+import java.util.*;
+import java.util.jar.*;
+import java.util.regex.*;
+
+File jarFile = new File( basedir, "target/test-1.0-bundle.jar" );
+System.out.println( "Checking for existence of " + jarFile );
+if ( !jarFile.isFile() )
+{
+    throw new IllegalStateException( "Missing file: " + jarFile );
+}
+
+JarFile jar = new JarFile( jarFile );
+
+String[] includedEntries = {
+    "pom.xml",
+    "test-1.0.jar",
+    "test-1.0-sources.jar",
+};
+for ( String included : includedEntries )
+{
+    System.out.println( "Checking for existence of " + included );
+    if ( jar.getEntry( included ) == null )
+    {
+        throw new IllegalStateException( "Missing archive entry: " + included 
);
+    }
+}
+
+jar.close();
+
+return true;

Propchange: 
maven/plugins/trunk/maven-repository-plugin/src/it/bundle-create/verify.bsh
------------------------------------------------------------------------------
    svn:eol-style = native

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

Added: 
maven/plugins/trunk/maven-repository-plugin/src/it/bundle-pack/invoker.properties
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-repository-plugin/src/it/bundle-pack/invoker.properties?rev=809013&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-repository-plugin/src/it/bundle-pack/invoker.properties
 (added)
+++ 
maven/plugins/trunk/maven-repository-plugin/src/it/bundle-pack/invoker.properties
 Fri Aug 28 20:13:22 2009
@@ -0,0 +1 @@
+invoker.goals = 
${project.groupId}:${project.artifactId}:${project.version}:bundle-pack

Propchange: 
maven/plugins/trunk/maven-repository-plugin/src/it/bundle-pack/invoker.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-repository-plugin/src/it/bundle-pack/invoker.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-repository-plugin/src/it/bundle-pack/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-repository-plugin/src/it/bundle-pack/pom.xml?rev=809013&view=auto
==============================================================================
--- maven/plugins/trunk/maven-repository-plugin/src/it/bundle-pack/pom.xml 
(added)
+++ maven/plugins/trunk/maven-repository-plugin/src/it/bundle-pack/pom.xml Fri 
Aug 28 20:13:22 2009
@@ -0,0 +1,28 @@
+<?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/xsd/maven-4.0.0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.repository</groupId>
+  <artifactId>test</artifactId>
+  <version>1.0</version>
+</project>

Propchange: 
maven/plugins/trunk/maven-repository-plugin/src/it/bundle-pack/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

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

Added: 
maven/plugins/trunk/maven-repository-plugin/src/it/bundle-pack/test.properties
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-repository-plugin/src/it/bundle-pack/test.properties?rev=809013&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-repository-plugin/src/it/bundle-pack/test.properties 
(added)
+++ 
maven/plugins/trunk/maven-repository-plugin/src/it/bundle-pack/test.properties 
Fri Aug 28 20:13:22 2009
@@ -0,0 +1,3 @@
+groupId = junit
+artifactId = junit
+version = 3.8.2

Propchange: 
maven/plugins/trunk/maven-repository-plugin/src/it/bundle-pack/test.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-repository-plugin/src/it/bundle-pack/test.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-repository-plugin/src/it/bundle-pack/verify.bsh
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-repository-plugin/src/it/bundle-pack/verify.bsh?rev=809013&view=auto
==============================================================================
--- maven/plugins/trunk/maven-repository-plugin/src/it/bundle-pack/verify.bsh 
(added)
+++ maven/plugins/trunk/maven-repository-plugin/src/it/bundle-pack/verify.bsh 
Fri Aug 28 20:13:22 2009
@@ -0,0 +1,30 @@
+import java.io.*;
+import java.util.*;
+import java.util.jar.*;
+import java.util.regex.*;
+
+File jarFile = new File( basedir, "junit-3.8.2-bundle.jar" );
+System.out.println( "Checking for existence of " + jarFile );
+if ( !jarFile.isFile() )
+{
+    throw new IllegalStateException( "Missing file: " + jarFile );
+}
+
+JarFile jar = new JarFile( jarFile );
+
+String[] includedEntries = {
+    "pom.xml",
+    "junit-3.8.2.jar",
+};
+for ( String included : includedEntries )
+{
+    System.out.println( "Checking for existence of " + included );
+    if ( jar.getEntry( included ) == null )
+    {
+        throw new IllegalStateException( "Missing archive entry: " + included 
);
+    }
+}
+
+jar.close();
+
+return true;

Propchange: 
maven/plugins/trunk/maven-repository-plugin/src/it/bundle-pack/verify.bsh
------------------------------------------------------------------------------
    svn:eol-style = native

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

Added: maven/plugins/trunk/maven-repository-plugin/src/it/settings.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-repository-plugin/src/it/settings.xml?rev=809013&view=auto
==============================================================================
--- maven/plugins/trunk/maven-repository-plugin/src/it/settings.xml (added)
+++ maven/plugins/trunk/maven-repository-plugin/src/it/settings.xml Fri Aug 28 
20:13:22 2009
@@ -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.
+-->
+
+<settings>
+  <profiles>
+    <profile>
+      <id>it-repo</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
+      <repositories>
+        <repository>
+          <id>local.central</id>
+          <url>@localRepositoryUrl@</url>
+          <releases>
+            <enabled>true</enabled>
+          </releases>
+          <snapshots>
+            <enabled>true</enabled>
+          </snapshots>
+        </repository>
+      </repositories>
+      <pluginRepositories>
+        <pluginRepository>
+          <id>local.central</id>
+          <url>@localRepositoryUrl@</url>
+          <releases>
+            <enabled>true</enabled>
+          </releases>
+          <snapshots>
+            <enabled>true</enabled>
+          </snapshots>
+        </pluginRepository>
+      </pluginRepositories>
+    </profile>
+  </profiles>
+</settings>

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

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


Reply via email to