]> source.dussan.org Git - archiva.git/commitdiff
o create an executable JAR, assembly doesn't seem to want to let you make a JAR with...
authorJason van Zyl <jvanzyl@apache.org>
Sat, 4 Nov 2006 02:17:08 +0000 (02:17 +0000)
committerJason van Zyl <jvanzyl@apache.org>
Sat, 4 Nov 2006 02:17:08 +0000 (02:17 +0000)
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@471098 13f79535-47bb-0310-9956-ffa450edef68

archiva-cli/pom.xml
archiva-cli/src/main/assembly/archiva-cli-assembly.xml [new file with mode: 0644]
archiva-cli/src/main/java/org/apache/maven/archiva/cli/Cli.java
archiva-cli/src/main/java/org/apache/maven/archiva/cli/CliManager.java
archiva-cli/src/main/resources/META-INF/MANIFEST.MF [new file with mode: 0644]

index 270533db4c855f14978d51b2b659b94f92f79106..3fe6ac5dc6282a92f4d7b21748489f4c03cc355d 100644 (file)
       <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 (file)
index 0000000..1f38a93
--- /dev/null
@@ -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>
index d0300c7c21c201b8ec019e7a085334c397641b27..81f50c46a458b95376d84601d6e57f907275c497 100644 (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 );
index 2829dc7f3fbbda07e1115cc3739bb867213ff11d..06120de66c00236b055fcb9c77efc81fcaedaa83 100644 (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 ) );
     }
 
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 (file)
index 0000000..a26d266
--- /dev/null
@@ -0,0 +1,4 @@
+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