[GRADLE-3013] Avoid throwing an exception if encountering Ivy mediators Created: 03/Feb/14  Updated: 03/Feb/14  Resolved: 03/Feb/14

Status: Resolved
Project: Gradle
Affects Version/s: 1.9
Fix Version/s: 1.12-rc-1

Type: Bug
Reporter: Gradle Forums Assignee: Benjamin Muschko
Resolution: Fixed Votes: 0


 Description   

Trying to upgrade from 1.7 to either 1.9 or 1.10 I get an exception

Failed to add into filestore 'D:
Failed to add into filestore 'D:\.gradle\caches\modules-2\metadata-2.1\descriptors' at 'org.jboss.arquillian.container/arquillian-container-spi/1.1.1.Final/d2b3f914b7e286103dc8c6db6dd248f8/ivy.xml'
#46;gradle\caches\modules-2\metadata-2.1\descriptors' at 'org.jboss.arquillian.container/arquillian-container-spi/1.1.1.Final/d2b3f914b7e286103dc8c6db6dd248f8/ivy.xml'

Full debug stacktrace of 1.9 at [1]http://pastebin.com/4TcaVsv3

The folder exists, but there is no ivy.xml in it. Manually creating a file in this folder works without problems.
----------------------------------------------------------------------------------------
[1] http://pastebin.com/4TcaVsv3



 Comments   
Comment by Gradle Forums [ 03/Feb/14 ]

I just tried to reproduce your issue but couldn't. This is my setup:

repositories {
mavenCentral()
}

configurations {
arquillian
}

dependencies {
arquillian 'org.jboss.arquillian.container:arquillian-container-spi:1.1.1.Final'
}

task copyLibs(type: Copy) {
from configurations.arquillian
into "$buildDir/libs"
}

Maybe you can try this out on your machine to see it that works for you (run the task copyLibs). If it does work, then I think we'd need to see some details of your build script.

Comment by Gradle Forums [ 03/Feb/14 ]

Hi Benjamin,

thanks for getting back on this one. Your script works on my machine. We are fetching from a local ivy repo so I need to setup a test case for this.

Comment by Gradle Forums [ 03/Feb/14 ]

Hi Benjamin,

i've prepared a test case for this:

Download 7z from [1]http://ge.tt/2gqGjgG1/v/0?c
Extract password 'gradleWithPerforce'

Needs a windows machine:

  • In one cmd shell run "startPerforce.bat" which starts a test perforce server on port 1670 (keep this running).
  • In another shell run 'gradle build'

This works with gradle 1.7, but fails with 1.9, 1.10, and 1.12 nightly.

E:\Temp\GradleIvyResolve>gradle --refresh-dependencies build
Build file 'E:\Temp\GradleIvyResolve\build.gradle': line 15
The ArtifactRepositoryContainer.add(DependencyResolver, Closure) method has been deprecated and is scheduled to be removed in Gradle 2.0.
:compileJava

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not resolve all dependencies for configuration ':compile'.
    > Could not resolve org.slf4j:slf4j-log4j12:1.7.5.
    Required by:
    :GradleIvyResolve:unspecified
    > Failed to add into filestore 'D:
    E:\Temp\GradleIvyResolve>gradle --refresh-dependencies build
    Build file 'E:\Temp\GradleIvyResolve\build.gradle': line 15
    The ArtifactRepositoryContainer.add(DependencyResolver, Closure) method has been deprecated and is scheduled to be removed in Gradle 2.0.
    :compileJava

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not resolve all dependencies for configuration ':compile'.
    > Could not resolve org.slf4j:slf4j-log4j12:1.7.5.
    Required by:
    :GradleIvyResolve:unspecified
    > Failed to add into filestore 'D:\.gradle\caches\modules-2\metadata-2.1\descriptors' at 'org.slf4j/slf4j-log4j12/1.7.5/e42cd7cc8222da755ac37e0c7396c5c6/ivy.xml'
  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 3.594 secs
#46;gradle\caches\modules-2\metadata-2.1\descriptors' at 'org.slf4j/slf4j-log4j12/1.7.5/e42cd7cc8222da755ac37e0c7396c5c6/ivy.xml'

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 3.594 secs

----------------------------------------------------------------------------------------
[1] http://ge.tt/2gqGjgG1/v/0?c

Comment by Gradle Forums [ 03/Feb/14 ]

Unfortunately, I currently don't have a Windows machine at hand. In the meantime can you give use the stack trace of this error (-s flag on the command line)?

Comment by Gradle Forums [ 03/Feb/14 ]

This is the relevant [1]stack trace.
----------------------------------------------------------------------------------------
[1] https://gist.github.com/radimk/8733635

Generated at Wed Jun 30 12:37:32 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.