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 2009/07/19 18:16:55 UTC

svn commit: r795560 - in /maven/plugins/trunk/maven-jarsigner-plugin/src/it/spacy path: ./ pom.xml src/ src/main/ src/main/java/ src/main/java/Main.java verify.bsh

Author: bentmann
Date: Sun Jul 19 16:16:55 2009
New Revision: 795560

URL: http://svn.apache.org/viewvc?rev=795560&view=rev
Log:
o Added IT to check handling of paths with spaces

Added:
    maven/plugins/trunk/maven-jarsigner-plugin/src/it/spacy path/
    maven/plugins/trunk/maven-jarsigner-plugin/src/it/spacy path/pom.xml   (with props)
    maven/plugins/trunk/maven-jarsigner-plugin/src/it/spacy path/src/
    maven/plugins/trunk/maven-jarsigner-plugin/src/it/spacy path/src/main/
    maven/plugins/trunk/maven-jarsigner-plugin/src/it/spacy path/src/main/java/
    maven/plugins/trunk/maven-jarsigner-plugin/src/it/spacy path/src/main/java/Main.java   (with props)
    maven/plugins/trunk/maven-jarsigner-plugin/src/it/spacy path/verify.bsh   (with props)

Added: maven/plugins/trunk/maven-jarsigner-plugin/src/it/spacy path/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jarsigner-plugin/src/it/spacy%20path/pom.xml?rev=795560&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jarsigner-plugin/src/it/spacy path/pom.xml (added)
+++ maven/plugins/trunk/maven-jarsigner-plugin/src/it/spacy path/pom.xml Sun Jul 19 16:16:55 2009
@@ -0,0 +1,87 @@
+<?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.jarsigner</groupId>
+  <artifactId>test</artifactId>
+  <version>1.0</version>
+  <packaging>jar</packaging>
+
+  <description>
+    Tests the invocation of the jarsigner tool when paths with spaces are involved.
+  </description>
+
+  <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-surefire-plugin</artifactId>
+        <version>2.3.1</version>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jarsigner-plugin</artifactId>
+        <version>1.0-SNAPSHOT</version>
+        <configuration>
+          <alias>test-01</alias>
+          <keypass>key-passwd</keypass>
+          <sigfile>TESTING</sigfile>
+        </configuration>
+        <executions>
+          <execution>
+            <id>sign-jars</id>
+            <goals>
+              <goal>sign</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>verify-jars</id>
+            <goals>
+              <goal>verify</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>

Propchange: maven/plugins/trunk/maven-jarsigner-plugin/src/it/spacy path/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

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

Added: maven/plugins/trunk/maven-jarsigner-plugin/src/it/spacy path/src/main/java/Main.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jarsigner-plugin/src/it/spacy%20path/src/main/java/Main.java?rev=795560&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jarsigner-plugin/src/it/spacy path/src/main/java/Main.java (added)
+++ maven/plugins/trunk/maven-jarsigner-plugin/src/it/spacy path/src/main/java/Main.java Sun Jul 19 16:16:55 2009
@@ -0,0 +1,6 @@
+/**
+ * Appliation entry point.
+ */
+public class Main
+{
+}

Propchange: maven/plugins/trunk/maven-jarsigner-plugin/src/it/spacy path/src/main/java/Main.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-jarsigner-plugin/src/it/spacy path/src/main/java/Main.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-jarsigner-plugin/src/it/spacy path/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jarsigner-plugin/src/it/spacy%20path/verify.bsh?rev=795560&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jarsigner-plugin/src/it/spacy path/verify.bsh (added)
+++ maven/plugins/trunk/maven-jarsigner-plugin/src/it/spacy path/verify.bsh Sun Jul 19 16:16:55 2009
@@ -0,0 +1,26 @@
+import java.io.*;
+import java.util.jar.*;
+
+File targetDir = new File( basedir, "target" );
+
+File mainJarFile = new File( targetDir, "test-1.0.jar" );
+System.out.println( "Checking for existence of " + mainJarFile );
+if ( !mainJarFile.isFile() )
+{
+    throw new Exception( "missing " + mainJarFile );
+}
+
+JarFile mainJar = new JarFile( mainJarFile );
+System.out.println( "Checking for existence of " + mainJarFile.getName() + "!/META-INF/TESTING.SF" );
+if ( mainJar.getEntry( "META-INF/TESTING.SF" ) == null )
+{
+    throw new Exception( "missing " + mainJarFile.getName() + "!/META-INF/TESTING.SF" );
+}
+System.out.println( "Checking for existence of " + mainJarFile.getName() + "!/META-INF/TESTING.DSA" );
+if ( mainJar.getEntry( "META-INF/TESTING.DSA" ) == null )
+{
+    throw new Exception( "missing " + mainJarFile.getName() + "!/META-INF/TESTING.DSA" );
+}
+mainJar.close();
+
+return true;

Propchange: maven/plugins/trunk/maven-jarsigner-plugin/src/it/spacy path/verify.bsh
------------------------------------------------------------------------------
    svn:eol-style = native

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