Uploaded image for project: 'Gradle'
  1. Gradle
  2. GRADLE-2175

Snapshot dependencies with sources/test classifier are not considered 'changing'

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4-rc-1
    • Gradle Forums topic Reference:

      Description

      We publish source and test code jars for common libraries to Nexus.

      So we end up with something like:

      core-1.0-SNAPSHOT.jar
      core-1.0-SNAPSHOT-sources.jar
      core-1.0-SNAPSHOT-test.jar

      Then I refer to the test jar from another project like so:

      testCompile group: 'foo', name: 'core', version: '1.0-SNAPSHOT.jar', classifier: 'test'

      This works the first time it is run but the updates do not get downloaded. So I have the usual:

      configurations.all {
      resolutionStrategy

      { //don't cache snapshots cacheChangingModulesFor 0, 'seconds' }

      }

      This works for the main artifact but not for the test jar. What can I do to get the test jar to update like a normal SNAPSHOT?

      Cheers, Ben

        Issue Links

          Activity

          Hide
          daz Daz DeBoer added a comment -

          I've confirmed this is an issue: it is caused by the fact that artifacts with classifiers are not available via ModuleDescriptor.getAllArtifacts(), and so we don't expire them from the cache when we expire the module from the cache. See ChangingModuleVersionRepository#expireArtifactsForChangingModule().

          Show
          daz Daz DeBoer added a comment - I've confirmed this is an issue: it is caused by the fact that artifacts with classifiers are not available via ModuleDescriptor.getAllArtifacts(), and so we don't expire them from the cache when we expire the module from the cache. See ChangingModuleVersionRepository#expireArtifactsForChangingModule().
          Hide
          cwocwo caiweiwei added a comment -

          Will fix?

          Show
          cwocwo caiweiwei added a comment - Will fix?
          Hide
          adammurdoch Adam Murdoch added a comment -

          yes

          Show
          adammurdoch Adam Murdoch added a comment - yes
          Hide
          cwocwo caiweiwei added a comment -

          When?
          Or any method we can do about it?
          Thank you.

          Show
          cwocwo caiweiwei added a comment - When? Or any method we can do about it? Thank you.
          Hide
          adammurdoch Adam Murdoch added a comment -

          I can't give you an accurate answer. It's queued up to be fixed 'soon', probably in the Gradle 1.2 or 1.3 timeframe. The fix won't make it into Gradle 1.1.

          Show
          adammurdoch Adam Murdoch added a comment - I can't give you an accurate answer. It's queued up to be fixed 'soon', probably in the Gradle 1.2 or 1.3 timeframe. The fix won't make it into Gradle 1.1.

            People

            • Assignee:
              breskeby René Gröschke
              Reporter:
              forums Gradle Forums
            • Votes:
              4 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development