You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Troy Self <ts...@bbn.com> on 2010/03/02 19:11:09 UTC

Cannot delete outdated artifacts in cache

I am having an issue where my build fails half the time now because Ivy is
unable to overwrite files in the cache. My build is setup so that internal
projects are published to the local repository with the version, "SNAPSHOT".
This sometimes works and other times fails.

It appears to fail when a dependent project attempts to resolve the projects
built earlier in the build. For example, projects A and B are both building
and publishing correctly. Process C, which depends on A and B is then
failing because it is unable to copy A.jar and B.jar to the cache.

Has anyone else seen this issue? Is this a locking thing? All of this is
within a single ant build with no forked JVMs. Error message shown below my
signature.

Thanks,

-- tBs

[ivy:resolve] :::: ERRORS
[ivy:resolve]   Couldn't delete outdated artifact from cache:
C:\Users\tself\.iv
y2\cache\foo\pint-server\jars\a-client-SNAPSHOT.jar
[ivy:resolve]   Couldn't delete outdated artifact from cache:
C:\Users\tself\.iv
y2\cache\foo\obs-exporter\jars\a-exporter-SNAPSHOT.jar
[ivy:resolve]


RE: Cannot delete outdated artifacts in cache

Posted by Troy Self <ts...@bbn.com>.
I changed all javac and junit calls to have fork='true'. I have run the
build several times now without encountering the error. Hopefully this has
fixed it. Thank you.

Prior to this suggestion, I was investigating the <caches> setting. If you
define a separate resolutionCache and repositoryCache, what is the effect of
that? Are you then storing all artifacts twice, one for when you publish and
one to store a copy of things you've downloaded from repositories?

At this point it's more a curiosity since the fork seems to have fixed my
issue.

Thanks again,

-- tBs

> -----Original Message-----
> From: Maarten Coene [mailto:maarten_coene@yahoo.com]
> Sent: Thursday, March 04, 2010 6:59 AM
> To: ivy-user@ant.apache.org
> Subject: Re: Cannot delete outdated artifacts in cache
> 
> Another possibility might be that you use the javac task unforked.
> This might keep a lock on the jars.
> 
> Maarten
> 
> 
> 
> 
> ----- Original Message ----
> From: Troy Self <ts...@bbn.com>
> To: ivy-user@ant.apache.org
> Sent: Wed, March 3, 2010 11:20:07 PM
> Subject: RE: Cannot delete outdated artifacts in cache
> 
> That was my first thought as well. Unfortunately, this problem also
> occurs
> on our continuous build machine which only ever builds using Ant.
> 
> -- tBs
> 
> > -----Original Message-----
> > From: Maarten Coene [mailto:maarten_coene@yahoo.com]
> > Sent: Wednesday, March 03, 2010 3:57 PM
> > To: ivy-user@ant.apache.org
> > Subject: Re: Cannot delete outdated artifacts in cache
> >
> > Maybe your IDE is locking some of the jars in the cache?
> > Could you confirm this is not the case?
> >
> > Maarten
> >
> >
> >
> >
> >
> > ----- Original Message ----
> > From: Troy Self <ts...@bbn.com>
> > To: ivy-user@ant.apache.org
> > Sent: Tue, March 2, 2010 7:11:09 PM
> > Subject: Cannot delete outdated artifacts in cache
> >
> > I am having an issue where my build fails half the time now because
> Ivy
> > is
> > unable to overwrite files in the cache. My build is setup so that
> > internal
> > projects are published to the local repository with the version,
> > "SNAPSHOT".
> > This sometimes works and other times fails.
> >
> > It appears to fail when a dependent project attempts to resolve the
> > projects
> > built earlier in the build. For example, projects A and B are both
> > building
> > and publishing correctly. Process C, which depends on A and B is then
> > failing because it is unable to copy A.jar and B.jar to the cache.
> >
> > Has anyone else seen this issue? Is this a locking thing? All of this
> > is
> > within a single ant build with no forked JVMs. Error message shown
> > below my
> > signature.
> >
> > Thanks,
> >
> > -- tBs
> >
> > [ivy:resolve] :::: ERRORS
> > [ivy:resolve]   Couldn't delete outdated artifact from cache:
> > C:\Users\tself\.iv
> > y2\cache\foo\pint-server\jars\a-client-SNAPSHOT.jar
> > [ivy:resolve]   Couldn't delete outdated artifact from cache:
> > C:\Users\tself\.iv
> > y2\cache\foo\obs-exporter\jars\a-exporter-SNAPSHOT.jar
> > [ivy:resolve]
> >
> >
> >
> 
> 
> 


Re: Cannot delete outdated artifacts in cache

Posted by Maarten Coene <ma...@yahoo.com>.
Another possibility might be that you use the javac task unforked.
This might keep a lock on the jars.

Maarten




----- Original Message ----
From: Troy Self <ts...@bbn.com>
To: ivy-user@ant.apache.org
Sent: Wed, March 3, 2010 11:20:07 PM
Subject: RE: Cannot delete outdated artifacts in cache

That was my first thought as well. Unfortunately, this problem also occurs
on our continuous build machine which only ever builds using Ant.

-- tBs

> -----Original Message-----
> From: Maarten Coene [mailto:maarten_coene@yahoo.com]
> Sent: Wednesday, March 03, 2010 3:57 PM
> To: ivy-user@ant.apache.org
> Subject: Re: Cannot delete outdated artifacts in cache
> 
> Maybe your IDE is locking some of the jars in the cache?
> Could you confirm this is not the case?
> 
> Maarten
> 
> 
> 
> 
> 
> ----- Original Message ----
> From: Troy Self <ts...@bbn.com>
> To: ivy-user@ant.apache.org
> Sent: Tue, March 2, 2010 7:11:09 PM
> Subject: Cannot delete outdated artifacts in cache
> 
> I am having an issue where my build fails half the time now because Ivy
> is
> unable to overwrite files in the cache. My build is setup so that
> internal
> projects are published to the local repository with the version,
> "SNAPSHOT".
> This sometimes works and other times fails.
> 
> It appears to fail when a dependent project attempts to resolve the
> projects
> built earlier in the build. For example, projects A and B are both
> building
> and publishing correctly. Process C, which depends on A and B is then
> failing because it is unable to copy A.jar and B.jar to the cache.
> 
> Has anyone else seen this issue? Is this a locking thing? All of this
> is
> within a single ant build with no forked JVMs. Error message shown
> below my
> signature.
> 
> Thanks,
> 
> -- tBs
> 
> [ivy:resolve] :::: ERRORS
> [ivy:resolve]   Couldn't delete outdated artifact from cache:
> C:\Users\tself\.iv
> y2\cache\foo\pint-server\jars\a-client-SNAPSHOT.jar
> [ivy:resolve]   Couldn't delete outdated artifact from cache:
> C:\Users\tself\.iv
> y2\cache\foo\obs-exporter\jars\a-exporter-SNAPSHOT.jar
> [ivy:resolve]
> 
> 
> 


      

RE: Cannot delete outdated artifacts in cache

Posted by Troy Self <ts...@bbn.com>.
That was my first thought as well. Unfortunately, this problem also occurs
on our continuous build machine which only ever builds using Ant.

-- tBs

> -----Original Message-----
> From: Maarten Coene [mailto:maarten_coene@yahoo.com]
> Sent: Wednesday, March 03, 2010 3:57 PM
> To: ivy-user@ant.apache.org
> Subject: Re: Cannot delete outdated artifacts in cache
> 
> Maybe your IDE is locking some of the jars in the cache?
> Could you confirm this is not the case?
> 
> Maarten
> 
> 
> 
> 
> 
> ----- Original Message ----
> From: Troy Self <ts...@bbn.com>
> To: ivy-user@ant.apache.org
> Sent: Tue, March 2, 2010 7:11:09 PM
> Subject: Cannot delete outdated artifacts in cache
> 
> I am having an issue where my build fails half the time now because Ivy
> is
> unable to overwrite files in the cache. My build is setup so that
> internal
> projects are published to the local repository with the version,
> "SNAPSHOT".
> This sometimes works and other times fails.
> 
> It appears to fail when a dependent project attempts to resolve the
> projects
> built earlier in the build. For example, projects A and B are both
> building
> and publishing correctly. Process C, which depends on A and B is then
> failing because it is unable to copy A.jar and B.jar to the cache.
> 
> Has anyone else seen this issue? Is this a locking thing? All of this
> is
> within a single ant build with no forked JVMs. Error message shown
> below my
> signature.
> 
> Thanks,
> 
> -- tBs
> 
> [ivy:resolve] :::: ERRORS
> [ivy:resolve]   Couldn't delete outdated artifact from cache:
> C:\Users\tself\.iv
> y2\cache\foo\pint-server\jars\a-client-SNAPSHOT.jar
> [ivy:resolve]   Couldn't delete outdated artifact from cache:
> C:\Users\tself\.iv
> y2\cache\foo\obs-exporter\jars\a-exporter-SNAPSHOT.jar
> [ivy:resolve]
> 
> 
> 


Re: Cannot delete outdated artifacts in cache

Posted by Maarten Coene <ma...@yahoo.com>.
Maybe your IDE is locking some of the jars in the cache?
Could you confirm this is not the case?

Maarten





----- Original Message ----
From: Troy Self <ts...@bbn.com>
To: ivy-user@ant.apache.org
Sent: Tue, March 2, 2010 7:11:09 PM
Subject: Cannot delete outdated artifacts in cache

I am having an issue where my build fails half the time now because Ivy is
unable to overwrite files in the cache. My build is setup so that internal
projects are published to the local repository with the version, "SNAPSHOT".
This sometimes works and other times fails.

It appears to fail when a dependent project attempts to resolve the projects
built earlier in the build. For example, projects A and B are both building
and publishing correctly. Process C, which depends on A and B is then
failing because it is unable to copy A.jar and B.jar to the cache.

Has anyone else seen this issue? Is this a locking thing? All of this is
within a single ant build with no forked JVMs. Error message shown below my
signature.

Thanks,

-- tBs

[ivy:resolve] :::: ERRORS
[ivy:resolve]   Couldn't delete outdated artifact from cache:
C:\Users\tself\.iv
y2\cache\foo\pint-server\jars\a-client-SNAPSHOT.jar
[ivy:resolve]   Couldn't delete outdated artifact from cache:
C:\Users\tself\.iv
y2\cache\foo\obs-exporter\jars\a-exporter-SNAPSHOT.jar
[ivy:resolve]