Property changes on: D:\Work\maven-jar-plugin ___________________________________________________________________ Name: svn:ignore - target *~ *.log .classpath .project *.ipr *.iws *.iml .wtpmodules + target *~ *.log .classpath .project *.ipr *.iws *.iml .wtpmodules .settings Index: D:/Work/maven-jar-plugin/src/test/java/org/apache/maven/plugin/jar/JarMojoTest.java =================================================================== --- D:/Work/maven-jar-plugin/src/test/java/org/apache/maven/plugin/jar/JarMojoTest.java (revision 423713) +++ D:/Work/maven-jar-plugin/src/test/java/org/apache/maven/plugin/jar/JarMojoTest.java (working copy) @@ -28,7 +28,7 @@ public class JarMojoTest extends AbstractMojoTestCase { - private File testPom = new File( getBasedir(), "src/test/resources/unit/jar-basic-test/pom.xml" ); + private File testPom = new File( getBasedir(), "src/test/unit-test-data/jar-basic-test/pom.xml" ); protected void setUp() throws Exception @@ -47,9 +47,6 @@ public void testJarTestEnvironment() throws Exception { - - //File pom = new File( getBasedir(), "src/test/resources/unit/clean/pom.xml" ); - JarMojo mojo = (JarMojo) lookupMojo( "jar", testPom ); assertNotNull( mojo ); Index: D:/Work/maven-jar-plugin/src/test/unit-test-data/jar-basic-test/pom.xml =================================================================== --- D:/Work/maven-jar-plugin/src/test/unit-test-data/jar-basic-test/pom.xml (revision 423713) +++ D:/Work/maven-jar-plugin/src/test/unit-test-data/jar-basic-test/pom.xml (working copy) @@ -1,4 +1,6 @@ - + Index: D:/Work/maven-jar-plugin/src/test/unit-test-data/sign-0/pom.xml =================================================================== --- D:/Work/maven-jar-plugin/src/test/unit-test-data/sign-0/pom.xml (revision 423713) +++ D:/Work/maven-jar-plugin/src/test/unit-test-data/sign-0/pom.xml (working copy) @@ -1,5 +1,7 @@ - + 4.0.0 jar-mng-1130-0 org.apache.maven.plugins Index: D:/Work/maven-jar-plugin/src/test/resources/unit/jar-basic-test/src/main/java/TestCompile1.java =================================================================== --- D:/Work/maven-jar-plugin/src/test/resources/unit/jar-basic-test/src/main/java/TestCompile1.java (revision 423713) +++ D:/Work/maven-jar-plugin/src/test/resources/unit/jar-basic-test/src/main/java/TestCompile1.java (working copy) @@ -1,12 +0,0 @@ - - -public class TestCompile1 -{ - - public TestCompile1() - { - - System.out.println("Woo Hoo!"); - } - -} \ No newline at end of file Index: D:/Work/maven-jar-plugin/src/test/resources/unit/jar-basic-test/pom.xml =================================================================== --- D:/Work/maven-jar-plugin/src/test/resources/unit/jar-basic-test/pom.xml (revision 423713) +++ D:/Work/maven-jar-plugin/src/test/resources/unit/jar-basic-test/pom.xml (working copy) @@ -1,15 +0,0 @@ - - - - - maven-jar-plugin - - - foo - bar - - - - - - Index: D:/Work/maven-jar-plugin/src/test/resources/sign-0/pom.xml =================================================================== --- D:/Work/maven-jar-plugin/src/test/resources/sign-0/pom.xml (revision 423713) +++ D:/Work/maven-jar-plugin/src/test/resources/sign-0/pom.xml (working copy) @@ -1,31 +0,0 @@ - - - 4.0.0 - jar-mng-1130-0 - org.apache.maven.plugins - 1.0 - jar - Test Case for MNG-1130 - - - - org.apache.maven.plugins - maven-jar-plugin - - - - sign - - - - - keystore - m2 - m2m2m2 - - - - - - - Index: D:/Work/maven-jar-plugin/src/test/resources/sign-0/README =================================================================== --- D:/Work/maven-jar-plugin/src/test/resources/sign-0/README (revision 423713) +++ D:/Work/maven-jar-plugin/src/test/resources/sign-0/README (working copy) @@ -1,7 +0,0 @@ -A pom.xml that can be used to make some functional tests. -These values are of course specific to my environment. -Not sure what to do with this. Should I turn this into a fully automated functional test? - -The keystore was generated using: - -keytool -genkey -alias m2 -keypass m2m2m2 -keystore keystore -storepass m2m2m2 -dname "cn=www.example.com, ou=None, L=Seattle, ST=Washington, o=ExampleOrg, c=US" Index: D:/Work/maven-jar-plugin/src/main/java/org/apache/maven/plugin/jar/JarSignVerifyMojo.java =================================================================== --- D:/Work/maven-jar-plugin/src/main/java/org/apache/maven/plugin/jar/JarSignVerifyMojo.java (revision 423713) +++ D:/Work/maven-jar-plugin/src/main/java/org/apache/maven/plugin/jar/JarSignVerifyMojo.java (working copy) @@ -16,27 +16,21 @@ * limitations under the License. */ -import org.apache.maven.plugin.logging.Log; -import org.apache.commons.lang.SystemUtils; +import java.io.File; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import org.apache.commons.lang.SystemUtils; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; - +import org.apache.maven.plugin.logging.Log; import org.codehaus.plexus.util.cli.CommandLineException; import org.codehaus.plexus.util.cli.CommandLineUtils; import org.codehaus.plexus.util.cli.Commandline; -import org.codehaus.plexus.util.cli.DefaultConsumer; import org.codehaus.plexus.util.cli.StreamConsumer; -import org.codehaus.plexus.util.StringUtils; - -import java.io.File; -import java.io.InputStream; -import java.util.List; -import java.util.Iterator; -import java.util.StringTokenizer; -import java.util.ArrayList; - /** * Checks the signature of a signed jar using jarsigner. * @@ -209,7 +203,7 @@ getLog().info( line ); } } - + // taken from JavadocReport then slightly refactored // should probably share with other plugins that use $JAVA_HOME/bin tools @@ -272,63 +266,12 @@ } } - /** - * Convenience method to add an argument to the command line - * if the the value is not null or empty. - *

- * Moreover, the value could be comma separated. - * - * @param arguments - * @param key the argument name. - * @param value the argument value to be added. - * @see #addArgIfNotEmpty(java.util.List,String,String,boolean) - */ - private void addArgIfNotEmpty( List arguments, String key, String value ) - { - addArgIfNotEmpty( arguments, key, value, false ); - } - - /** - * Convenience method to add an argument to the command line - * if the the value is not null or empty. - *

- * Moreover, the value could be comma separated. - * - * @param arguments - * @param key the argument name. - * @param value the argument value to be added. - * @param repeatKey repeat or not the key in the command line - */ - private void addArgIfNotEmpty( List arguments, String key, String value, boolean repeatKey ) - { - if ( !StringUtils.isEmpty( value ) ) - { - arguments.add( key ); - - StringTokenizer token = new StringTokenizer( value, "," ); - while ( token.hasMoreTokens() ) - { - String current = token.nextToken().trim(); - - if ( !StringUtils.isEmpty( current ) ) - { - arguments.add( current ); - - if ( token.hasMoreTokens() && repeatKey ) - { - arguments.add( key ); - } - } - } - } - } - // // methods used for tests purposes - allow mocking and simulate automatic setters // protected int executeCommandLine( Commandline commandLine, InputStream inputStream, - StreamConsumer systemOut, StreamConsumer systemErr ) + StreamConsumer systemOut, StreamConsumer systemErr ) throws CommandLineException { return CommandLineUtils.executeCommandLine( commandLine, inputStream, systemOut, systemErr ); Index: D:/Work/maven-jar-plugin/src/site/apt/examples/executable-jar.apt =================================================================== --- D:/Work/maven-jar-plugin/src/site/apt/examples/executable-jar.apt (revision 423713) +++ D:/Work/maven-jar-plugin/src/site/apt/examples/executable-jar.apt (working copy) @@ -41,3 +41,39 @@ ... +-----------------+ + +Adding User Specified Classpath values + + If you want to add an additional classpath value manually then you can + specify this via the <<<\>>>. The tags of this element + are added as keys to the Manifest and the text of the tag added as values + for that key. This can be useful if you want to include a configuration + directory as part of the classpath. + ++-----------------+ + + ... + + + + org.apache.maven.plugins + maven-jar-plugin + ... + + + + conf/ + + + fully.qualified.MainClass + true + + + + ... + + + + ... + ++-----------------+ Index: D:/Work/maven-jar-plugin/pom.xml =================================================================== --- D:/Work/maven-jar-plugin/pom.xml (revision 423713) +++ D:/Work/maven-jar-plugin/pom.xml (working copy) @@ -24,7 +24,6 @@ - org.apache.maven @@ -39,7 +38,7 @@ org.apache.maven maven-archiver - 2.1 + 2.2-SNAPSHOT commons-lang @@ -53,5 +52,4 @@ test -