groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Remko Popma (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (GROOVY-9012) grape resolve command throws MissingPropertyException: No such property: arg
Date Thu, 28 Feb 2019 09:40:00 GMT

     [ https://issues.apache.org/jira/browse/GROOVY-9012?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Remko Popma resolved GROOVY-9012.
---------------------------------
    Resolution: Fixed

Fixed in master and GROOVY_2_5_X branches.

Cause:

The resolve command implementation referred to a non-existing field 'arg'. This bug was introduced
during the migration to picocli.

The original implementation referred to both an {{arg}} property and the {{args}} property,
which is also incorrect, but less impact-full (it only means that the validation to require
at least 3 arguments is broken).

Please verify.

> grape resolve command throws MissingPropertyException: No such property: arg
> ----------------------------------------------------------------------------
>
>                 Key: GROOVY-9012
>                 URL: https://issues.apache.org/jira/browse/GROOVY-9012
>             Project: Groovy
>          Issue Type: Bug
>          Components: command line processing, Grape
>    Affects Versions: 2.5.6
>            Reporter: Remko Popma
>            Assignee: Remko Popma
>            Priority: Major
>             Fix For: 2.5.7
>
>
> From the user mailing list:
> {code}
> $ groovy -v
> Groovy Version: 2.5.6 JVM: 1.8.0_77 Vendor: Oracle Corporation OS: Mac OS X
> {code}
>  
> {code}
> $ grape list | grep jcraft
> com.jcraft jsch  [0.1.42, 0.1.54, 0.1.55, 0.1.46, 0.1.53]
> {code}
>  
> {code}
> $ grape resolve com.jcraft jsch 0.1.53
> java.lang.reflect.InvocationTargetException
>                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>                 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>                 at java.lang.reflect.Method.invoke(Method.java:498)
>                 at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:110)
>                 at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:128)
> Caused by: groovyjarjarpicocli.CommandLine$ExecutionException: Error while running command
(org.codehaus.groovy.tools.GrapeMain$Resolve@609e8838): groovy.lang.MissingPropertyException:
No such property: arg for class: org.codehaus.groovy.tools.GrapeMain
>                 at groovyjarjarpicocli.CommandLine.execute(CommandLine.java:1168)
>                 at groovyjarjarpicocli.CommandLine.access$800(CommandLine.java:141)
>                 at groovyjarjarpicocli.CommandLine$RunLast.handle(CommandLine.java:1367)
>                 at groovyjarjarpicocli.CommandLine$RunLast.handle(CommandLine.java:1335)
>                 at groovyjarjarpicocli.CommandLine$AbstractParseResultHandler.handleParseResult(CommandLine.java:1243)
>                 at groovyjarjarpicocli.CommandLine.parseWithHandlers(CommandLine.java:1526)
>                 at groovyjarjarpicocli.CommandLine.parseWithHandler(CommandLine.java:1465)
>                 at groovyjarjarpicocli.CommandLine$parseWithHandler$0.call(Unknown Source)
>                 at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
>                 at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:115)
>                 at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:135)
>                 at org.codehaus.groovy.tools.GrapeMain.main(GrapeMain.groovy:72)
>                 ... 6 more
> Caused by: groovy.lang.MissingPropertyException: No such property: arg for class: org.codehaus.groovy.tools.GrapeMain
>                 at groovy.lang.MetaClassImpl.invokeStaticMissingProperty(MetaClassImpl.java:1021)
>                 at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:1866)
>                 at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:1842)
>                 at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:3797)
>                 at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:193)
>                 at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:468)
>                 at org.codehaus.groovy.tools.GrapeMain$Resolve.propertyMissing(GrapeMain.groovy)
>                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>                 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>                 at java.lang.reflect.Method.invoke(Method.java:498)
>                 at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:101)
>                 at groovy.lang.MetaClassImpl.invokeMissingProperty(MetaClassImpl.java:889)
>                 at groovy.lang.MetaClassImpl$12.getProperty(MetaClassImpl.java:2016)
>                 at org.codehaus.groovy.runtime.callsite.GetEffectivePogoPropertySite.getProperty(GetEffectivePogoPropertySite.java:85)
>                 at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:309)
>                 at org.codehaus.groovy.tools.GrapeMain$Resolve.run(GrapeMain.groovy:235)
>                 at groovyjarjarpicocli.CommandLine.execute(CommandLine.java:1160)
>                 ... 17 more
> {code}
>  
> {code}
> $ grape help resolve
> Enumerates the jars used by a grape
> Usage: grape resolve [-adhisv] (<groupId> <artifactId> <version>)+
>  
> Prints the file locations of the jars representing the artifcats for the
> specified module(s) and the respective transitive dependencies.
>  
> Parameters:
>       <group>     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.
>       <module>    The name of the module to load. Translated directly to a
>                     Maven artifactId or an Ivy artifact.
>       <version>   The version of the module to use. Either a literal version
>                     `1.1-RC3` or an Ivy Range `[2.2.1,)` meaning 2.2.1 or any
>                     greater version).
>  
> Options:
>   -a, --ant       Express dependencies in a format applicable for an ant script
>   -d, --dos       Express dependencies in a format applicable for a windows batch
>                     file
>   -s, --shell     Express dependencies in a format applicable for a unix shell script
>   -i, --ivy       Express dependencies in an ivy-like format
>   -h, --help      usage information
>   -v, --version   display the Groovy and JVM versions
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message