<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>
--- /dev/null
+<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>
File newRepositoryPath = new File( cli.getOptionValue( CliManager.NEW_REPOSITORY_PATH ) );
+ System.out.println( "Converting " + oldRepositoryPath + " to " + newRepositoryPath );
+
try
{
archiva.convertLegacyRepository( oldRepositoryPath, newRepositoryPath, true );
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 ) );
}
--- /dev/null
+Manifest-Version: 1.0\r
+Archiver-Version: Plexus Archiver\r
+Created-By: 1.4.2-66 ("Apple Computer, Inc.")\r
+Main-Class: org.apache.maven.archiva.cli.Cli\r