Author: bentmann Date: Sun Jul 12 23:56:10 2009 New Revision: 793433 URL: http://svn.apache.org/viewvc?rev=793433&view=rev Log: o Added IT
Added: maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/it/ maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/it/basic/ maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/it/basic/pom.xml (with props) maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/it/basic/src/ maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/it/basic/src/main/ maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/it/basic/src/main/java/ maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/it/basic/src/main/java/Main.java (with props) maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/it/basic/verify.bsh (with props) maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/it/keystore (with props) maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/it/settings.xml (with props) Modified: maven/sandbox/trunk/plugins/maven-jarsigner-plugin/pom.xml Modified: maven/sandbox/trunk/plugins/maven-jarsigner-plugin/pom.xml URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-jarsigner-plugin/pom.xml?rev=793433&r1=793432&r2=793433&view=diff ============================================================================== --- maven/sandbox/trunk/plugins/maven-jarsigner-plugin/pom.xml (original) +++ maven/sandbox/trunk/plugins/maven-jarsigner-plugin/pom.xml Sun Jul 12 23:56:10 2009 @@ -88,4 +88,42 @@ </dependency> </dependencies> + <profiles> + <profile> + <id>run-its</id> + <build> + <plugins> + <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> + <goals> + <goal>clean</goal> + <goal>verify</goal> + </goals> + </configuration> + <executions> + <execution> + <id>integration-test</id> + <goals> + <goal>install</goal> + <goal>run</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + </profiles> </project> Added: maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/it/basic/pom.xml URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/it/basic/pom.xml?rev=793433&view=auto ============================================================================== --- maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/it/basic/pom.xml (added) +++ maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/it/basic/pom.xml Sun Jul 12 23:56:10 2009 @@ -0,0 +1,100 @@ +<?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 signing of a simple JAR. + </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-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> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jarsigner-plugin</artifactId> + <version>@project.version@</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/sandbox/trunk/plugins/maven-jarsigner-plugin/src/it/basic/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/it/basic/pom.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/it/basic/src/main/java/Main.java URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/it/basic/src/main/java/Main.java?rev=793433&view=auto ============================================================================== --- maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/it/basic/src/main/java/Main.java (added) +++ maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/it/basic/src/main/java/Main.java Sun Jul 12 23:56:10 2009 @@ -0,0 +1,6 @@ +/** + * Appliation entry point. + */ +public class Main +{ +} Propchange: maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/it/basic/src/main/java/Main.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/it/basic/src/main/java/Main.java ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/it/basic/verify.bsh URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/it/basic/verify.bsh?rev=793433&view=auto ============================================================================== --- maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/it/basic/verify.bsh (added) +++ maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/it/basic/verify.bsh Sun Jul 12 23:56:10 2009 @@ -0,0 +1,46 @@ +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(); + +File attachedJarFile = new File( targetDir, "test-1.0-sources.jar" ); +System.out.println( "Checking for existence of " + attachedJarFile ); +if ( !attachedJarFile.isFile() ) +{ + throw new Exception( "missing " + attachedJarFile ); +} + +JarFile attachedJar = new JarFile( attachedJarFile ); +System.out.println( "Checking for existence of " + attachedJarFile.getName() + "!/META-INF/TESTING.SF" ); +if ( attachedJar.getEntry( "META-INF/TESTING.SF" ) == null ) +{ + throw new Exception( "missing " + attachedJarFile.getName() + "!/META-INF/TESTING.SF" ); +} +System.out.println( "Checking for existence of " + attachedJarFile.getName() + "!/META-INF/TESTING.DSA" ); +if ( attachedJar.getEntry( "META-INF/TESTING.DSA" ) == null ) +{ + throw new Exception( "missing " + attachedJarFile.getName() + "!/META-INF/TESTING.DSA" ); +} +attachedJar.close(); + +return true; Propchange: maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/it/basic/verify.bsh ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/it/basic/verify.bsh ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/it/keystore URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/it/keystore?rev=793433&view=auto ============================================================================== Binary file - no diff available. Propchange: maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/it/keystore ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/it/settings.xml URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/it/settings.xml?rev=793433&view=auto ============================================================================== --- maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/it/settings.xml (added) +++ maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/it/settings.xml Sun Jul 12 23:56:10 2009 @@ -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. +--> + +<settings> + <profiles> + <profile> + <id>it-repo</id> + <activation> + <activeByDefault>true</activeByDefault> + </activation> + <properties> + <jarsigner.keystore>@project.basedir@/src/it/keystore</jarsigner.keystore> + <jarsigner.storepass>store-passwd</jarsigner.storepass> + </properties> + <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/sandbox/trunk/plugins/maven-jarsigner-plugin/src/it/settings.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/sandbox/trunk/plugins/maven-jarsigner-plugin/src/it/settings.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision