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
This commit is contained in:
Jason van Zyl 2006-11-04 02:17:08 +00:00
parent 0fff0780d6
commit 5370713b08
5 changed files with 77 additions and 2 deletions

View File

@ -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>

View File

@ -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>

View File

@ -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 );

View File

@ -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 ) );
}

View File

@ -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