Grails
  1. Grails
  2. GRAILS-6359

Grails attempts to download "source" and "javadoc" dependencies

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor 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.

        Activity

        Peter Ledbrook created issue -
        Hide
        Graeme Rocher added a comment -

        Duplicates GRAILS-6315

        Show
        Graeme Rocher added a comment - Duplicates GRAILS-6315
        Graeme Rocher made changes -
        Field Original Value New Value
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Duplicate [ 3 ]
        Hide
        Peter Ledbrook added a comment -

        Once you have unpacked the attached project, add this line to BuildConfig.groovy:

        Unable to find source-code formatter for language: groovy. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
        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
        
        Show
        Peter Ledbrook added a comment - Once you have unpacked the attached project, add this line to BuildConfig.groovy : Unable to find source-code formatter for language: groovy. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml 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
        Peter Ledbrook made changes -
        Resolution Duplicate [ 3 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Peter Ledbrook made changes -
        Priority Critical [ 2 ] Minor [ 4 ]
        Hide
        Graeme Rocher added a comment -

        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)

        Show
        Graeme Rocher added a comment - 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)
        Hide
        Peter Ledbrook added a comment -

        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.

        Show
        Peter Ledbrook added a comment - 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.
        Jeff Scott Brown made changes -
        Fix Version/s 1.3.2 [ 16485 ]
        Fix Version/s 1.3.3 [ 16545 ]
        Jeff Scott Brown made changes -
        Fix Version/s 1.3.4 [ 16615 ]
        Fix Version/s 1.3.3 [ 16545 ]
        Jeff Scott Brown made changes -
        Fix Version/s 1.3.5 [ 16651 ]
        Fix Version/s 1.3.4 [ 16615 ]
        Jeff Scott Brown made changes -
        Fix Version/s 1.3.6 [ 16730 ]
        Fix Version/s 1.3.5 [ 16651 ]
        Hide
        Michael Habbert added a comment -

        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.

        Show
        Michael Habbert added a comment - 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.
        Jeff Scott Brown made changes -
        Fix Version/s 1.3.6 [ 16730 ]
        Fix Version/s 1.4-M1 [ 16812 ]
        Hide
        Adam Sandor added a comment -

        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.

        Show
        Adam Sandor added a comment - 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.
        Hide
        Paul Barford added a comment -

        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.

        Show
        Paul Barford added a comment - 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.
        Hide
        Peter Ledbrook added a comment -

        Perhaps disabling transitive resolution for the problematic dependency may help? For example,

        runtime "org.springframework:spring-amqp:1.0.0.M2", {
            transitive = false
        }
        
        Show
        Peter Ledbrook added a comment - Perhaps disabling transitive resolution for the problematic dependency may help? For example, runtime "org.springframework:spring-amqp:1.0.0.M2" , { transitive = false }
        Hide
        Peter Ledbrook added a comment -

        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.

        Show
        Peter Ledbrook added a comment - 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.
        Contegix Support made changes -
        Project Import Thu Mar 24 21:22:24 CDT 2011 [ 1301019744151 ]
        Graeme Rocher made changes -
        Fix Version/s 1.4-M1 [ 11040 ]
        Fix Version/s 1.4-M2 [ 12504 ]
        Graeme Rocher made changes -
        Fix Version/s 2.0-M2 [ 12805 ]
        Fix Version/s 2.0-M1 [ 12504 ]
        Burt Beckwith made changes -
        Workflow jira [ 35571 ] Grails [ 41606 ]
        Burt Beckwith made changes -
        Workflow Grails [ 41606 ] Copy of Grails [ 49057 ]
        Burt Beckwith made changes -
        Workflow Copy of Grails [ 49057 ] Grails [ 56467 ]
        Burt Beckwith made changes -
        Workflow Grails [ 56467 ] Grails2 [ 64028 ]
        Graeme Rocher made changes -
        Fix Version/s 2.0-M2 [ 12805 ]
        Fix Version/s 2.0-RC1 [ 12803 ]
        Graeme Rocher made changes -
        Fix Version/s 2.0.1 [ 13005 ]
        Fix Version/s 2.0-RC1 [ 12803 ]
        Burt Beckwith made changes -
        Workflow Grails2 [ 64028 ] jira [ 71160 ]
        Burt Beckwith made changes -
        Workflow jira [ 71160 ] Grails2 [ 79202 ]
        Peter Ledbrook made changes -
        Last Reviewed 01/Jan/10
        Peter Ledbrook made changes -
        Workflow Grails2 [ 79202 ] jira [ 87394 ]
        Peter Ledbrook made changes -
        Workflow jira [ 87394 ] Grails2 [ 95544 ]
        Graeme Rocher made changes -
        Fix Version/s 2.0.2 [ 13064 ]
        Fix Version/s 2.0.1 [ 13005 ]
        Graeme Rocher made changes -
        Fix Version/s 2.0.3 [ 13094 ]
        Fix Version/s 2.0.2 [ 13064 ]
        Graeme Rocher made changes -
        Fix Version/s 2.0.4 [ 13099 ]
        Fix Version/s 2.0.3 [ 13094 ]
        Hide
        Ronny Løvtangen added a comment -

        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.

        Show
        Ronny Løvtangen added a comment - 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.
        Jeff Scott Brown made changes -
        Fix Version/s 2.2 [ 13093 ]
        Fix Version/s 2.0.4 [ 13099 ]
        Graeme Rocher made changes -
        Fix Version/s 2.3 [ 13311 ]
        Fix Version/s 2.2-RC1 [ 13093 ]
        Hide
        Alex Anderson added a comment -

        I found this especially unhelpful when deploying to Heroku. Not sure that Peter's suggestion would be viable in this case.

        Show
        Alex Anderson added a comment - I found this especially unhelpful when deploying to Heroku. Not sure that Peter's suggestion would be viable in this case.
        Hide
        Graeme Rocher added a comment -

        fixed if you use Aether dependency management in 2.3

        Show
        Graeme Rocher added a comment - fixed if you use Aether dependency management in 2.3
        Graeme Rocher made changes -
        Status Reopened [ 4 ] Closed [ 6 ]
        Assignee Graeme Rocher [ graemerocher ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Graeme Rocher
            Reporter:
            Peter Ledbrook
          • Votes:
            19 Vote for this issue
            Watchers:
            13 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Last Reviewed:

              Development