From 5370713b08ca3aa0f23c83a88c2533949d90743f Mon Sep 17 00:00:00 2001 From: Jason van Zyl Date: Sat, 4 Nov 2006 02:17:08 +0000 Subject: [PATCH] o create an executable JAR, assembly doesn't seem to want to let you make a JAR with a custom manifest ... git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@471098 13f79535-47bb-0310-9956-ffa450edef68 --- archiva-cli/pom.xml | 30 ++++++++++++++ .../main/assembly/archiva-cli-assembly.xml | 39 +++++++++++++++++++ .../org/apache/maven/archiva/cli/Cli.java | 2 + .../apache/maven/archiva/cli/CliManager.java | 4 +- .../src/main/resources/META-INF/MANIFEST.MF | 4 ++ 5 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 archiva-cli/src/main/assembly/archiva-cli-assembly.xml create mode 100644 archiva-cli/src/main/resources/META-INF/MANIFEST.MF diff --git a/archiva-cli/pom.xml b/archiva-cli/pom.xml index 270533db4..3fe6ac5dc 100644 --- a/archiva-cli/pom.xml +++ b/archiva-cli/pom.xml @@ -47,4 +47,34 @@ 2.6.7 + + + + maven-assembly-plugin + + src/main/assembly/archiva-cli-assembly.xml + + + + org.apache.maven.plugins + maven-antrun-plugin + + + integration-test + + target/generated/src/main/java + + + + + + run + + + + + + diff --git a/archiva-cli/src/main/assembly/archiva-cli-assembly.xml b/archiva-cli/src/main/assembly/archiva-cli-assembly.xml new file mode 100644 index 000000000..1f38a93f6 --- /dev/null +++ b/archiva-cli/src/main/assembly/archiva-cli-assembly.xml @@ -0,0 +1,39 @@ + + cli + false + + jar + + + + + target/classes + / + + + src/main/resources + / + + + + + / + true + runtime + + + + diff --git a/archiva-cli/src/main/java/org/apache/maven/archiva/cli/Cli.java b/archiva-cli/src/main/java/org/apache/maven/archiva/cli/Cli.java index d0300c7c2..81f50c46a 100644 --- a/archiva-cli/src/main/java/org/apache/maven/archiva/cli/Cli.java +++ b/archiva-cli/src/main/java/org/apache/maven/archiva/cli/Cli.java @@ -158,6 +158,8 @@ public class Cli File newRepositoryPath = new File( cli.getOptionValue( CliManager.NEW_REPOSITORY_PATH ) ); + System.out.println( "Converting " + oldRepositoryPath + " to " + newRepositoryPath ); + try { archiva.convertLegacyRepository( oldRepositoryPath, newRepositoryPath, true ); diff --git a/archiva-cli/src/main/java/org/apache/maven/archiva/cli/CliManager.java b/archiva-cli/src/main/java/org/apache/maven/archiva/cli/CliManager.java index 2829dc7f3..06120de66 100644 --- a/archiva-cli/src/main/java/org/apache/maven/archiva/cli/CliManager.java +++ b/archiva-cli/src/main/java/org/apache/maven/archiva/cli/CliManager.java @@ -48,10 +48,10 @@ public class CliManager options.addOption( OptionBuilder.withLongOpt( "convert" ).withDescription( "Convert a legacy Maven 1.x repository to a Maven 2.x repository." ).create( CONVERT ) ); - options.addOption( OptionBuilder.withLongOpt( "old-repo" ).withDescription( + options.addOption( OptionBuilder.withLongOpt( "old-repo" ).hasArg().withDescription( "Path to Maven 1.x legacy repository to convert." ).create( OLD_REPOSITORY_PATH ) ); - options.addOption( OptionBuilder.withLongOpt( "new-repo" ).withDescription( + options.addOption( OptionBuilder.withLongOpt( "new-repo" ).hasArg().withDescription( "Path to newly created Maven 2.x repository." ).create( NEW_REPOSITORY_PATH ) ); } diff --git a/archiva-cli/src/main/resources/META-INF/MANIFEST.MF b/archiva-cli/src/main/resources/META-INF/MANIFEST.MF new file mode 100644 index 000000000..a26d266c5 --- /dev/null +++ b/archiva-cli/src/main/resources/META-INF/MANIFEST.MF @@ -0,0 +1,4 @@ +Manifest-Version: 1.0 +Archiver-Version: Plexus Archiver +Created-By: 1.4.2-66 ("Apple Computer, Inc.") +Main-Class: org.apache.maven.archiva.cli.Cli -- 2.39.5