Details
-
Type:
Improvement
-
Status:
Resolved
-
Resolution: Fixed
-
Affects Version/s: 1.0-milestone-4
-
Fix Version/s: 1.0-milestone-5
Description
In my multi-module project, the eclipse plugin has been applied to all the module, and eclipse.classpath.downloadSources = true, when run gradle eclipse command, there are several artifacts that missing source jars in the Maven repo, then gradle keep downloading something from the repo for every module. Should add some flag to make it ignore if the source jar is missing from the repo.
-
Hide
- TestCompileProject.zip
- 29/Aug/11 5:11 AM
- 8 kB
- Jesper Holmberg
-
- TestCompileProject/.gradle/.../cache.bin 18 kB
- TestCompileProject/.../cache.properties 0.0 kB
- TestCompileProject/build.gradle 0.3 kB
- TestCompileProject/.../springockito-1.0.0-SNAPSHOT.jar 6 kB
Activity
This problem can be exposed with gradle build (however, not every machine). Stack trace from the builds.gradle.org:
http://repo.jfrog.org/artifactory/gradle-plugins-snapshots/org.sonatype.pmaven/pmaven-groovy/0.8-20100325/pmaven-groovy-0.8-20100325-sources.jar :::::::::::::::::::::::::::::::::::::::::::::: :: UNRESOLVED DEPENDENCIES :: :::::::::::::::::::::::::::::::::::::::::::::: :: org.sonatype.pmaven#pmaven-common;0.8-20100325: not found :: org.sonatype.pmaven#pmaven-groovy;0.8-20100325: not found :::::::::::::::::::::::::::::::::::::::::::::: FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':maven:ideaModule'. Cause: Could not resolve all dependencies for configuration 'detachedConfiguration5': - unresolved dependency: org.sonatype.pmaven#pmaven-common;0.8-20100325: not found - unresolved dependency: org.sonatype.pmaven#pmaven-groovy;0.8-20100325: not found
http://repo.jfrog.org/artifactory/gradle-plugins-snapshots/org.sonatype.pmaven/pmaven-groovy/0.8-20100325/pmaven-groovy-0.8-20100325-sources.jar :::::::::::::::::::::::::::::::::::::::::::::: :: UNRESOLVED DEPENDENCIES :: :::::::::::::::::::::::::::::::::::::::::::::: :: org.sonatype.pmaven#pmaven-common;0.8-20100325: not found :: org.sonatype.pmaven#pmaven-groovy;0.8-20100325: not found :::::::::::::::::::::::::::::::::::::::::::::: FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':maven:ideaModule'. Cause: Could not resolve all dependencies for configuration 'detachedConfiguration5': - unresolved dependency: org.sonatype.pmaven#pmaven-common;0.8-20100325: not found - unresolved dependency: org.sonatype.pmaven#pmaven-groovy;0.8-20100325: not found
When I run 'gradle idea' the following entry is created in the gradle cache folder:
Directory of C:\Users\linsti\.gradle\caches\artifacts\commons-pool\commons-pool\e76656920b0909b7437f8b467cb22b0c\sources 08.08.2011 10:44 <DIR> . 08.08.2011 10:44 <DIR> .. 08.08.2011 10:44 <SYMLINK> commons-pool-1.3-sources.jar [C:\Users\linsti\.gradle\caches\artifacts\filestore\SHA \SHA1(commons-pool-1.3-sources.jar)]
The content of the directory the symlink points to contains this filename, but the filename seems to be incorrect (it seems like some SHA function that should have been run on the file haven't been run?).
Directory of C:\Users\linsti\.gradle\caches\artifacts\filestore\SHA 08.08.2011 10:44 <DIR> . 08.08.2011 10:44 <DIR> .. 17.06.2009 02:46 57 386 SHA1(commons-pool-1.3-sources.jar)=
For some strange reason this only seem to happen with the commons-pool library.
The result is that IDEA will popup a very annoying error dialog twice on every frame activation complaining that it cannot copy the artifact to the IntelliJ local cache.
For now I've had to exclude downloading of all sources as a workaround.
Directory of C:\Users\linsti\.gradle\caches\artifacts\commons-pool\commons-pool\e76656920b0909b7437f8b467cb22b0c\sources 08.08.2011 10:44 <DIR> . 08.08.2011 10:44 <DIR> .. 08.08.2011 10:44 <SYMLINK> commons-pool-1.3-sources.jar [C:\Users\linsti\.gradle\caches\artifacts\filestore\SHA \SHA1(commons-pool-1.3-sources.jar)]
Directory of C:\Users\linsti\.gradle\caches\artifacts\filestore\SHA 08.08.2011 10:44 <DIR> . 08.08.2011 10:44 <DIR> .. 17.06.2009 02:46 57 386 SHA1(commons-pool-1.3-sources.jar)=
Haven't been able to reproduce this* with m4 and an integration test.
*the original issue, not what the previous comment describes
Also tried with a multi-project build where projects reference a dependency from Maven Central for which no source Jar exists. Again, gradle eclipse worked fine. (Not saying the issue doesn't exist, just that I can't reproduce it.)
I have attached an example project which fails with the following output:
:: problems summary ::
:::: WARNINGS
module not found: #springockito;1.0.0-SNAPSHOT
==== clientModule: tried
==== internal-repository: tried
==== 7lhqmligtirsqhskc7p951q46p: tried
– artifact #springockito;1.0.0-SNAPSHOT!springockito.jar(source):
C:\Program\Progress\Sonic\Workbench8.0\workspace\TestCompileProject\locallibs/springockito-1.0.0-SNAPSHOT-sources.jar
C:\Program\Progress\Sonic\Workbench8.0\workspace\TestCompileProject\locallibs/springockito-sources.jar
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: #springockito;1.0.0-SNAPSHOT: not found
::::::::::::::::::::::::::::::::::::::::::::::
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ':eclipseClasspath'.
Cause: Could not resolve all dependencies for configuration 'detachedConfiguration1':
- unresolved dependency: #springockito;1.0.0-SNAPSHOT: not found
- 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: 2.125 secs
Command line: gradle eclipse
gradle -version:
------------------------------------------------------------
Gradle 1.0-milestone-4
------------------------------------------------------------
Gradle build time: den 28 juli 2011 kl 10:38 CEST
Groovy: 1.7.10
Ant: Apache Ant(TM) version 1.8.2 compiled on December 20 2010
Ivy: 2.2.0
JVM: 1.6.0_26 (Sun Microsystems Inc. 20.1-b02)
OS: Windows XP 5.1 x86
- What went wrong: Execution failed for task ':eclipseClasspath'. Cause: Could not resolve all dependencies for configuration 'detachedConfiguration1':
- unresolved dependency: #springockito;1.0.0-SNAPSHOT: not found
- Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
I got the same error while running the eclipse task on the core-imp submodule using Gradle 1.0-milestone-4:
:coreImpl:eclipseClasspath :: problems summary :: :::: WARNINGS module not found: org.sonatype.pmaven#pmaven-groovy;0.8-20100325 ==== clientModule: tried ==== internal-repository: tried ==== http://repo.gradle.org/gradle/libs: tried http://repo.gradle.org/gradle/libs/org/sonatype/pmaven/pmaven-groovy/0.8-20100325/pmaven-groovy-0.8-20100325.pom -- artifact org.sonatype.pmaven#pmaven-groovy;0.8-20100325!pmaven-groovy.jar(source): http://repo.gradle.org/gradle/libs/org/sonatype/pmaven/pmaven-groovy/0.8-20100325/pmaven-groovy-0.8-20100325-sources.jar ==== jfrog: tried http://repo.jfrog.org/artifactory/gradle-plugins-snapshots/org.sonatype.pmaven/pmaven-groovy/0.8-20100325/ivy-0.8-20100325.xml -- artifact org.sonatype.pmaven#pmaven-groovy;0.8-20100325!pmaven-groovy.jar(source): http://repo.jfrog.org/artifactory/gradle-plugins-snapshots/org.sonatype.pmaven/pmaven-groovy/0.8-20100325/pmaven-groovy-0.8-20100325-sources.jar module not found: org.sonatype.pmaven#pmaven-common;0.8-20100325 ==== clientModule: tried ==== internal-repository: tried ==== http://repo.gradle.org/gradle/libs: tried http://repo.gradle.org/gradle/libs/org/sonatype/pmaven/pmaven-common/0.8-20100325/pmaven-common-0.8-20100325.pom -- artifact org.sonatype.pmaven#pmaven-common;0.8-20100325!pmaven-common.jar(source): http://repo.gradle.org/gradle/libs/org/sonatype/pmaven/pmaven-common/0.8-20100325/pmaven-common-0.8-20100325-sources.jar ==== jfrog: tried http://repo.jfrog.org/artifactory/gradle-plugins-snapshots/org.sonatype.pmaven/pmaven-common/0.8-20100325/ivy-0.8-20100325.xml -- artifact org.sonatype.pmaven#pmaven-common;0.8-20100325!pmaven-common.jar(source): http://repo.jfrog.org/artifactory/gradle-plugins-snapshots/org.sonatype.pmaven/pmaven-common/0.8-20100325/pmaven-common-0.8-20100325-sources.jar :::::::::::::::::::::::::::::::::::::::::::::: :: UNRESOLVED DEPENDENCIES :: :::::::::::::::::::::::::::::::::::::::::::::: :: org.sonatype.pmaven#pmaven-groovy;0.8-20100325: not found :: org.sonatype.pmaven#pmaven-common;0.8-20100325: not found :::::::::::::::::::::::::::::::::::::::::::::: FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':coreImpl:eclipseClasspath'. Cause: Could not resolve all dependencies for configuration 'detachedConfiguration4': - unresolved dependency: org.sonatype.pmaven#pmaven-groovy;0.8-20100325: not found - unresolved dependency: org.sonatype.pmaven#pmaven-common;0.8-20100325: not found ------------------------------------------------------------ Gradle 1.0-milestone-4 ------------------------------------------------------------ Gradle build time: jueves 28 de julio de 2011 03:38:22 AM COT Groovy: 1.7.10 Ant: Apache Ant(TM) version 1.8.2 compiled on December 20 2010 Ivy: 2.2.0 JVM: 1.6.0_20 (Sun Microsystems Inc. 19.0-b09) OS: Linux 2.6.35-30-generic amd64
But installing gradle from the source (commit 8a1ebf3, master branch) and using it to run the eclipse task, I just got a warning:
:coreImpl:eclipseClasspath :: problems summary :: :::: WARNINGS module not found: org.sonatype.pmaven#pmaven-groovy;0.8-20100325 ==== clientModule: tried ==== internal-repository: tried ==== maven: tried http://repo.gradle.org/gradle/libs/org/sonatype/pmaven/pmaven-groovy/0.8-20100325/pmaven-groovy-0.8-20100325.pom -- artifact org.sonatype.pmaven#pmaven-groovy;0.8-20100325!pmaven-groovy.jar(source): http://repo.gradle.org/gradle/libs/org/sonatype/pmaven/pmaven-groovy/0.8-20100325/pmaven-groovy-0.8-20100325-sources.jar ==== jfrog: tried http://repo.jfrog.org/artifactory/gradle-plugins-snapshots/org.sonatype.pmaven/pmaven-groovy/0.8-20100325/ivy-0.8-20100325.xml -- artifact org.sonatype.pmaven#pmaven-groovy;0.8-20100325!pmaven-groovy.jar(source): http://repo.jfrog.org/artifactory/gradle-plugins-snapshots/org.sonatype.pmaven/pmaven-groovy/0.8-20100325/pmaven-groovy-0.8-20100325-sources.jar module not found: org.sonatype.pmaven#pmaven-common;0.8-20100325 ==== clientModule: tried ==== internal-repository: tried ==== maven: tried http://repo.gradle.org/gradle/libs/org/sonatype/pmaven/pmaven-common/0.8-20100325/pmaven-common-0.8-20100325.pom -- artifact org.sonatype.pmaven#pmaven-common;0.8-20100325!pmaven-common.jar(source): http://repo.gradle.org/gradle/libs/org/sonatype/pmaven/pmaven-common/0.8-20100325/pmaven-common-0.8-20100325-sources.jar ==== jfrog: tried http://repo.jfrog.org/artifactory/gradle-plugins-snapshots/org.sonatype.pmaven/pmaven-common/0.8-20100325/ivy-0.8-20100325.xml -- artifact org.sonatype.pmaven#pmaven-common;0.8-20100325!pmaven-common.jar(source): http://repo.jfrog.org/artifactory/gradle-plugins-snapshots/org.sonatype.pmaven/pmaven-common/0.8-20100325/pmaven-common-0.8-20100325-sources.jar :::::::::::::::::::::::::::::::::::::::::::::: :: UNRESOLVED DEPENDENCIES :: :::::::::::::::::::::::::::::::::::::::::::::: :: org.sonatype.pmaven#pmaven-groovy;0.8-20100325: not found :: org.sonatype.pmaven#pmaven-common;0.8-20100325: not found :::::::::::::::::::::::::::::::::::::::::::::: :coreImpl:eclipseJdt :coreImpl:eclipseProject :coreImpl:eclipse BUILD SUCCESSFUL Total time: 1 mins 19.379 secs ------------------------------------------------------------ Gradle 1.0-milestone-5-20110907220105-0500 ------------------------------------------------------------ Gradle build time: miércoles 7 de septiembre de 2011 10:01:05 PM COT Groovy: 1.7.10 Ant: Apache Ant(TM) version 1.8.2 compiled on December 20 2010 Ivy: 2.2.0 JVM: 1.6.0_20 (Sun Microsystems Inc. 19.0-b09) OS: Linux 2.6.35-30-generic amd64
By the way, I got the same results running the eclipse task on the sample project provided by Jesper Holmberg. Does it means that this bug is fixed?
:coreImpl:eclipseClasspath :: problems summary :: :::: WARNINGS module not found: org.sonatype.pmaven#pmaven-groovy;0.8-20100325 ==== clientModule: tried ==== internal-repository: tried ==== http://repo.gradle.org/gradle/libs: tried http://repo.gradle.org/gradle/libs/org/sonatype/pmaven/pmaven-groovy/0.8-20100325/pmaven-groovy-0.8-20100325.pom -- artifact org.sonatype.pmaven#pmaven-groovy;0.8-20100325!pmaven-groovy.jar(source): http://repo.gradle.org/gradle/libs/org/sonatype/pmaven/pmaven-groovy/0.8-20100325/pmaven-groovy-0.8-20100325-sources.jar ==== jfrog: tried http://repo.jfrog.org/artifactory/gradle-plugins-snapshots/org.sonatype.pmaven/pmaven-groovy/0.8-20100325/ivy-0.8-20100325.xml -- artifact org.sonatype.pmaven#pmaven-groovy;0.8-20100325!pmaven-groovy.jar(source): http://repo.jfrog.org/artifactory/gradle-plugins-snapshots/org.sonatype.pmaven/pmaven-groovy/0.8-20100325/pmaven-groovy-0.8-20100325-sources.jar module not found: org.sonatype.pmaven#pmaven-common;0.8-20100325 ==== clientModule: tried ==== internal-repository: tried ==== http://repo.gradle.org/gradle/libs: tried http://repo.gradle.org/gradle/libs/org/sonatype/pmaven/pmaven-common/0.8-20100325/pmaven-common-0.8-20100325.pom -- artifact org.sonatype.pmaven#pmaven-common;0.8-20100325!pmaven-common.jar(source): http://repo.gradle.org/gradle/libs/org/sonatype/pmaven/pmaven-common/0.8-20100325/pmaven-common-0.8-20100325-sources.jar ==== jfrog: tried http://repo.jfrog.org/artifactory/gradle-plugins-snapshots/org.sonatype.pmaven/pmaven-common/0.8-20100325/ivy-0.8-20100325.xml -- artifact org.sonatype.pmaven#pmaven-common;0.8-20100325!pmaven-common.jar(source): http://repo.jfrog.org/artifactory/gradle-plugins-snapshots/org.sonatype.pmaven/pmaven-common/0.8-20100325/pmaven-common-0.8-20100325-sources.jar :::::::::::::::::::::::::::::::::::::::::::::: :: UNRESOLVED DEPENDENCIES :: :::::::::::::::::::::::::::::::::::::::::::::: :: org.sonatype.pmaven#pmaven-groovy;0.8-20100325: not found :: org.sonatype.pmaven#pmaven-common;0.8-20100325: not found :::::::::::::::::::::::::::::::::::::::::::::: FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':coreImpl:eclipseClasspath'. Cause: Could not resolve all dependencies for configuration 'detachedConfiguration4': - unresolved dependency: org.sonatype.pmaven#pmaven-groovy;0.8-20100325: not found - unresolved dependency: org.sonatype.pmaven#pmaven-common;0.8-20100325: not found ------------------------------------------------------------ Gradle 1.0-milestone-4 ------------------------------------------------------------ Gradle build time: jueves 28 de julio de 2011 03:38:22 AM COT Groovy: 1.7.10 Ant: Apache Ant(TM) version 1.8.2 compiled on December 20 2010 Ivy: 2.2.0 JVM: 1.6.0_20 (Sun Microsystems Inc. 19.0-b09) OS: Linux 2.6.35-30-generic amd64
:coreImpl:eclipseClasspath :: problems summary :: :::: WARNINGS module not found: org.sonatype.pmaven#pmaven-groovy;0.8-20100325 ==== clientModule: tried ==== internal-repository: tried ==== maven: tried http://repo.gradle.org/gradle/libs/org/sonatype/pmaven/pmaven-groovy/0.8-20100325/pmaven-groovy-0.8-20100325.pom -- artifact org.sonatype.pmaven#pmaven-groovy;0.8-20100325!pmaven-groovy.jar(source): http://repo.gradle.org/gradle/libs/org/sonatype/pmaven/pmaven-groovy/0.8-20100325/pmaven-groovy-0.8-20100325-sources.jar ==== jfrog: tried http://repo.jfrog.org/artifactory/gradle-plugins-snapshots/org.sonatype.pmaven/pmaven-groovy/0.8-20100325/ivy-0.8-20100325.xml -- artifact org.sonatype.pmaven#pmaven-groovy;0.8-20100325!pmaven-groovy.jar(source): http://repo.jfrog.org/artifactory/gradle-plugins-snapshots/org.sonatype.pmaven/pmaven-groovy/0.8-20100325/pmaven-groovy-0.8-20100325-sources.jar module not found: org.sonatype.pmaven#pmaven-common;0.8-20100325 ==== clientModule: tried ==== internal-repository: tried ==== maven: tried http://repo.gradle.org/gradle/libs/org/sonatype/pmaven/pmaven-common/0.8-20100325/pmaven-common-0.8-20100325.pom -- artifact org.sonatype.pmaven#pmaven-common;0.8-20100325!pmaven-common.jar(source): http://repo.gradle.org/gradle/libs/org/sonatype/pmaven/pmaven-common/0.8-20100325/pmaven-common-0.8-20100325-sources.jar ==== jfrog: tried http://repo.jfrog.org/artifactory/gradle-plugins-snapshots/org.sonatype.pmaven/pmaven-common/0.8-20100325/ivy-0.8-20100325.xml -- artifact org.sonatype.pmaven#pmaven-common;0.8-20100325!pmaven-common.jar(source): http://repo.jfrog.org/artifactory/gradle-plugins-snapshots/org.sonatype.pmaven/pmaven-common/0.8-20100325/pmaven-common-0.8-20100325-sources.jar :::::::::::::::::::::::::::::::::::::::::::::: :: UNRESOLVED DEPENDENCIES :: :::::::::::::::::::::::::::::::::::::::::::::: :: org.sonatype.pmaven#pmaven-groovy;0.8-20100325: not found :: org.sonatype.pmaven#pmaven-common;0.8-20100325: not found :::::::::::::::::::::::::::::::::::::::::::::: :coreImpl:eclipseJdt :coreImpl:eclipseProject :coreImpl:eclipse BUILD SUCCESSFUL Total time: 1 mins 19.379 secs ------------------------------------------------------------ Gradle 1.0-milestone-5-20110907220105-0500 ------------------------------------------------------------ Gradle build time: miércoles 7 de septiembre de 2011 10:01:05 PM COT Groovy: 1.7.10 Ant: Apache Ant(TM) version 1.8.2 compiled on December 20 2010 Ivy: 2.2.0 JVM: 1.6.0_20 (Sun Microsystems Inc. 19.0-b09) OS: Linux 2.6.35-30-generic amd64
I still have this issue with 1.0-m4 and a very small project at https://github.com/huxi/lbcore224 at revision 01e6acdf657fb8679cf01c51e8d5652f361b31fd.
It is using a flatDir repository and sources are simply not there.
Just add "apply plugin: 'idea'" to build.gradle.
Calling ./gradlew idea will always fail.
This bug is fixed in master, but not in milestone-4 (see the fix version/s information).
Please let me know if you are still facing this error using latest master (or one of younger milestone-5 snapshot releases).
Hope that helps!
It is related GRADLE-1736. With the latest master/next gradle version the build will not break when idea cannot find sources. There might be an ivy warning printed instead but the idea metadata will be created and one can start developing using IDEA.
I'm closing this issue to avoid confusion about: is it fixed or not. If the ivy warning bothers someone please submit a separate ticket
Unfortunately, the ivy warning is hard to surpress.
Workaround for versions < milestone-5
ideaModule.downloadSources = false //or for all projects: allprojects { ideaModule.downloadSources = false }
I can confirm that this is working with 1.0-milestone-5-20111008000006+0200.
Thanks for the infos!
Agreed. Definitely a bug, will fix it.