You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/groovy/org/codehaus/groovy/tools/GrapeMain.groovy
+24-6Lines changed: 24 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -150,18 +150,19 @@ class GrapeMain implements Runnable {
150
150
}
151
151
152
152
@Command(name='install', header='Installs a particular grape',
153
-
description='Installs the specified groovy module or maven artifact. If a version is specified that specific version will be installed, otherwise the most recent version will be used (as if `*` was passed in).')
153
+
description= ['Installs the specified groovy module or maven artifact. If a version is specified that specific version will be installed, otherwise the most recent version will be used (as if `*` was passed in).',
154
+
'Accepts three coordinate forms: `group module [version] [classifier]` (positional), `group:module:version[:classifier][@ext]` (Maven shorthand), or `group#module;version` (Ivy shorthand).'])
154
155
privatestaticclassInstallimplementsRunnable {
155
156
/**
156
-
* Module group to install.
157
+
* Module group to install, or a full coordinate in Maven/Ivy shorthand.
157
158
*/
158
-
@Parameters(index='0', arity='1', description='Which module group the module comes from. Translates directly to a Maven groupId or an Ivy Organization. Any group matching /groovy[x][\\..*]^/ is reserved and may have special meaning to the groovy endorsed modules.')
159
+
@Parameters(index='0', arity='1', description='Either the module group (Maven groupId / Ivy organisation), or a full coordinate in Maven shorthand `g:m:v[:c][@e]` or Ivy shorthand `g#m;v`. Any group matching /groovy[x][\\..*]^/ is reserved and may have special meaning to the groovy endorsed modules.')
159
160
String group
160
161
161
162
/**
162
-
* Module name to install.
163
+
* Module name to install. Optional when a shorthand coordinate is supplied as the first parameter.
163
164
*/
164
-
@Parameters(index='1', arity='1', description='The name of the module to load. Translated directly to a Maven artifactId or an Ivy artifact.')
165
+
@Parameters(index='1', arity='0..1', description='The name of the module to load. Translated directly to a Maven artifactId or an Ivy artifact. Omit when supplying a shorthand coordinate.')
165
166
String module
166
167
167
168
/**
@@ -203,7 +204,24 @@ class GrapeMain implements Runnable {
203
204
thrownewCommandLine.ExecutionException(newCommandLine(this), "Grape engine not initialized")
0 commit comments