geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r699400 - in /geronimo/gshell/trunk/gshell-commands/gshell-repository/src/main: java/org/apache/geronimo/gshell/commands/repository/ResolveAction.java resources/org/apache/geronimo/gshell/commands/repository/ResolveAction.properties
Date Fri, 26 Sep 2008 16:30:56 GMT
Author: jdillon
Date: Fri Sep 26 09:30:55 2008
New Revision: 699400

URL: http://svn.apache.org/viewvc?rev=699400&view=rev
Log:
Add --classifier

Modified:
    geronimo/gshell/trunk/gshell-commands/gshell-repository/src/main/java/org/apache/geronimo/gshell/commands/repository/ResolveAction.java
    geronimo/gshell/trunk/gshell-commands/gshell-repository/src/main/resources/org/apache/geronimo/gshell/commands/repository/ResolveAction.properties

Modified: geronimo/gshell/trunk/gshell-commands/gshell-repository/src/main/java/org/apache/geronimo/gshell/commands/repository/ResolveAction.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-repository/src/main/java/org/apache/geronimo/gshell/commands/repository/ResolveAction.java?rev=699400&r1=699399&r2=699400&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-repository/src/main/java/org/apache/geronimo/gshell/commands/repository/ResolveAction.java
(original)
+++ geronimo/gshell/trunk/gshell-commands/gshell-repository/src/main/java/org/apache/geronimo/gshell/commands/repository/ResolveAction.java
Fri Sep 26 09:30:55 2008
@@ -65,9 +65,8 @@
     @Option(name="-t", aliases={"--type"}, argumentRequired=true)
     private String type = "jar";
 
-    //
-    // TODO: Add classifier
-    //
+    @Option(name="-c", aliases={"--classifier"}, argumentRequired=true)
+    private String classifier;
 
     @Option(name="-s", aliases={"--scope"}, argumentRequired=true)
     private String scope;
@@ -79,10 +78,20 @@
         assert context != null;
 
         assert artifactManager != null;
-
         ArtifactFactory factory = artifactManager.getArtifactFactory();
 
-        Artifact artifact = factory.createArtifact(groupId, artifactId, version, scope, type);
+        log.debug("Using factory: {}", factory);
+        Artifact artifact;
+
+        if (classifier != null) {
+            artifact = factory.createArtifactWithClassifier(groupId, artifactId, version,
type, classifier);
+            artifact.setScope(scope);
+        }
+        else {
+            artifact = factory.createArtifact(groupId, artifactId, version, scope, type);
+        }
+
+        log.debug("Created artifact: {}", artifact);
 
         ArtifactResolutionRequest request = new ArtifactResolutionRequest();
 

Modified: geronimo/gshell/trunk/gshell-commands/gshell-repository/src/main/resources/org/apache/geronimo/gshell/commands/repository/ResolveAction.properties
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-repository/src/main/resources/org/apache/geronimo/gshell/commands/repository/ResolveAction.properties?rev=699400&r1=699399&r2=699400&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-repository/src/main/resources/org/apache/geronimo/gshell/commands/repository/ResolveAction.properties
(original)
+++ geronimo/gshell/trunk/gshell-commands/gshell-repository/src/main/resources/org/apache/geronimo/gshell/commands/repository/ResolveAction.properties
Fri Sep 26 09:30:55 2008
@@ -37,6 +37,9 @@
 command.option.type=Specify the type
 command.option.type.token=TYPE
 
+command.option.classifier=Specify the classifier
+command.option.classifier.token=CLASSIFIER
+
 command.option.scope=Specify the resolution scope
 command.option.scope.token=SCOPE
 



Mime
View raw message