Quantcast

ivy snapshot dependencies not updating in grails

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

ivy snapshot dependencies not updating in grails

David Smith
I have a utility snapshot jar e.g. 
...
compile 'utils:utils:1.4-SNAPSHOT'
...

This dependency is not being updated when the code in the snapshot has changed and is deployed to a local .m2 directory.

On searching I can see that this has been fixed in ivy 2.2 
http://jira.codehaus.org/browse/GRAILS-5700 2.2 was released on Sept 30 and should fix this issue. Please consider updating grails core ivy to 2.2.

I have tried in Intellij to run a grails command
install-plugin ivy 2.2

but get

Error resolving plugin [name:ivy, group:org.grails.plugins, version:2.2].
Plugin not found for name [ivy] and version [2.2]

How do I install ivy 2.2?

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

Re: ivy snapshot dependencies not updating in grails

TylerBall
I think you're supposed to update to Grails 1.3.6 to get this benefit.  But I'm experiencing the same problem you are, tried to update to 1.3.6 and am still experiencing the same error.

Have you come across any other fixes?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ivy snapshot dependencies not updating in grails

prabugp
http://grails.1312388.n4.nabble.com/Snapshot-dependencies-not-downloading-correctly-td3244744.html

Expected fix is in 1.3.4. Tyler, it's the other thread that you've created.
GP
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ivy snapshot dependencies not updating in grails

ld@ldaley.com

On 31/01/2011, at 5:55 PM, prabugp wrote:

> http://grails.1312388.n4.nabble.com/Snapshot-dependencies-not-downloading-correctly-td3244744.html
>
> Expected fix is in 1.3.4. Tyler, it's the other thread that you've create

This won't be fixed out of the box for Grails 1.3.

There is a workaround available at https://github.com/alkemist/grails-snapshot-dependencies-fix
---------------------------------------------------------------------
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: ivy snapshot dependencies not updating in grails

curtman16
I'm trying this locally and getting an exception
C:\temp\alkemist-grails-snapshot-dependencies-fix-25e8440>gradlew jar
Downloading http://dist.codehaus.org/gradle/gradle-0.9-bin.zip

Exception in thread "main" java.io.FileNotFoundException: http://dist.codehaus.o
rg/gradle/gradle-0.9-bin.zip
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
nection.java:1311)
        at org.gradle.wrapper.Download.downloadInternal(Download.java:48)
        at org.gradle.wrapper.Download.download(Download.java:36)
        at org.gradle.wrapper.Install.createDist(Install.java:55)
        at org.gradle.wrapper.Wrapper.execute(Wrapper.java:51)
        at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:42)

I'm on Windows Vista 32 bit.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ivy snapshot dependencies not updating in grails

ld@ldaley.com
Just pushed a fix for this, should work now.

On 11/02/2011, at 7:16 AM, curtman16 wrote:

>
> I'm trying this locally and getting an exception
> C:\temp\alkemist-grails-snapshot-dependencies-fix-25e8440>gradlew jar
> Downloading http://dist.codehaus.org/gradle/gradle-0.9-bin.zip
>
> Exception in thread "main" java.io.FileNotFoundException:
> http://dist.codehaus.o
> rg/gradle/gradle-0.9-bin.zip
>        at
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
> nection.java:1311)
>        at org.gradle.wrapper.Download.downloadInternal(Download.java:48)
>        at org.gradle.wrapper.Download.download(Download.java:36)
>        at org.gradle.wrapper.Install.createDist(Install.java:55)
>        at org.gradle.wrapper.Wrapper.execute(Wrapper.java:51)
>        at
> org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:42)
>
> I'm on Windows Vista 32 bit.
> --
> View this message in context: http://grails.1312388.n4.nabble.com/ivy-snapshot-dependencies-not-updating-in-grails-tp3048669p3300295.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: ivy snapshot dependencies not updating in grails

curtman16
thanks for that
trying to find a way to apply this to my local maven repository.  Some example of how I would do that?  Trying to make it so that it will work on anyone on the development team's box as there are differing user directories.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ivy snapshot dependencies not updating in grails

ld@ldaley.com
You only have to configure this once for each project and there is no alternative to putting the jar in the project and in version control unfortunately.

On 12/02/2011, at 3:12 AM, curtman16 <[hidden email]> wrote:

>
> thanks for that
> trying to find a way to apply this to my local maven repository.  Some
> example of how I would do that?  Trying to make it so that it will work on
> anyone on the development team's box as there are differing user
> directories.
> --
> View this message in context: http://grails.1312388.n4.nabble.com/ivy-snapshot-dependencies-not-updating-in-grails-tp3048669p3301635.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: ivy snapshot dependencies not updating in grails

curtman16
Think we might be crossing wavelengths here.  I understand I have to put the jar in the lib folder of every project that needs it.

I have a SNAPSHOT dependency that I would either pull from a repo (an http snapshot repo) or I could install that jar locally into my maven repository if i'm doing active development on the jar.  I would expect for the local maven version to be picked up that somehow I'd have to apply the resolver to the local maven repository so it would pickup the snapshot change.  Is that possible?  Or do I have to resort to clearing my ivy cache and letting that dependency pick up from maven local?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ivy snapshot dependencies not updating in grails

ld@ldaley.com

On 12/02/2011, at 8:18 AM, curtman16 wrote:

> Think we might be crossing wavelengths here.  I understand I have to put the
> jar in the lib folder of every project that needs it.
>
> I have a SNAPSHOT dependency that I would either pull from a repo (an http
> snapshot repo) or I could install that jar locally into my maven repository
> if i'm doing active development on the jar.  I would expect for the local
> maven version to be picked up that somehow I'd have to apply the resolver to
> the local maven repository so it would pickup the snapshot change.  Is that
> possible?  Or do I have to resort to clearing my ivy cache and letting that
> dependency pick up from maven local?

Now I see, sorry for the misfire.

A quick look at the existing code in Ivy/Grails seems to indicate that this should work, as long as you explicitly specify that either the dependency is changing or that -SNAPSHOT versions can change as outlined in the instructions. The other thing that you will have to do is make sure that the mavenLocal() definition is before all others in your BuildConfig.groovy

I haven't tested this though so it may not work. I'll take a look tomorrow if you haven't replied saying that it works.
---------------------------------------------------------------------
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: ivy snapshot dependencies not updating in grails

curtman16
It didn't seem to work.  On verbose output, I got the following error:
:::: ERRORS
        Couldn't delete outdated artifact from cache: C:\Users\MyUserDir\.ivy2\cache\org.mycompany\my-ar\jars\my-jar-1.2-SNAPSHOT.jar

In a separate section, it also said NOT REQUIRED to change so that's a bit confusing.
Seems like it knows it needs to dump the jar, but was unable to.  I disabled windows search indexer in case that was causing issue.  I added mavenLocal() as the first option as well and that didn't make a difference.  I was wondering if I needed to override the localMavenResolver somehow and if that would help ...
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ivy snapshot dependencies not updating in grails

curtman16
Well, it worked from the command line, but not within Eclipse ... *sigh*.  Eclipse must have a lock on the jar it was trying to evict.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ivy snapshot dependencies not updating in grails

ld@ldaley.com

On 13/02/2011, at 2:22 PM, curtman16 wrote:

> Well, it worked from the command line, but not within Eclipse ... *sigh*.  Eclipse must have a lock on the jar it was trying to evict.

Well, that's good for Grails I suppose.

If you take this up with the groovy-eclipse folks, and it would be good to do so, can you please post back here the result.

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: ivy snapshot dependencies not updating in grails

curtman16
I can do that.  I've been reading up on that particular error, and it seems some folks think that the fork=true option on the ant task would fix it.  Is that related at all, or is this a different problem?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ivy snapshot dependencies not updating in grails

ld@ldaley.com

On 15/02/2011, at 4:57 AM, curtman16 wrote:

> I can do that.  I've been reading up on that particular error, and it seems
> some folks think that the fork=true option on the ant task would fix it.  Is
> that related at all, or is this a different problem?

Not sure what ant task you are referring to.
---------------------------------------------------------------------
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: ivy snapshot dependencies not updating in grails

curtman16
Sorry, a reference would have helped:
http://old.nabble.com/Cannot-delete-outdated-artifacts-in-cache-td27759185.html

I searched the error I was getting and ran across this a few times.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ivy snapshot dependencies not updating in grails

curtman16
I cross posted here:
http://forum.springsource.org/showthread.php?p=345861#post345861

For anyone that is interested.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ivy snapshot dependencies not updating in grails

ld@ldaley.com
In reply to this post by curtman16

On 16/02/2011, at 2:19 AM, curtman16 wrote:

> Sorry, a reference would have helped:
> http://old.nabble.com/Cannot-delete-outdated-artifacts-in-cache-td27759185.html
>
> I searched the error I was getting and ran across this a few times.

Thanks.

I am sure that some frustrated groovy-eclipse user is going to thank you in the future when they stumble upon this thread.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Loading...