On 20/07/10 1:10 AM, Rene Groeschke wrote:
Hi there,
we're are running several multiproject builds on our hudson build server.
from time to time one of the builds fails with the following exception:

-------------
15:20:49.534 [main] WARN  org.gradle.logging.IvyLoggingAdaper -
                ::::::::::::::::::::::::::::::::::::::::::::::

15:20:49.534 [main] WARN  org.gradle.logging.IvyLoggingAdaper -                 
::
    UNRESOLVED DEPENDENCIES         ::

15:20:49.534 [main] WARN  org.gradle.logging.IvyLoggingAdaper -
                ::::::::::::::::::::::::::::::::::::::::::::::

15:20:49.534 [main] WARN  org.gradle.logging.IvyLoggingAdaper -                 
::
org.acme#ModuleA;2.37-SNAPSHOT: not found

15:20:49.534 [main] ERROR org.gradle.logging.IvyLoggingAdaper - :::: ERRORS
15:20:49.534 [main] ERROR org.gradle.logging.IvyLoggingAdaper -         Couldn't
delete outdated artifact from cache: C:\Dokumente und
Einstellungen\Hudson\.gradle\cache\org.acme\ModuleA\jars\ModuleA-2.37-SNAPSHOT.jar
--------------

Until now I wasn't able to reproduce this behaviour, but I think I
detected the problem today. The build fails if one of the artifacts it
depends on (like moduleA above) was updated in the remote repository
during my (long running) multiproject build.

Imagine you have a multiproject build with mp1 and mp2 as subprojects.
both have a dependency to moduleA. before compiling mp1 moduleA is
resolved from my remote repository. After the resolving, one of our other
build jobs push a new snapshot of the moduleA artifact to our remote
repository. Now mp2 tries to resolve the updated artifact and produces the
error above.

I would have expected that if different subprojects of a multiproject
build have dependencies to the same artifact, this artifact is only
resolved once and not for each dependent subproject.

And now the two questions I have:
1. Is this explanation plausible and should I raise an issue for that?

Yes, and yes.

2. Has anybody an idea for an workaround?

With the fix for http://jira.codehaus.org/browse/GRADLE-1038, you can specify a time-to-live for maven snapshots. So, you could possibly call setSnapshotTimeout(Long.MAX_VALUE) on the maven repository.


--
Adam Murdoch
Gradle Developer
http://www.gradle.org
CTO, Gradle Inc. - Gradle Training, Support, Consulting
http://www.gradle.biz


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

   http://xircles.codehaus.org/manage_email


Reply via email to