mirror of https://github.com/apache/archiva.git
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:
parent
0fff0780d6
commit
5370713b08
|
@ -47,4 +47,34 @@
|
||||||
<version>2.6.7</version>
|
<version>2.6.7</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</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>
|
</project>
|
||||||
|
|
|
@ -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>
|
|
@ -158,6 +158,8 @@ public class Cli
|
||||||
|
|
||||||
File newRepositoryPath = new File( cli.getOptionValue( CliManager.NEW_REPOSITORY_PATH ) );
|
File newRepositoryPath = new File( cli.getOptionValue( CliManager.NEW_REPOSITORY_PATH ) );
|
||||||
|
|
||||||
|
System.out.println( "Converting " + oldRepositoryPath + " to " + newRepositoryPath );
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
archiva.convertLegacyRepository( oldRepositoryPath, newRepositoryPath, true );
|
archiva.convertLegacyRepository( oldRepositoryPath, newRepositoryPath, true );
|
||||||
|
|
|
@ -48,10 +48,10 @@ public class CliManager
|
||||||
options.addOption( OptionBuilder.withLongOpt( "convert" ).withDescription(
|
options.addOption( OptionBuilder.withLongOpt( "convert" ).withDescription(
|
||||||
"Convert a legacy Maven 1.x repository to a Maven 2.x repository." ).create( CONVERT ) );
|
"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 ) );
|
"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 ) );
|
"Path to newly created Maven 2.x repository." ).create( NEW_REPOSITORY_PATH ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
Loading…
Reference in New Issue