[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:       "Peter Niederwieser (JIRA)" <jira () codehaus ! org>
Date:       2009-10-30 20:34:26
Message-ID: 22342067.155171256934866825.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=196709#action_196709 \
] 

Peter Niederwieser commented on GROOVY-3851:
--------------------------------------------

I can confirm that HelloSpock now works from the second run onwards. The reason why \
you are getting NoSuchMethodError is that getImport() has changed incompatibly \
between Groovy 1.6 and 1.7. Spock 0.2 only works with Groovy 1.6.

> @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
> 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