diff options
author | Jason van Zyl <jvanzyl@apache.org> | 2006-11-04 02:17:08 +0000 |
---|---|---|
committer | Jason van Zyl <jvanzyl@apache.org> | 2006-11-04 02:17:08 +0000 |
commit | 5370713b08ca3aa0f23c83a88c2533949d90743f (patch) | |
tree | 7c297894fb18bc0f8f4db72558cc0d30f5189088 /archiva-cli | |
parent | 0fff0780d619bf556e07ab0a06fdc6042b63588a (diff) | |
download | archiva-5370713b08ca3aa0f23c83a88c2533949d90743f.tar.gz archiva-5370713b08ca3aa0f23c83a88c2533949d90743f.zip |
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
Diffstat (limited to 'archiva-cli')
5 files changed, 77 insertions, 2 deletions
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 @@ <version>2.6.7</version> </dependency> </dependencies> + <build> + <plugins> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <configuration> + <descriptor>src/main/assembly/archiva-cli-assembly.xml</descriptor> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-antrun-plugin</artifactId> + <executions> + <execution> + <phase>integration-test</phase> + <configuration> + <sourceRoot>target/generated/src/main/java</sourceRoot> + <tasks> + <jar destfile="${basedir}/target/archiva-cli-1.0-SNAPSHOT-cli.jar" + basedir="${basedir}/target/archiva-cli-1.0-SNAPSHOT-cli" + manifest="${basedir}/src/main/resources/META-INF/MANIFEST.MF"/> + </tasks> + </configuration> + <goals> + <goal>run</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> </project> 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 @@ +<assembly> + <id>cli</id> + <includeBaseDirectory>false</includeBaseDirectory> + <formats> + <format>jar</format> + </formats> + <fileSets> + <!-- + <fileSet> + <includes> + <include>README*</include> + <include>LICENSE*</include> + <include>NOTICE*</include> + </includes> + </fileSet> + --> + <fileSet> + <directory>target/classes</directory> + <outputDirectory>/</outputDirectory> + </fileSet> + <fileSet> + <directory>src/main/resources</directory> + <outputDirectory>/</outputDirectory> + </fileSet> + </fileSets> + <dependencySets> + <dependencySet> + <outputDirectory>/</outputDirectory> + <unpack>true</unpack> + <scope>runtime</scope> + <!-- + <excludes> + <exclude>junit:junit</exclude> + <exclude>com.training.killerapp:killerapp-store-xstream</exclude> + </excludes> + --> + </dependencySet> + </dependencySets> +</assembly> 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
|