You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ol...@apache.org on 2007/12/08 00:03:44 UTC

svn commit: r602261 - in /maven/plugins/trunk/maven-jar-plugin: ./ src/it/ src/it/mjar-30-01/ src/it/mjar-30-01/src/ src/it/mjar-30-02/ src/it/mjar-30-02/src/ src/it/mjar-30-03/ src/it/mjar-30-03/src/ src/it/mjar-80-01/ src/it/mjar-80-01/src/ src/it/mj...

Author: olamy
Date: Fri Dec  7 15:03:27 2007
New Revision: 602261

URL: http://svn.apache.org/viewvc?rev=602261&view=rev
Log:
[MJAR-88] use maven-invoker-plugin instead of maven-embedder for it tests
[MJAR-49] upgrade to p-u 1.4.8 

Added:
    maven/plugins/trunk/maven-jar-plugin/src/it/mjar-30-01/
      - copied from r601881, maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-30-01/
    maven/plugins/trunk/maven-jar-plugin/src/it/mjar-30-01/pom.xml
      - copied, changed from r602260, maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-30-01/pom.xml
    maven/plugins/trunk/maven-jar-plugin/src/it/mjar-30-01/src/
      - copied from r602260, maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-30-01/src/
    maven/plugins/trunk/maven-jar-plugin/src/it/mjar-30-01/verify.bsh   (with props)
    maven/plugins/trunk/maven-jar-plugin/src/it/mjar-30-02/
      - copied from r601881, maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-30-02/
    maven/plugins/trunk/maven-jar-plugin/src/it/mjar-30-02/pom.xml
      - copied, changed from r602260, maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-30-02/pom.xml
    maven/plugins/trunk/maven-jar-plugin/src/it/mjar-30-02/src/
      - copied from r602260, maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-30-02/src/
    maven/plugins/trunk/maven-jar-plugin/src/it/mjar-30-02/verify.bsh   (with props)
    maven/plugins/trunk/maven-jar-plugin/src/it/mjar-30-03/
      - copied from r601881, maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-30-03/
    maven/plugins/trunk/maven-jar-plugin/src/it/mjar-30-03/pom.xml
      - copied, changed from r602260, maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-30-03/pom.xml
    maven/plugins/trunk/maven-jar-plugin/src/it/mjar-30-03/src/
      - copied from r602260, maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-30-03/src/
    maven/plugins/trunk/maven-jar-plugin/src/it/mjar-30-03/verify.bsh   (with props)
    maven/plugins/trunk/maven-jar-plugin/src/it/mjar-80-01/
      - copied from r601881, maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-80-01/
    maven/plugins/trunk/maven-jar-plugin/src/it/mjar-80-01/pom.xml
      - copied, changed from r602260, maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-80-01/pom.xml
    maven/plugins/trunk/maven-jar-plugin/src/it/mjar-80-01/src/
      - copied from r602260, maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-80-01/src/
    maven/plugins/trunk/maven-jar-plugin/src/it/mjar-80-01/verify.bsh   (with props)
    maven/plugins/trunk/maven-jar-plugin/src/it/mjar-80-02/
      - copied from r601881, maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-80-02/
    maven/plugins/trunk/maven-jar-plugin/src/it/mjar-80-02/pom.xml
      - copied, changed from r602260, maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-80-02/pom.xml
    maven/plugins/trunk/maven-jar-plugin/src/it/mjar-80-02/src/
      - copied from r602260, maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-80-02/src/
    maven/plugins/trunk/maven-jar-plugin/src/it/mjar-80-02/verify.bsh   (with props)
    maven/plugins/trunk/maven-jar-plugin/src/it/mjar-80-03/
      - copied from r601881, maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-80-03/
    maven/plugins/trunk/maven-jar-plugin/src/it/mjar-80-03/pom.xml
      - copied, changed from r602260, maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-80-03/pom.xml
    maven/plugins/trunk/maven-jar-plugin/src/it/mjar-80-03/src/
      - copied from r602260, maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-80-03/src/
    maven/plugins/trunk/maven-jar-plugin/src/it/mjar-80-03/verify.bsh   (with props)
    maven/plugins/trunk/maven-jar-plugin/src/it/project-004/
      - copied from r601881, maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/project-004/
    maven/plugins/trunk/maven-jar-plugin/src/it/project-004/pom.xml
      - copied, changed from r602260, maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/project-004/pom.xml
    maven/plugins/trunk/maven-jar-plugin/src/it/project-004/src/
      - copied from r602260, maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/project-004/src/
    maven/plugins/trunk/maven-jar-plugin/src/it/project-004/verify.bsh   (with props)
Removed:
    maven/plugins/trunk/maven-jar-plugin/src/it/pom.xml
    maven/plugins/trunk/maven-jar-plugin/src/test/java/org/apache/maven/plugin/jar/JarMojoIntegrationTest.java
    maven/plugins/trunk/maven-jar-plugin/src/test/java/org/apache/maven/plugin/jar/TestJarMojoIntegrationTest.java
    maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-30-01/
    maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-30-02/
    maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-30-03/
    maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-80-01/
    maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-80-02/
    maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-80-03/
    maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/project-004/
Modified:
    maven/plugins/trunk/maven-jar-plugin/pom.xml

Modified: maven/plugins/trunk/maven-jar-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jar-plugin/pom.xml?rev=602261&r1=602260&r2=602261&view=diff
==============================================================================
--- maven/plugins/trunk/maven-jar-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-jar-plugin/pom.xml Fri Dec  7 15:03:27 2007
@@ -31,7 +31,7 @@
   <name>Maven Jar Plugin</name>
   <version>2.2-SNAPSHOT</version>
   <prerequisites>
-    <maven>2.0</maven>
+    <maven>2.0.6</maven>
   </prerequisites>
   <issueManagement>
     <system>JIRA</system>
@@ -61,7 +61,7 @@
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
-      <version>2.0</version>
+      <version>2.0.6</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
@@ -79,9 +79,14 @@
       <version>2.1</version>
     </dependency>
     <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-utils</artifactId>
+      <version>1.4.8</version>
+    </dependency>
+    <dependency>
       <groupId>org.apache.maven.shared</groupId>
       <artifactId>maven-plugin-testing-harness</artifactId>
-      <version>1.0-beta-1</version>
+      <version>1.1</version>
       <scope>test</scope>
     </dependency>
     <dependency>
@@ -136,36 +141,75 @@
   </build>
   <profiles>
     <profile>
-      <id>integration-test</id>
+      <id>integration-tests</id>
       <activation>
-        <activeByDefault>true</activeByDefault>
+        <property>
+          <name>maven.test.skip</name>
+          <value>!true</value>
+        </property>
       </activation>
       <build>
         <plugins>
           <plugin>
             <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-surefire-plugin</artifactId>
-            <version>2.3</version>
+            <artifactId>maven-install-plugin</artifactId>
+            <version>2.2</version>
             <executions>
               <execution>
                 <id>integration-test</id>
-                <phase>integration-test</phase>
+                <phase>pre-integration-test</phase>
                 <goals>
-                  <goal>test</goal>
+                  <goal>install-file</goal>
                 </goals>
                 <configuration>
-                  <excludes>
-                    <exclude>none</exclude>
-                  </excludes>
-                  <includes>
-                    <include>**/*IntegrationTest.java</include>
-                  </includes>
+                  <file>${project.build.directory}/${project.build.finalName}.jar</file>
+                  <groupId>${project.groupId}</groupId>
+                  <artifactId>${project.artifactId}</artifactId>
+                  <version>${project.version}</version>
+                  <packaging>${project.packaging}</packaging>
+                  <pomFile>${basedir}/pom.xml</pomFile>
+                  <createChecksum>true</createChecksum>
+                  <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
+                  <localRepositoryId>it-local-repo</localRepositoryId>
                 </configuration>
               </execution>
             </executions>
           </plugin>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-invoker-plugin</artifactId>
+            <version>1.1-SNAPSHOT</version>
+            <configuration>
+              <projectsDirectory>src/it</projectsDirectory>
+              <pomIncludes>
+                <pomInclude>**/**/pom.xml</pomInclude>
+              </pomIncludes>
+              <postBuildHookScript>verify.bsh</postBuildHookScript>
+              <localRepositoryPath>${basedir}/target/local-repo</localRepositoryPath>
+              <goals>
+                <goal>clean</goal>
+                <goal>package</goal>
+              </goals>
+            </configuration>
+            <executions>
+              <execution>
+                <id>integration-test</id>
+                <phase>integration-test</phase>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
         </plugins>
       </build>
+      <!-- TODO remove when invoker plugin is released -->
+      <pluginRepositories>
+        <pluginRepository>
+          <id>apache.snapshots</id>
+          <url>http://people.apache.org/repo/m2-snapshot-repository</url>
+        </pluginRepository>
+      </pluginRepositories>
     </profile>
   </profiles>
   <reporting>

Copied: maven/plugins/trunk/maven-jar-plugin/src/it/mjar-30-01/pom.xml (from r602260, maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-30-01/pom.xml)
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jar-plugin/src/it/mjar-30-01/pom.xml?p2=maven/plugins/trunk/maven-jar-plugin/src/it/mjar-30-01/pom.xml&p1=maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-30-01/pom.xml&r1=602260&r2=602261&rev=602261&view=diff
==============================================================================
--- maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-30-01/pom.xml (original)
+++ maven/plugins/trunk/maven-jar-plugin/src/it/mjar-30-01/pom.xml Fri Dec  7 15:03:27 2007
@@ -28,6 +28,7 @@
   <name>Maven</name>
   <packaging>jar</packaging>
   <url>http://maven.apache.org</url>
+  <description>Tests the normal behavior of jar-plugin.</description>
   <dependencies>
     <dependency>
       <groupId>junit</groupId>
@@ -41,7 +42,7 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-jar-plugin</artifactId>
-        <version>2.2-it-SNAPSHOT</version>
+        <version>@pom.version@</version>
       </plugin>
       <plugin>
         <artifactId>maven-surefire-plugin</artifactId>

Added: maven/plugins/trunk/maven-jar-plugin/src/it/mjar-30-01/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jar-plugin/src/it/mjar-30-01/verify.bsh?rev=602261&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jar-plugin/src/it/mjar-30-01/verify.bsh (added)
+++ maven/plugins/trunk/maven-jar-plugin/src/it/mjar-30-01/verify.bsh Fri Dec  7 15:03:27 2007
@@ -0,0 +1,85 @@
+
+/*
+ * 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.
+ */
+
+import java.io.*;
+import java.util.*;
+import java.util.jar.*;
+import org.codehaus.plexus.util.*;
+
+boolean result = true;
+
+try
+{
+    File target = new File( basedir, "target" );
+    if ( !target.exists() || !target.isDirectory() )
+    {
+        System.err.println( "target file is missing or not a directory." );
+        return false;
+    }
+    
+    File artifact = new File ( target, "maven-jar-plugin-test-mjar-30-01-99.0.jar" );
+    if ( !artifact.exists() || artifact.isDirectory() )
+    {
+        System.err.println( "artifact file is missing or a directory." );
+        return false;
+    }    
+    
+    String[] artifactNames = new String[] { "default-configuration.properties",
+            "foo/project001/App.class", "META-INF/MANIFEST.MF",
+            "META-INF/maven/org.apache.maven.plugins/maven-jar-plugin-test-mjar-30-01/pom.properties",
+            "META-INF/maven/org.apache.maven.plugins/maven-jar-plugin-test-mjar-30-01/pom.xml" };
+    
+    Set contents = new HashSet();
+
+    JarFile jar = new JarFile( artifact );
+    Enumeration jarEntries = jar.entries();
+    while ( jarEntries.hasMoreElements() )
+    {
+        JarEntry entry = (JarEntry) jarEntries.nextElement();
+        if ( !entry.isDirectory() )
+        {
+            // Only compare files
+            contents.add( entry.getName() );
+        }
+    }
+
+    if  ( artifactNames.length != contents.size() )
+    {
+    	System.err.println( "jar content size is different from the expected content size" );
+    	return false;
+    }
+    for ( int i = 0; i < artifactNames.length; i++ )
+    {
+        String artifactName = artifactNames[i];
+		if ( !contents.contains( artifactName ) )
+		{
+        	System.err.println( "Artifact[" + artifactName + "] not found in jar archive" );
+        	return false;
+        }
+    }    
+    
+}
+catch( Throwable e )
+{
+    e.printStackTrace();
+    result = false;
+}
+
+return result;

Propchange: maven/plugins/trunk/maven-jar-plugin/src/it/mjar-30-01/verify.bsh
------------------------------------------------------------------------------
    svn:executable = *

Copied: maven/plugins/trunk/maven-jar-plugin/src/it/mjar-30-02/pom.xml (from r602260, maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-30-02/pom.xml)
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jar-plugin/src/it/mjar-30-02/pom.xml?p2=maven/plugins/trunk/maven-jar-plugin/src/it/mjar-30-02/pom.xml&p1=maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-30-02/pom.xml&r1=602260&r2=602261&rev=602261&view=diff
==============================================================================
--- maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-30-02/pom.xml (original)
+++ maven/plugins/trunk/maven-jar-plugin/src/it/mjar-30-02/pom.xml Fri Dec  7 15:03:27 2007
@@ -27,15 +27,16 @@
   <name>Maven</name>
   <packaging>jar</packaging>
   <url>http://maven.apache.org</url>
+  <description>Tests a includes.</description>
   <build>
     <plugins>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-jar-plugin</artifactId>
-        <version>2.2-it-SNAPSHOT</version>
+        <version>@pom.version@</version>
         <configuration>
           <includes>
-               <include>**/service/*</include>
+            <include>**/service/*</include>
           </includes>
         </configuration>
       </plugin>

Added: maven/plugins/trunk/maven-jar-plugin/src/it/mjar-30-02/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jar-plugin/src/it/mjar-30-02/verify.bsh?rev=602261&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jar-plugin/src/it/mjar-30-02/verify.bsh (added)
+++ maven/plugins/trunk/maven-jar-plugin/src/it/mjar-30-02/verify.bsh Fri Dec  7 15:03:27 2007
@@ -0,0 +1,84 @@
+
+/*
+ * 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.
+ */
+
+import java.io.*;
+import java.util.*;
+import java.util.jar.*;
+import org.codehaus.plexus.util.*;
+
+boolean result = true;
+
+try
+{
+    File target = new File( basedir, "target" );
+    if ( !target.exists() || !target.isDirectory() )
+    {
+        System.err.println( "target file is missing or not a directory." );
+        return false;
+    }
+    
+    File artifact = new File ( target, "maven-jar-plugin-test-mjar-30-02-99.0.jar" );
+    if ( !artifact.exists() || artifact.isDirectory() )
+    {
+        System.err.println( "artifact file is missing or a directory." );
+        return false;
+    }    
+    
+    String[] artifactNames = new String[] { "service/TestInterface.class", "META-INF/MANIFEST.MF",
+            "META-INF/maven/org.apache.maven.plugins/maven-jar-plugin-test-mjar-30-02/pom.properties",
+            "META-INF/maven/org.apache.maven.plugins/maven-jar-plugin-test-mjar-30-02/pom.xml" };
+    
+    Set contents = new HashSet();
+
+    JarFile jar = new JarFile( artifact );
+    Enumeration jarEntries = jar.entries();
+    while ( jarEntries.hasMoreElements() )
+    {
+        JarEntry entry = (JarEntry) jarEntries.nextElement();
+        if ( !entry.isDirectory() )
+        {
+            // Only compare files
+            contents.add( entry.getName() );
+        }
+    }
+
+    if  ( artifactNames.length != contents.size() )
+    {
+    	System.err.println( "jar content size is different from the expected content size" );
+    	return false;
+    }
+    for ( int i = 0; i < artifactNames.length; i++ )
+    {
+        String artifactName = artifactNames[i];
+		if ( !contents.contains( artifactName ) )
+		{
+        	System.err.println( "Artifact[" + artifactName + "] not found in jar archive" );
+        	return false;
+        }
+    }    
+    
+}
+catch( Throwable e )
+{
+    e.printStackTrace();
+    result = false;
+}
+
+return result;

Propchange: maven/plugins/trunk/maven-jar-plugin/src/it/mjar-30-02/verify.bsh
------------------------------------------------------------------------------
    svn:executable = *

Copied: maven/plugins/trunk/maven-jar-plugin/src/it/mjar-30-03/pom.xml (from r602260, maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-30-03/pom.xml)
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jar-plugin/src/it/mjar-30-03/pom.xml?p2=maven/plugins/trunk/maven-jar-plugin/src/it/mjar-30-03/pom.xml&p1=maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-30-03/pom.xml&r1=602260&r2=602261&rev=602261&view=diff
==============================================================================
--- maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-30-03/pom.xml (original)
+++ maven/plugins/trunk/maven-jar-plugin/src/it/mjar-30-03/pom.xml Fri Dec  7 15:03:27 2007
@@ -27,6 +27,7 @@
   <version>99.0</version>
   <name>Maven</name>
   <packaging>jar</packaging>
+  <description>Tests excludes.</description>
   <dependencies>
     <dependency>
       <groupId>junit</groupId>
@@ -40,7 +41,7 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-jar-plugin</artifactId>
-        <version>2.2-it-SNAPSHOT</version>
+        <version>@pom.version@</version>
         <configuration>
           <excludes>
             <exclude>**/*.class</exclude>

Added: maven/plugins/trunk/maven-jar-plugin/src/it/mjar-30-03/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jar-plugin/src/it/mjar-30-03/verify.bsh?rev=602261&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jar-plugin/src/it/mjar-30-03/verify.bsh (added)
+++ maven/plugins/trunk/maven-jar-plugin/src/it/mjar-30-03/verify.bsh Fri Dec  7 15:03:27 2007
@@ -0,0 +1,84 @@
+
+/*
+ * 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.
+ */
+
+import java.io.*;
+import java.util.*;
+import java.util.jar.*;
+import org.codehaus.plexus.util.*;
+
+boolean result = true;
+
+try
+{
+    File target = new File( basedir, "target" );
+    if ( !target.exists() || !target.isDirectory() )
+    {
+        System.err.println( "target file is missing or not a directory." );
+        return false;
+    }
+    
+    File artifact = new File ( target, "maven-jar-plugin-test-mjar-30-03-99.0.jar" );
+    if ( !artifact.exists() || artifact.isDirectory() )
+    {
+        System.err.println( "artifact file is missing or a directory." );
+        return false;
+    }    
+    
+    String[] artifactNames = new String[] { "default-configuration.properties", "META-INF/MANIFEST.MF",
+            "META-INF/maven/org.apache.maven.plugins/maven-jar-plugin-test-mjar-30-03/pom.properties",
+            "META-INF/maven/org.apache.maven.plugins/maven-jar-plugin-test-mjar-30-03/pom.xml" };
+    
+    Set contents = new HashSet();
+
+    JarFile jar = new JarFile( artifact );
+    Enumeration jarEntries = jar.entries();
+    while ( jarEntries.hasMoreElements() )
+    {
+        JarEntry entry = (JarEntry) jarEntries.nextElement();
+        if ( !entry.isDirectory() )
+        {
+            // Only compare files
+            contents.add( entry.getName() );
+        }
+    }
+
+    if  ( artifactNames.length != contents.size() )
+    {
+    	System.err.println( "jar content size is different from the expected content size" );
+    	return false;
+    }
+    for ( int i = 0; i < artifactNames.length; i++ )
+    {
+        String artifactName = artifactNames[i];
+		if ( !contents.contains( artifactName ) )
+		{
+        	System.err.println( "Artifact[" + artifactName + "] not found in jar archive" );
+        	return false;
+        }
+    }    
+    
+}
+catch( Throwable e )
+{
+    e.printStackTrace();
+    result = false;
+}
+
+return result;

Propchange: maven/plugins/trunk/maven-jar-plugin/src/it/mjar-30-03/verify.bsh
------------------------------------------------------------------------------
    svn:executable = *

Copied: maven/plugins/trunk/maven-jar-plugin/src/it/mjar-80-01/pom.xml (from r602260, maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-80-01/pom.xml)
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jar-plugin/src/it/mjar-80-01/pom.xml?p2=maven/plugins/trunk/maven-jar-plugin/src/it/mjar-80-01/pom.xml&p1=maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-80-01/pom.xml&r1=602260&r2=602261&rev=602261&view=diff
==============================================================================
--- maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-80-01/pom.xml (original)
+++ maven/plugins/trunk/maven-jar-plugin/src/it/mjar-80-01/pom.xml Fri Dec  7 15:03:27 2007
@@ -27,6 +27,7 @@
   <version>99.0</version>
   <name>Maven</name>
   <packaging>jar</packaging>
+  <description>Tests the normal behavior of test-jar-plugin.</description>
   <dependencies>
     <dependency>
       <groupId>junit</groupId>
@@ -40,7 +41,7 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-jar-plugin</artifactId>
-        <version>2.2-it-SNAPSHOT</version>
+        <version>@pom.version@</version>
         <executions>
           <execution>
             <goals>

Added: maven/plugins/trunk/maven-jar-plugin/src/it/mjar-80-01/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jar-plugin/src/it/mjar-80-01/verify.bsh?rev=602261&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jar-plugin/src/it/mjar-80-01/verify.bsh (added)
+++ maven/plugins/trunk/maven-jar-plugin/src/it/mjar-80-01/verify.bsh Fri Dec  7 15:03:27 2007
@@ -0,0 +1,92 @@
+
+/*
+ * 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.
+ */
+
+import java.io.*;
+import java.util.*;
+import java.util.jar.*;
+import org.codehaus.plexus.util.*;
+
+boolean result = true;
+
+try
+{
+    File target = new File( basedir, "target" );
+    if ( !target.exists() || !target.isDirectory() )
+    {
+        System.err.println( "target file is missing or not a directory." );
+        return false;
+    }
+    
+    File artifact = new File ( target, "maven-jar-plugin-test-mjar-80-01-99.0.jar" );
+    if ( !artifact.exists() || artifact.isDirectory() )
+    {
+        System.err.println( "artifact file is missing or a directory." );
+        return false;
+    }     
+    
+    File testArtifact = new File ( target, "maven-jar-plugin-test-mjar-80-01-99.0-tests.jar" );
+    if ( !testArtifact.exists() || testArtifact.isDirectory() )
+    {
+        System.err.println( "testArtifact file is missing or a directory." );
+        return false;
+    }    
+    
+    String[] artifactNames =  new String[] { "test-default-configuration.properties",
+            "foo/project003/AppTest.class", "foo/project003/AppIntegrationTest.class", "META-INF/MANIFEST.MF",
+            "META-INF/maven/org.apache.maven.plugins/maven-jar-plugin-test-mjar-80-01/pom.properties",
+            "META-INF/maven/org.apache.maven.plugins/maven-jar-plugin-test-mjar-80-01/pom.xml" };
+    
+    Set contents = new HashSet();
+
+    JarFile jar = new JarFile( testArtifact );
+    Enumeration jarEntries = jar.entries();
+    while ( jarEntries.hasMoreElements() )
+    {
+        JarEntry entry = (JarEntry) jarEntries.nextElement();
+        if ( !entry.isDirectory() )
+        {
+            // Only compare files
+            contents.add( entry.getName() );
+        }
+    }
+
+    if  ( artifactNames.length != contents.size() )
+    {
+    	System.err.println( "jar content size is different from the expected content size" );
+    	return false;
+    }
+    for ( int i = 0; i < artifactNames.length; i++ )
+    {
+        String artifactName = artifactNames[i];
+		if ( !contents.contains( artifactName ) )
+		{
+        	System.err.println( "Artifact[" + artifactName + "] not found in jar archive" );
+        	return false;
+        }
+    }    
+    
+}
+catch( Throwable e )
+{
+    e.printStackTrace();
+    result = false;
+}
+
+return result;

Propchange: maven/plugins/trunk/maven-jar-plugin/src/it/mjar-80-01/verify.bsh
------------------------------------------------------------------------------
    svn:executable = *

Copied: maven/plugins/trunk/maven-jar-plugin/src/it/mjar-80-02/pom.xml (from r602260, maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-80-02/pom.xml)
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jar-plugin/src/it/mjar-80-02/pom.xml?p2=maven/plugins/trunk/maven-jar-plugin/src/it/mjar-80-02/pom.xml&p1=maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-80-02/pom.xml&r1=602260&r2=602261&rev=602261&view=diff
==============================================================================
--- maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-80-02/pom.xml (original)
+++ maven/plugins/trunk/maven-jar-plugin/src/it/mjar-80-02/pom.xml Fri Dec  7 15:03:27 2007
@@ -27,6 +27,7 @@
   <version>99.0</version>
   <name>Maven</name>
   <packaging>jar</packaging>
+  <description>Tests includes.</description>
   <dependencies>
     <dependency>
       <groupId>junit</groupId>
@@ -40,7 +41,7 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-jar-plugin</artifactId>
-        <version>2.2-it-SNAPSHOT</version>
+        <version>@pom.version@</version>
         <executions>
           <execution>
             <goals>

Added: maven/plugins/trunk/maven-jar-plugin/src/it/mjar-80-02/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jar-plugin/src/it/mjar-80-02/verify.bsh?rev=602261&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jar-plugin/src/it/mjar-80-02/verify.bsh (added)
+++ maven/plugins/trunk/maven-jar-plugin/src/it/mjar-80-02/verify.bsh Fri Dec  7 15:03:27 2007
@@ -0,0 +1,92 @@
+
+/*
+ * 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.
+ */
+
+import java.io.*;
+import java.util.*;
+import java.util.jar.*;
+import org.codehaus.plexus.util.*;
+
+boolean result = true;
+
+try
+{
+    File target = new File( basedir, "target" );
+    if ( !target.exists() || !target.isDirectory() )
+    {
+        System.err.println( "target file is missing or not a directory." );
+        return false;
+    }
+    
+    File artifact = new File ( target, "maven-jar-plugin-test-mjar-80-02-99.0.jar" );
+    if ( !artifact.exists() || artifact.isDirectory() )
+    {
+        System.err.println( "artifact file is missing or a directory." );
+        return false;
+    }     
+    
+    File testArtifact = new File ( target, "maven-jar-plugin-test-mjar-80-02-99.0-tests.jar" );
+    if ( !testArtifact.exists() || testArtifact.isDirectory() )
+    {
+        System.err.println( "testArtifact file is missing or a directory." );
+        return false;
+    }    
+    
+    String[] artifactNames =  new String[] { "foo/project003/AppIntegrationTest.class",
+            "META-INF/MANIFEST.MF",
+            "META-INF/maven/org.apache.maven.plugins/maven-jar-plugin-test-mjar-80-02/pom.properties",
+            "META-INF/maven/org.apache.maven.plugins/maven-jar-plugin-test-mjar-80-02/pom.xml" };
+    
+    Set contents = new HashSet();
+
+    JarFile jar = new JarFile( testArtifact );
+    Enumeration jarEntries = jar.entries();
+    while ( jarEntries.hasMoreElements() )
+    {
+        JarEntry entry = (JarEntry) jarEntries.nextElement();
+        if ( !entry.isDirectory() )
+        {
+            // Only compare files
+            contents.add( entry.getName() );
+        }
+    }
+
+    if  ( artifactNames.length != contents.size() )
+    {
+    	System.err.println( "jar content size is different from the expected content size" );
+    	return false;
+    }
+    for ( int i = 0; i < artifactNames.length; i++ )
+    {
+        String artifactName = artifactNames[i];
+		if ( !contents.contains( artifactName ) )
+		{
+        	System.err.println( "Artifact[" + artifactName + "] not found in jar archive" );
+        	return false;
+        }
+    }    
+    
+}
+catch( Throwable e )
+{
+    e.printStackTrace();
+    result = false;
+}
+
+return result;

Propchange: maven/plugins/trunk/maven-jar-plugin/src/it/mjar-80-02/verify.bsh
------------------------------------------------------------------------------
    svn:executable = *

Copied: maven/plugins/trunk/maven-jar-plugin/src/it/mjar-80-03/pom.xml (from r602260, maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-80-03/pom.xml)
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jar-plugin/src/it/mjar-80-03/pom.xml?p2=maven/plugins/trunk/maven-jar-plugin/src/it/mjar-80-03/pom.xml&p1=maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-80-03/pom.xml&r1=602260&r2=602261&rev=602261&view=diff
==============================================================================
--- maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/mjar-80-03/pom.xml (original)
+++ maven/plugins/trunk/maven-jar-plugin/src/it/mjar-80-03/pom.xml Fri Dec  7 15:03:27 2007
@@ -27,6 +27,7 @@
   <version>99.0</version>
   <name>Maven</name>
   <packaging>jar</packaging>
+  <description>Tests excludes.</description>
   <dependencies>
     <dependency>
       <groupId>junit</groupId>
@@ -40,7 +41,7 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-jar-plugin</artifactId>
-        <version>2.2-it-SNAPSHOT</version>
+        <version>@pom.version@</version>
         <executions>
           <execution>
             <goals>

Added: maven/plugins/trunk/maven-jar-plugin/src/it/mjar-80-03/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jar-plugin/src/it/mjar-80-03/verify.bsh?rev=602261&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jar-plugin/src/it/mjar-80-03/verify.bsh (added)
+++ maven/plugins/trunk/maven-jar-plugin/src/it/mjar-80-03/verify.bsh Fri Dec  7 15:03:27 2007
@@ -0,0 +1,92 @@
+
+/*
+ * 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.
+ */
+
+import java.io.*;
+import java.util.*;
+import java.util.jar.*;
+import org.codehaus.plexus.util.*;
+
+boolean result = true;
+
+try
+{
+    File target = new File( basedir, "target" );
+    if ( !target.exists() || !target.isDirectory() )
+    {
+        System.err.println( "target file is missing or not a directory." );
+        return false;
+    }
+    
+    File artifact = new File ( target, "maven-jar-plugin-test-mjar-80-03-99.0.jar" );
+    if ( !artifact.exists() || artifact.isDirectory() )
+    {
+        System.err.println( "artifact file is missing or a directory." );
+        return false;
+    }     
+    
+    File testArtifact = new File ( target, "maven-jar-plugin-test-mjar-80-03-99.0-tests.jar" );
+    if ( !testArtifact.exists() || testArtifact.isDirectory() )
+    {
+        System.err.println( "testArtifact file is missing or a directory." );
+        return false;
+    }    
+    
+    String[] artifactNames = new String[] { "test-default-configuration.properties",
+            "foo/project003/AppTest.class", "foo/project003/AppIntegrationTest.class", "META-INF/MANIFEST.MF",
+            "META-INF/maven/org.apache.maven.plugins/maven-jar-plugin-test-mjar-80-03/pom.properties",
+            "META-INF/maven/org.apache.maven.plugins/maven-jar-plugin-test-mjar-80-03/pom.xml" };
+    
+    Set contents = new HashSet();
+
+    JarFile jar = new JarFile( testArtifact );
+    Enumeration jarEntries = jar.entries();
+    while ( jarEntries.hasMoreElements() )
+    {
+        JarEntry entry = (JarEntry) jarEntries.nextElement();
+        if ( !entry.isDirectory() )
+        {
+            // Only compare files
+            contents.add( entry.getName() );
+        }
+    }
+
+    if  ( artifactNames.length != contents.size() )
+    {
+    	System.err.println( "jar content size is different from the expected content size" );
+    	return false;
+    }
+    for ( int i = 0; i < artifactNames.length; i++ )
+    {
+        String artifactName = artifactNames[i];
+		if ( !contents.contains( artifactName ) )
+		{
+        	System.err.println( "Artifact[" + artifactName + "] not found in jar archive" );
+        	return false;
+        }
+    }    
+    
+}
+catch( Throwable e )
+{
+    e.printStackTrace();
+    result = false;
+}
+
+return result;

Propchange: maven/plugins/trunk/maven-jar-plugin/src/it/mjar-80-03/verify.bsh
------------------------------------------------------------------------------
    svn:executable = *

Copied: maven/plugins/trunk/maven-jar-plugin/src/it/project-004/pom.xml (from r602260, maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/project-004/pom.xml)
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jar-plugin/src/it/project-004/pom.xml?p2=maven/plugins/trunk/maven-jar-plugin/src/it/project-004/pom.xml&p1=maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/project-004/pom.xml&r1=602260&r2=602261&rev=602261&view=diff
==============================================================================
--- maven/plugins/trunk/maven-jar-plugin/src/test/resources/it/project-004/pom.xml (original)
+++ maven/plugins/trunk/maven-jar-plugin/src/it/project-004/pom.xml Fri Dec  7 15:03:27 2007
@@ -28,12 +28,13 @@
   <name>Maven</name>
   <packaging>jar</packaging>
   <url>http://maven.apache.org</url>
+  <description>testMultipleJars</description>
   <build>
     <plugins>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-jar-plugin</artifactId>
-        <version>2.2-it-SNAPSHOT</version>
+        <version>@pom.version@</version>
         <executions>
           <execution>
             <phase>package</phase>

Added: maven/plugins/trunk/maven-jar-plugin/src/it/project-004/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jar-plugin/src/it/project-004/verify.bsh?rev=602261&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jar-plugin/src/it/project-004/verify.bsh (added)
+++ maven/plugins/trunk/maven-jar-plugin/src/it/project-004/verify.bsh Fri Dec  7 15:03:27 2007
@@ -0,0 +1,127 @@
+
+/*
+ * 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.
+ */
+
+import java.io.*;
+import java.util.*;
+import java.util.jar.*;
+import org.codehaus.plexus.util.*;
+
+boolean result = true;
+
+try
+{
+    File target = new File( basedir, "target" );
+    if ( !target.exists() || !target.isDirectory() )
+    {
+        System.err.println( "target file is missing or not a directory." );
+        return false;
+    }
+    
+    File artifact = new File ( target, "maven-jar-plugin-test-project-004-99.0.jar" );
+    if ( !artifact.exists() || artifact.isDirectory() )
+    {
+        System.err.println( "target file is missing or a directory." );
+        return false;
+    }    
+    
+    String[] artifactNames = new String[] { "service/TestInterface.class",
+            "service/impl/TestImplementation.class", "TestCompile1.class", "notIncluded.xml", "META-INF/MANIFEST.MF",
+            "META-INF/maven/org.apache.maven.plugins/maven-jar-plugin-test-project-004/pom.properties",
+            "META-INF/maven/org.apache.maven.plugins/maven-jar-plugin-test-project-004/pom.xml" };
+    
+    Set contents = new HashSet();
+
+    JarFile jar = new JarFile( artifact );
+    Enumeration jarEntries = jar.entries();
+    while ( jarEntries.hasMoreElements() )
+    {
+        JarEntry entry = (JarEntry) jarEntries.nextElement();
+        if ( !entry.isDirectory() )
+        {
+            // Only compare files
+            contents.add( entry.getName() );
+        }
+    }
+
+    if  ( artifactNames.length != contents.size() )
+    {
+    	System.err.println( "jar content size is different from the expected content size" );
+    	return false;
+    }
+    for ( int i = 0; i < artifactNames.length; i++ )
+    {
+        String artifactName = artifactNames[i];
+		if ( !contents.contains( artifactName ) )
+		{
+        	System.err.println( "Artifact[" + artifactName + "] not found in jar archive" );
+        	return false;
+        }
+    }    
+    
+    // second jar
+    
+    artifact = new File ( target, "maven-jar-plugin-test-project-004-99.0-service.jar" );
+    if ( !artifact.exists() || artifact.isDirectory() )
+    {
+        System.err.println( "target file is missing or a directory." );
+        return false;
+    }    
+    
+    artifactNames =  new String[] { "service/TestInterface.class",
+            "META-INF/MANIFEST.MF",
+            "META-INF/maven/org.apache.maven.plugins/maven-jar-plugin-test-project-004/pom.properties",
+            "META-INF/maven/org.apache.maven.plugins/maven-jar-plugin-test-project-004/pom.xml" };
+    
+    contents = new HashSet();
+
+    jar = new JarFile( artifact );
+    jarEntries = jar.entries();
+    while ( jarEntries.hasMoreElements() )
+    {
+        JarEntry entry = (JarEntry) jarEntries.nextElement();
+        if ( !entry.isDirectory() )
+        {
+            // Only compare files
+            contents.add( entry.getName() );
+        }
+    }
+
+    if  ( artifactNames.length != contents.size() )
+    {
+    	System.err.println( "jar content size is different from the expected content size" );
+    	return false;
+    }
+    for ( int i = 0; i < artifactNames.length; i++ )
+    {
+        String artifactName = artifactNames[i];
+		if ( !contents.contains( artifactName ) )
+		{
+        	System.err.println( "Artifact[" + artifactName + "] not found in jar archive" );
+        	return false;
+        }
+    } 
+}
+catch( Throwable e )
+{
+    e.printStackTrace();
+    result = false;
+}
+
+return result;

Propchange: maven/plugins/trunk/maven-jar-plugin/src/it/project-004/verify.bsh
------------------------------------------------------------------------------
    svn:executable = *