maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krosenv...@apache.org
Subject svn commit: r1421845 - in /maven/shared/trunk/maven-verifier/src: main/java/org/apache/maven/it/ test/java/org/apache/maven/it/ test/resources/ test/resources/META-INF/
Date Fri, 14 Dec 2012 13:25:08 GMT
Author: krosenvold
Date: Fri Dec 14 13:25:07 2012
New Revision: 1421845

URL: http://svn.apache.org/viewvc?rev=1421845&view=rev
Log:
[MSHARED-104] Verifier#assertFileNotPresent() fails when looking for an unwanted jar resource

Added:
    maven/shared/trunk/maven-verifier/src/test/resources/
    maven/shared/trunk/maven-verifier/src/test/resources/META-INF/
    maven/shared/trunk/maven-verifier/src/test/resources/META-INF/MANIFEST.MF
    maven/shared/trunk/maven-verifier/src/test/resources/mshared104.jar
    maven/shared/trunk/maven-verifier/src/test/resources/pom.xml
Modified:
    maven/shared/trunk/maven-verifier/src/main/java/org/apache/maven/it/Verifier.java
    maven/shared/trunk/maven-verifier/src/test/java/org/apache/maven/it/VerifierTest.java

Modified: maven/shared/trunk/maven-verifier/src/main/java/org/apache/maven/it/Verifier.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-verifier/src/main/java/org/apache/maven/it/Verifier.java?rev=1421845&r1=1421844&r2=1421845&view=diff
==============================================================================
--- maven/shared/trunk/maven-verifier/src/main/java/org/apache/maven/it/Verifier.java (original)
+++ maven/shared/trunk/maven-verifier/src/main/java/org/apache/maven/it/Verifier.java Fri
Dec 14 13:25:07 2012
@@ -1119,7 +1119,10 @@ public class Verifier
             }
             catch ( IOException e )
             {
-                throw new VerificationException( "Error looking for JAR resource", e );
+                if ( wanted )
+                {
+                    throw new VerificationException( "Error looking for JAR resource: " +
line );
+                }
             }
             finally
             {

Modified: maven/shared/trunk/maven-verifier/src/test/java/org/apache/maven/it/VerifierTest.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-verifier/src/test/java/org/apache/maven/it/VerifierTest.java?rev=1421845&r1=1421844&r2=1421845&view=diff
==============================================================================
--- maven/shared/trunk/maven-verifier/src/test/java/org/apache/maven/it/VerifierTest.java
(original)
+++ maven/shared/trunk/maven-verifier/src/test/java/org/apache/maven/it/VerifierTest.java
Fri Dec 14 13:25:07 2012
@@ -19,6 +19,7 @@ package org.apache.maven.it;
  * under the License.
  */
 
+import java.io.File;
 import java.util.Arrays;
 
 import junit.framework.TestCase;
@@ -39,4 +40,13 @@ public class VerifierTest
                 "OS name: \"windows 7\" version: \"6.1\" arch: \"x86\" Family: \"windows\""
} ) ) );
     }
 
+    public void testFileInJarPresent()
+        throws VerificationException
+    {
+        File file = new File( "src/test/resources/mshared104.jar!fud.xml" );
+        Verifier verifier = new Verifier( "src/test/resources" );
+        verifier.assertFilePresent( "mshared104.jar!/pom.xml" );
+        verifier.assertFileNotPresent( "mshared104.jar!/fud.xml" );
+    }
+
 }

Added: maven/shared/trunk/maven-verifier/src/test/resources/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-verifier/src/test/resources/META-INF/MANIFEST.MF?rev=1421845&view=auto
==============================================================================
--- maven/shared/trunk/maven-verifier/src/test/resources/META-INF/MANIFEST.MF (added)
+++ maven/shared/trunk/maven-verifier/src/test/resources/META-INF/MANIFEST.MF Fri Dec 14 13:25:07
2012
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Created-By: 1.7.0_09 (Oracle Corporation)
+

Added: maven/shared/trunk/maven-verifier/src/test/resources/mshared104.jar
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-verifier/src/test/resources/mshared104.jar?rev=1421845&view=auto
==============================================================================
Files maven/shared/trunk/maven-verifier/src/test/resources/mshared104.jar (added) and maven/shared/trunk/maven-verifier/src/test/resources/mshared104.jar
Fri Dec 14 13:25:07 2012 differ

Added: maven/shared/trunk/maven-verifier/src/test/resources/pom.xml
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-verifier/src/test/resources/pom.xml?rev=1421845&view=auto
==============================================================================
--- maven/shared/trunk/maven-verifier/src/test/resources/pom.xml (added)
+++ maven/shared/trunk/maven-verifier/src/test/resources/pom.xml Fri Dec 14 13:25:07 2012
@@ -0,0 +1,59 @@
+<?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>
+
+  <parent>
+    <groupId>org.apache.maven.shared</groupId>
+    <artifactId>maven-shared-components</artifactId>
+    <version>18</version>
+    <relativePath>../maven-shared-components</relativePath>
+  </parent>
+
+  <artifactId>maven-verifier</artifactId>
+  <version>1.4-SNAPSHOT</version>
+
+  <name>Maven Verifier Component</name>
+  <description>Provides a test harness for Maven integration tests.</description>
+
+  <scm>
+    <connection>scm:svn:http://svn.apache.org/repos/asf/maven/shared/trunk/maven-verifier</connection>
+    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/shared/trunk/maven-verifier</developerConnection>
+    <url>http://svn.apache.org/viewvc/maven/shared/trunk/maven-verifier</url>
+  </scm>
+  <issueManagement>
+    <system>jira</system>
+    <url>http://jira.codehaus.org/browse/MSHARED/component/13281</url>
+  </issueManagement>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven.shared</groupId>
+      <artifactId>maven-shared-utils</artifactId>
+      <version>0.1</version>
+    </dependency>
+
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.2</version>
+    </dependency>
+  </dependencies>
+</project>



Mime
View raw message