Quantcast

New spock plugin snapshot.

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

New spock plugin snapshot.

ld@ldaley.com
Hi all,

I have just pushed a new snapshot versions of the Spock plugin (i.e. 0.5-groovy-1.6-SNAPSHOT for Grails 1.2.x and 0.5-groovy-1.7-SNAPSHOT for Grails 1.3).

This is a big change in that the plugin now no longer distributes it's support classes via source, but pulls in a jar dependency containing these classes. This solves a few different issues, but most noticeably it allows IDEs that support Grails plugin dependencies (such as STS and IDEA) to realise that Spock is now available on the classpath.

I'd appreciate if people could give this a run and let me know. Because Grails doesn't have any support for checking in changes to snapshot plugins, you'll have to clear a few caches in order to get the new version.

For Grails 1.2:

rm -rf ~/.ivy2/cache/org.spockframework
rm -rf ~/.grails/«grails version»/plugins/grails-spock-*
rm -rf ~/.grails/«grails version»/projects/«project name»/plugins/spock*

For Grails 1.3:

rm -rf ~/.ivy2/cache/org.spockframework
rm -rf ~/.ivy2/cache/org.grails.plugins/spock
rm -rf ~/.grails/1.3.4/projects/geb-test/plugins/spock-*

(you'll have to convert those to windows commands if you are on that platform)

Then run a `grails clean`. The new version should be installed next time you start the grails build system for that project.


Please let me know if it doesn't work for you.

LD.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New spock plugin snapshot.

Dana
  After following your instructions and upgrading the spock plugin from
0.4 to 0.5-SNAPSHOT for my Grails 1.3.2 app, I see an error during
dependency resolution:

module not found: net.sf.ehcache#echache;1.7.1

It looks like there is a typo "echache" instead of "ehcache" in
http://github.com/grails/grails-core/blob/master/maven/grails-gorm.pom.in

The error persists even after I remove my .ivy2 and .grails folders and
create a new app:

grails create-app foobar
grails install-plugin spock 0.5-groovy-1.7-SNAPSHOT
grails test-app

The dependency error goes away if I upgrade the new app to 1.3.4.

-Dana

On 9/2/10 5:44 PM, Luke Daley wrote:

> Hi all,
>
> I have just pushed a new snapshot versions of the Spock plugin (i.e. 0.5-groovy-1.6-SNAPSHOT for Grails 1.2.x and 0.5-groovy-1.7-SNAPSHOT for Grails 1.3).
>
> This is a big change in that the plugin now no longer distributes it's support classes via source, but pulls in a jar dependency containing these classes. This solves a few different issues, but most noticeably it allows IDEs that support Grails plugin dependencies (such as STS and IDEA) to realise that Spock is now available on the classpath.
>
> I'd appreciate if people could give this a run and let me know. Because Grails doesn't have any support for checking in changes to snapshot plugins, you'll have to clear a few caches in order to get the new version.
>
> For Grails 1.2:
>
> rm -rf ~/.ivy2/cache/org.spockframework
> rm -rf ~/.grails/«grails version»/plugins/grails-spock-*
> rm -rf ~/.grails/«grails version»/projects/«project name»/plugins/spock*
>
> For Grails 1.3:
>
> rm -rf ~/.ivy2/cache/org.spockframework
> rm -rf ~/.ivy2/cache/org.grails.plugins/spock
> rm -rf ~/.grails/1.3.4/projects/geb-test/plugins/spock-*
>
> (you'll have to convert those to windows commands if you are on that platform)
>
> Then run a `grails clean`. The new version should be installed next time you start the grails build system for that project.
>
>
> Please let me know if it doesn't work for you.
>
> LD.
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>      http://xircles.codehaus.org/manage_email
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New spock plugin snapshot.

Ricardo J. Méndez
Hi Luke,

Thanks, things just worked for me and it allowed me to upgrade to 1.3.4.

Cheers,


--
Ricardo J. Méndez
http://www.arquetipos.co.cr/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New spock plugin snapshot.

Robert Fletcher-2
In reply to this post by ld@ldaley.com
The spock-grails-support component seems to have a lot of
dependencies. I ended up with the following in my BuildConfig to try
to avoid unnecessary downloading.

        dependencies {
                test("org.spockframework:spock-grails-support:0.5-groovy-1.7-SNAPSHOT") {
                        excludes "grails-crud", "grails-gorm", "grails-test",
"grails-webflow", "spring-webflow", "oscache", "hsqldb",
"servlet-api", "slf4j-log4j12", "jstl", "svnkit", "junit", "ant-junit"
                }
        }
        plugins {
                test(":spock:0.5-groovy-1.7-SNAPSHOT") {
                        excludes "spock-grails-support"
                }
        }

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New spock plugin snapshot.

ld@ldaley.com
Most (all?) of those are Grails deps so I am surprised that Ivy didn't grab them from Grails home.

Regardless, I'll add those excludes to the plugin. That will be the easiest fix.

On 07/09/2010, at 9:14 PM, Robert Fletcher <[hidden email]> wrote:

> The spock-grails-support component seems to have a lot of
> dependencies. I ended up with the following in my BuildConfig to try
> to avoid unnecessary downloading.
>
>    dependencies {
>        test("org.spockframework:spock-grails-support:0.5-groovy-1.7-SNAPSHOT") {
>            excludes "grails-crud", "grails-gorm", "grails-test",
> "grails-webflow", "spring-webflow", "oscache", "hsqldb",
> "servlet-api", "slf4j-log4j12", "jstl", "svnkit", "junit", "ant-junit"
>        }
>    }
>    plugins {
>        test(":spock:0.5-groovy-1.7-SNAPSHOT") {
>            excludes "spock-grails-support"
>        }
>    }
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New spock plugin snapshot.

ld@ldaley.com
In reply to this post by Robert Fletcher-2
Still working on this. It's proving to be somewhat painful.

On 07/09/2010, at 9:14 PM, Robert Fletcher wrote:

> The spock-grails-support component seems to have a lot of
> dependencies. I ended up with the following in my BuildConfig to try
> to avoid unnecessary downloading.
>
> dependencies {
> test("org.spockframework:spock-grails-support:0.5-groovy-1.7-SNAPSHOT") {
> excludes "grails-crud", "grails-gorm", "grails-test",
> "grails-webflow", "spring-webflow", "oscache", "hsqldb",
> "servlet-api", "slf4j-log4j12", "jstl", "svnkit", "junit", "ant-junit"
> }
> }
> plugins {
> test(":spock:0.5-groovy-1.7-SNAPSHOT") {
> excludes "spock-grails-support"
> }
> }
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New spock plugin snapshot.

ecrane
Any updates on the state of the dependency fix?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New spock plugin snapshot.

ld@ldaley.com
Still in progress.

On 20/09/2010, at 10:41 PM, ecrane <[hidden email]> wrote:

>
> Any updates on the state of the dependency fix?
> --
> View this message in context: http://grails.1312388.n4.nabble.com/New-spock-plugin-snapshot-tp2524970p2546929.html
> Sent from the Grails - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New spock plugin snapshot.

ld@ldaley.com
In reply to this post by Robert Fletcher-2

On 07/09/2010, at 9:14 PM, Robert Fletcher wrote:

> The spock-grails-support component seems to have a lot of
> dependencies. I ended up with the following in my BuildConfig to try
> to avoid unnecessary downloading.
>
> dependencies {
> test("org.spockframework:spock-grails-support:0.5-groovy-1.7-SNAPSHOT") {
> excludes "grails-crud", "grails-gorm", "grails-test",
> "grails-webflow", "spring-webflow", "oscache", "hsqldb",
> "servlet-api", "slf4j-log4j12", "jstl", "svnkit", "junit", "ant-junit"
> }
> }
> plugins {
> test(":spock:0.5-groovy-1.7-SNAPSHOT") {
> excludes "spock-grails-support"
> }
> }

This is no longer necessary with the latest snapshot version.

To get it you have to clear some caches…

For Grails 1.2:

rm -rf ~/.ivy2/cache/org.spockframework
rm -rf ~/.grails/«grails version»/plugins/grails-spock-*
rm -rf ~/.grails/«grails version»/projects/«project name»/plugins/spock*

For Grails 1.3:

rm -rf ~/.ivy2/cache/org.spockframework
rm -rf ~/.ivy2/cache/org.grails.plugins/spock
rm -rf ~/.grails/«grails version»/projects/«project name»/plugins/spock-*

(you'll have to convert those to windows commands if you are on that platform)
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New spock plugin snapshot.

Robert Fletcher-2
Yep, looks much better. Thanks.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New spock plugin snapshot.

ecrane
In reply to this post by ld@ldaley.com
I'm running grails 1.3.5, and installed the latest spock snapshot via  'grails install-plugin spock 0.5-groovy-1.7-SNAPSHOT'.

Everything seems to work fine when I run the tests via the command line, but Intellij is *not* properly adding the spock jars to the classpath. In order to resolve them, I'm having to add the ~/.ivy2/cache/org.spockframework jars as project dependencies manually.  What has me puzzled, however, is that the console output of running 'Synchronize Grails Settings' appears to be finding them:

...
Build.30=/<my home dir>/.ivy2/cache/org.apache.maven.wagon/wagon-provider-api/jars/wagon-provider-api-1.0-beta-6.jar
Test.73=/<my home dir>/.ivy2/cache/org.spockframework/spock-core/jars/spock-core-0.5-groovy-1.7-SNAPSHOT.jar
Test.72=/<my home dir>/.ivy2/cache/org.spockframework/spock-grails-support/jars/spock-grails-support-0.5-groovy-1.7-SNAPSHOT.jar
Test.71=/<my home dir>/.ivy2/cache/org.springframework/org.springframework.test/jars/org.springframework.test-3.0.3.RELEASE.jar
...


This may well be a bug in Idea, not Spock- but since you were attempting to resolve the inability of IDEs to properly add Spock to the classpath, I figured you'd want to know.

I'm using Intellij IDEA (Maia) IU-95.538, by the way.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New spock plugin snapshot.

ld@ldaley.com
Thank you for the report, it is helpful.

On 09/10/2010, at 1:36 AM, ecrane <[hidden email]> wrote:

>
> I'm running grails 1.3.5, and installed the latest spock snapshot via
> 'grails install-plugin spock 0.5-groovy-1.7-SNAPSHOT'.
>
> Everything seems to work fine when I run the tests via the command line, but
> Intellij is *not* properly adding the spock jars to the classpath. In order
> to resolve them, I'm having to add the ~/.ivy2/cache/org.spockframework jars
> as project dependencies manually.  What has me puzzled, however, is that the
> console output of running 'Synchronize Grails Settings' appears to be
> finding them:
>
> ...
> Build.30=/<my home
> dir>/.ivy2/cache/org.apache.maven.wagon/wagon-provider-api/jars/wagon-provider-api-1.0-beta-6.jar
> Test.73=/<my home
> dir>/.ivy2/cache/org.spockframework/spock-core/jars/spock-core-0.5-groovy-1.7-SNAPSHOT.jar
> Test.72=/<my home
> dir>/.ivy2/cache/org.spockframework/spock-grails-support/jars/spock-grails-support-0.5-groovy-1.7-SNAPSHOT.jar
> Test.71=/<my home
> dir>/.ivy2/cache/org.springframework/org.springframework.test/jars/org.springframework.test-3.0.3.RELEASE.jar
> ...
>
>
> This may well be a bug in Idea, not Spock- but since you were attempting to
> resolve the inability of IDEs to properly add Spock to the classpath, I
> figured you'd want to know.
>
> I'm using Intellij IDEA (Maia) IU-95.538, by the way.
>
>
> --
> View this message in context: http://grails.1312388.n4.nabble.com/New-spock-plugin-snapshot-tp2524970p2968556.html
> Sent from the Grails - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New spock plugin snapshot.

Peter Niederwieser
In reply to this post by ecrane
I cannot reproduce your problem. I've just created a new Grails 1.3.5 app, added a spec, and created a new IDEA project from Grails sources. Spec runs fine both from command line and from IDEA (IU-95.429).

How did you create the IDEA project?

Cheers,
Peter
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New spock plugin snapshot.

ecrane
Peter Niederwieser wrote
I cannot reproduce your problem. I've just created a new Grails 1.3.5 app, added a spec, and created a new IDEA project from Grails sources. Spec runs fine both from command line and from IDEA (IU-95.429).

How did you create the IDEA project?

Cheers,
Peter
Ah, I definitely didn't create the project that way. I added my project as a new module, selecting 'from scratch', giving it the 'Grails Application' type. This method has been necessary to get dependencies to load properly for me since something like.. grails 1.2? For all other dependency issues, it has worked fine- this is the first instance where it hasn't been able to figure them out properly.
Loading...