[prev in list] [next in list] [prev in thread] [next in thread] 

List:       groovy-scm
Subject:    [groovy-scm] [jira] Commented: (GROOVY-3851) @Grapes does not work (at least not
From:       "Roshan Dawrani (JIRA)" <jira () codehaus ! org>
Date:       2009-10-30 20:47:26
Message-ID: 4158704.155331256935646818.JavaMail.haus-jira () codehaus01 ! managed ! contegix ! com
[Download RAW message or body]


    [ http://jira.codehaus.org/browse/GROOVY-3851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=196715#action_196715 \
] 

Roshan Dawrani commented on GROOVY-3851:
----------------------------------------

You're welcome, Peter.

> @Grapes does not work (at least not in Groovy Console)
> ------------------------------------------------------
> 
> Key: GROOVY-3851
> URL: http://jira.codehaus.org/browse/GROOVY-3851
> Project: groovy
> Issue Type: Bug
> Components: Grape
> Affects Versions: 1.6.5
> Environment: Mac OS 10.6.1
> Java 1.6.0_15
> Reporter: Peter Niederwieser
> Assignee: Roshan Dawrani
> Fix For: 1.6.6, 1.7-rc-1
> 
> Attachments: 3851_v16x.txt
> 
> 
> Try this in Groovy Console:
> {code}
> @Grapes(
> [@Grab(group='org.spockframework', module='spock-core', version='0.2'),
> @Grab(group="junit", module="junit", version="4.7")])
> class HelloSpock extends Specification {
> def "can you figure out what I'm up to?"() {
> expect:
> name.size() == length
> where:
> name << ["Kirk", "Spock", "Scotty"]
> length << [4, 5, 6]
> }
> }
> {code}
> Output: 
> {noformat}
> 1 compilation error:
> unable to resolve class Specification 
> at line: 1, column: 1
> {noformat}
> This means that Spock is not on the compile class path. When I @Grab JUnit and \
> Spock individually by introducing a fake class, script works as expected. (Well, \
> not quite. I need to add {{JUnitCore.run(HelloSpock)}} because otherwise, the test \
> class is no longer found.) By the way, if Ivy was fully compatible with Maven, the \
> JUnit @Grab wouldn't be necessary, because JUnit is a mandatory compile-time \
> dependency of Spock. Admittedly, Ivy's transitive dependency resolution is more \
> correct than Maven's, but at the cost of breaking compatibility. Is there a way to \
> tweak this?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: \
                http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

<hr/>
<p>
To unsubscribe from this list please visit:
</p>
<p>
    <a href="http://xircles.codehaus.org/manage_email">http://xircles.codehaus.org/manage_email</a>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic