Gradle
  1. Gradle
  2. GRADLE-898

Automatically detect and attach source/javadoc JARs to Eclipse projects

    Details

    • Type: New Feature New Feature
    • Status: Resolved Resolved
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9-rc-1

      Description

      Hi,

      Many artifacts in Maven repositories contain source/javadoc JARs together with binaries, and Eclipse is able to use such JARs for source and documentation searches.

      For example, something like:

      ls -l .../pub/repository/wiquery/1.0
      rw-rr- 1 root root 680653 2010-03-14 08:58 wiquery-1.0.jar
      rw-rr- 1 root root 1195785 2010-03-14 08:58 wiquery-1.0-javadoc.jar
      rw-rr- 1 root root 713911 2010-03-14 08:58 wiquery-1.0-sources.jar

      The questions are:

      1. How can I instruct Gradle to download these JARs (better automatically, if present)?
      2. How can I instruct Gradle's Eclipse project generator to reuse those JARs?

      Thank you,

      Andrew

        Issue Links

          Activity

          Hide
          Andrew Schetinin
          added a comment -

          I tested the last nightly build (Aug 3) and it works very well.
          Thanks a lot!

          Issues encountered during the test:

          1. Time of creating Eclipse projects increased - 6-7 minutes instead of 10-20 seconds on my 10+ projects. Not sure what exactly happens there - it looks like it does lots of lookups in remote repositories, even though all dependencies are downloaded already. I tried to set Ivy artifact check period to "eternal" but it did not help. BTW, the build times are okay - it's only in Eclipse generation.

          2. GRADLE_CACHE env. var is really annoying (I found and used the workaround you suggested in another ticket) - I hope you'll fix it so that it works automatically as it was in gradle 0.9 preview 2

          3. One thing that is probably missing in Eclipse plugin is a clean build - now it does not re-create the projects, but rather adds new libraries into the project files, so if something significant changes, the old (wrong) dependencies remain in .classpath file, and old settings remain under .settings folder and Eclipse goes crazy. The workaround is to remove all Eclipse files, and generate them again.

          Show
          Andrew Schetinin
          added a comment - I tested the last nightly build (Aug 3) and it works very well. Thanks a lot! Issues encountered during the test: 1. Time of creating Eclipse projects increased - 6-7 minutes instead of 10-20 seconds on my 10+ projects. Not sure what exactly happens there - it looks like it does lots of lookups in remote repositories, even though all dependencies are downloaded already. I tried to set Ivy artifact check period to "eternal" but it did not help. BTW, the build times are okay - it's only in Eclipse generation. 2. GRADLE_CACHE env. var is really annoying (I found and used the workaround you suggested in another ticket) - I hope you'll fix it so that it works automatically as it was in gradle 0.9 preview 2 3. One thing that is probably missing in Eclipse plugin is a clean build - now it does not re-create the projects, but rather adds new libraries into the project files, so if something significant changes, the old (wrong) dependencies remain in .classpath file, and old settings remain under .settings folder and Eclipse goes crazy. The workaround is to remove all Eclipse files, and generate them again.
          Hide
          Hans Dockter
          added a comment -

          @Andrew Thanks a lot for your feedback.

          1.) We know that it is slow. This should much improve with the new dependencies of 1.0-M1. We need to do some work arounds ATM and I can't be bothered doing too much profiling as it will be replaced soon.

          2.) We will fix that soon.

          3.) This is available. We have made it consisten with our standard naming. There is now cleanEclipse, cleanProject, cleanClasspath and cleanWtp. The user's guide sections are also updated and improved. But the new version is not yet uploaded.

          Show
          Hans Dockter
          added a comment - @Andrew Thanks a lot for your feedback. 1.) We know that it is slow. This should much improve with the new dependencies of 1.0-M1. We need to do some work arounds ATM and I can't be bothered doing too much profiling as it will be replaced soon. 2.) We will fix that soon. 3.) This is available. We have made it consisten with our standard naming. There is now cleanEclipse , cleanProject , cleanClasspath and cleanWtp . The user's guide sections are also updated and improved. But the new version is not yet uploaded.

            People

            • Assignee:
              Hans Dockter
              Reporter:
              Andrew Schetinin
            • Votes:
              5 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: