Gradle
  1. Gradle
  2. GRADLE-2175

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

    Details

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

      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 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 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
          caiweiwei added a comment -

          Will fix?

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

          yes

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

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

          Show
          caiweiwei added a comment - When? Or any method we can do about it? Thank you.
          Hide
          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
          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:
              René Gröschke
              Reporter:
              Gradle Forums
            • Votes:
              4 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development