Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.3.2
-
Fix Version/s: 2.3-M1
-
Component/s: None
-
Labels:None
Description
When I add a dependency via the dependency DSL, Grails tries to get hold of the "source" and "javadoc" JARs too for some reason. Here's part of the output:
:: problems summary :: :::: WARNINGS [FAILED ] net.sf.dozer#dozer;5.1!dozer.jar(source): (0ms) ==== grailsPlugins: tried /home/pal20/dev/projects/scratch/test-1.7.3/lib/dozer-5.1.jar /home/pal20/.grails/1.3.2.BUILD-SNAPSHOT/projects/test-1.7.3/plugins/tomcat-1.3.1/lib/dozer-5.1.jar /home/pal20/.grails/1.3.2.BUILD-SNAPSHOT/projects/test-1.7.3/plugins/hibernate-1.3.1/lib/dozer-5.1.jar ==== grailsHome: tried /home/pal20/dev/tools/git/grails-core/lib/dozer-5.1-sources.jar ==== grailsHome: tried /home/pal20/dev/tools/git/grails-core/dist/dozer-5.1-sources.jar ==== grailsHome: tried /home/pal20/dev/tools/git/grails-core/plugins/grails-dozer-5.1.jar ==== grailsCentral: tried http://svn.codehaus.org/grails-plugins/grails-dozer/tags/RELEASE_5_1/grails-dozer-5.1.jar ==== grailsCore: tried http://svn.codehaus.org/grails/trunk/grails-plugins/grails-dozer/tags/RELEASE_5_1/grails-dozer-5.1.jar [FAILED ] net.sf.dozer#dozer;5.1!dozer.jar(javadoc): (0ms) ==== grailsPlugins: tried /home/pal20/dev/projects/scratch/test-1.7.3/lib/dozer-5.1.jar /home/pal20/.grails/1.3.2.BUILD-SNAPSHOT/projects/test-1.7.3/plugins/tomcat-1.3.1/lib/dozer-5.1.jar /home/pal20/.grails/1.3.2.BUILD-SNAPSHOT/projects/test-1.7.3/plugins/hibernate-1.3.1/lib/dozer-5.1.jar ==== grailsHome: tried /home/pal20/dev/tools/git/grails-core/lib/dozer-5.1-javadoc.jar ==== grailsHome: tried /home/pal20/dev/tools/git/grails-core/dist/dozer-5.1-javadoc.jar ==== grailsHome: tried /home/pal20/dev/tools/git/grails-core/plugins/grails-dozer-5.1.jar ==== grailsCentral: tried http://svn.codehaus.org/grails-plugins/grails-dozer/tags/RELEASE_5_1/grails-dozer-5.1.jar ==== grailsCore: tried http://svn.codehaus.org/grails/trunk/grails-plugins/grails-dozer/tags/RELEASE_5_1/grails-dozer-5.1.jar :::::::::::::::::::::::::::::::::::::::::::::: :: FAILED DOWNLOADS :: :: ^ see resolution messages for details ^ :: :::::::::::::::::::::::::::::::::::::::::::::: :: net.sf.dozer#dozer;5.1!dozer.jar(source) :: net.sf.dozer#dozer;5.1!dozer.jar(javadoc) ::::::::::::::::::::::::::::::::::::::::::::::
This is critical, because it seems to block the automatic installation of the Hibernate and Tomcat plugins. I have attached a project that exhibits the problem.
-
Hide
- dep-errors.zip
- 03/Jun/10 9:26 AM
- 180 kB
- Peter Ledbrook
-
- test-1.7.3/.project 0.5 kB
- test-1.7.3/.classpath 0.7 kB
- test-1.7.3/application.properties 0.2 kB
- test-1.7.3/web-app/.../grails_logo.png 10 kB
- test-1.7.3/web-app/.../leftnav_top.png 3 kB
- test-1.7.3/web-app/.../leftnav_btm.png 4 kB
- test-1.7.3/web-app/.../springsource.png 9 kB
- test-1.7.3/web-app/.../database_delete.png 0.6 kB
- test-1.7.3/web-app/.../database_edit.png 0.7 kB
- test-1.7.3/web-app/images/skin/house.png 0.8 kB
- test-1.7.3/web-app/.../database_table.png 0.7 kB
- test-1.7.3/web-app/.../database_save.png 0.7 kB
- test-1.7.3/web-app/.../skin/information.png 0.8 kB
- test-1.7.3/web-app/.../skin/shadow.jpg 0.3 kB
- test-1.7.3/web-app/.../skin/sorted_asc.gif 0.8 kB
- test-1.7.3/web-app/.../skin/exclamation.png 0.7 kB
- test-1.7.3/web-app/.../skin/database_add.png 0.6 kB
- test-1.7.3/web-app/.../skin/sorted_desc.gif 0.8 kB
- test-1.7.3/web-app/images/favicon.ico 10 kB
- test-1.7.3/web-app/images/spinner.gif 2 kB
- test-1.7.3/web-app/.../grails_logo.jpg 8 kB
- test-1.7.3/.../leftnav_midstretch.png 3 kB
- test-1.7.3/web-app/css/main.css 5 kB
- test-1.7.3/web-app/.../animation.js 10 kB
- test-1.7.3/web-app/.../prototype/effects.js 38 kB
- test-1.7.3/web-app/.../prototype/builder.js 5 kB
- test-1.7.3/web-app/.../prototype/controls.js 34 kB
- test-1.7.3/web-app/js/prototype/sound.js 2 kB
- test-1.7.3/web-app/.../prototype/slider.js 10 kB
- test-1.7.3/web-app/.../prototype/unittest.js 20 kB
Activity
- All
- Comments
- Work Log
- History
- Activity
- Git Commits
Once you have unpacked the attached project, add this line to BuildConfig.groovy:
mavenRepo "http://localhost:8081/artifactory/libs-releases-local/"
and clear your Ivy cache. When you run the application again, you'll see:
Downloading: /Users/pledbrook/dev/tools/git/grails-core/dist/grails-test-1.3.2.jar ... Download complete. :: problems summary :: :::: ERRORS Server access Error: Connection refused url=http://localhost:8081/artifactory/libs-releases-local/javax/xml/bind/jsr173_api/1.0/jsr173_api-1.0-sources.jar Server access Error: Connection refused url=http://localhost:8081/artifactory/libs-releases-local/javax/xml/bind/jsr173_api/1.0/jsr173_api-1.0-javadoc.jar Server access Error: Connection refused url=http://localhost:8081/artifactory/libs-releases-local/javax/activation/activation/1.1/activation-1.1-javadoc.jar Server access Error: Connection refused url=http://localhost:8081/artifactory/libs-releases-local/com/sun/xml/bind/jaxb-impl/2.0.3/jaxb-impl-2.0.3-sources.jar Server access Error: Connection refused url=http://localhost:8081/artifactory/libs-releases-local/com/sun/xml/bind/jaxb-impl/2.0.3/jaxb-impl-2.0.3-javadoc.jar
For me this seems like a problem with the POM or with Ivy as this is a transitive dependency that has the problem and we have no control over those (ie the issue exists in the ivy internals)
It's not just transitive dependencies:
:::: ERRORS Server access Error: Connection refused url=http://localhost:8081/artifactory/libs-releases-local/commons-digester/commons-digester/1.3/commons-digester-1.3-sources.jar Server access Error: Connection refused url=http://localhost:8081/artifactory/libs-releases-local/commons-digester/commons-digester/1.3/commons-digester-1.3-javadoc.jar Server access Error: Connection refused url=http://localhost:8081/artifactory/libs-releases-local/commons-logging/commons-logging/1.0/commons-logging-1.0-sources.jar Relocation to an other version number not supported in ivy : xml-apis#xml-apis;2.0.2 relocated to xml-apis#xml-apis;1.0.b2. Please update your dependency to directly use the right version. Server access Error: Connection refused url=http://localhost:8081/artifactory/libs-releases-local/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2-javadoc.jar
I declared commons-digester as a direct dependency and it exhibits the same issue. This only seems to happen with dependencies pulled from Maven Central. The ones in GRAILS_HOME are immune.
I just did install a plugin and grails tries to download the corresponding sources and javadoc jars. And that takes a long time of waiting for timeouts.
Please has anybody a work-around for that - except placing fake javadoc and sources jar files?
Thanks.
I have finally found out why dependency resolution in our projects take ages with an empty ivy cache. After finding out that ivy is (or is trying) to download source and apidoc files from the repositories, I instantly found this issue. Please consider giving this a higher priority - it really is making life for our whole team very hard. I see that there may not be an easy fix, as I couldn't find any settings for ivy that would disable the downloading of extra artifacts.
After some investigation, it seems this issue is also associated to the springsource repository, I have seen that if ivy goes to repository.springsource.com (which I believe is hosted on the amazon s3), then you experience huge latency in receiving the 404's (avg I see is around 120000ms). I too would like to see this issue with a higher priority.
Perhaps disabling transitive resolution for the problematic dependency may help? For example,
runtime "org.springframework:spring-amqp:1.0.0.M2", { transitive = false }
Another workaround would be to have an internal Maven repo that has those dependencies stored in it. You could then put that at the top of the repository list.
Many artifact doesn't have sources and javadoc jars available, so this behavior is really bad for build performance.
See also GRAILS-9021 which is essentially the same issue.
I found this especially unhelpful when deploying to Heroku. Not sure that Peter's suggestion would be viable in this case.
Duplicates
GRAILS-6315