Gradle
  1. Gradle
  2. GRADLE-2034

Existence of pom file requires that declared artifacts can be found in the same repository

    Details

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

      Description

      This is easy to reproduce with m7.

      Create a java project that pulls from mavenLocal(). Make sure hamcrest-core-1.1 is in your mavenLocal, rhen remove .m2/repository/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1.jar.

      If you run the testClasses task you'll get:

      
      12:07:12.343 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.IvyResolverBackedArtifactToFileResolver] Attempting to download org.hamcrest#hamcrest-core;1.1!hamcrest-core.jar using resolvers [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.DependencyResolverAdapter@1586b489]
      12:07:12.343 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] 		tried /Users/ld/.m2/repository/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1.jar
      12:07:12.344 [DEBUG] [org.gradle.api.internal.artifacts.repositories.ResourceCollectionResolver] Loading /Users/ld/.m2/repository/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1.jar
      12:07:12.344 [DEBUG] [org.gradle.api.internal.artifacts.repositories.ResourceCollectionResolver] Resource not reachable for org/hamcrest#hamcrest-core;1.1: res=/Users/ld/.m2/repository/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1.jar
      

      If you remove ~/.m2/repository/org/hamcrest/hamcrest-core/1.1/ then everything will work (if you are also using mavenCentral()).

      Wild guess: when seeing if mavenLocal has the dependency, we are testing for /Users/ld/.m2/repository/org/hamcrest/hamcrest-core/1.1/ instead of the actual jar file.

        Issue Links

          Activity

          Hide
          Mauro Molinari added a comment -

          So should we better open new issues for the other use cases? It is not possible anymore to open them from here, while I already opened a thread in the forums at http://forums.gradle.org/gradle/topics/making_gradle_find_a_jar_in_a_flatdir_repo_when_it_is_missing_from_a_maven_repo for my use case.

          Show
          Mauro Molinari added a comment - So should we better open new issues for the other use cases? It is not possible anymore to open them from here, while I already opened a thread in the forums at http://forums.gradle.org/gradle/topics/making_gradle_find_a_jar_in_a_flatdir_repo_when_it_is_missing_from_a_maven_repo for my use case.
          Hide
          Adam Murdoch added a comment -

          @Mauro, yes please.

          Show
          Adam Murdoch added a comment - @Mauro, yes please.
          Hide
          Osian Hughes added a comment -

          I see this was fixed yesterday, did it make it into the RC build released yesterday? if not, would it be possible to get it into RC2? Because another 3rd party framework we are using is now starting to use the local maven repo, and it is leaving this "pom only" structure all over the place in the local repo, so this fix would be very much appreciated.

          Show
          Osian Hughes added a comment - I see this was fixed yesterday, did it make it into the RC build released yesterday? if not, would it be possible to get it into RC2? Because another 3rd party framework we are using is now starting to use the local maven repo, and it is leaving this "pom only" structure all over the place in the local repo, so this fix would be very much appreciated.
          Hide
          Mauro Molinari added a comment -

          @Adam: but how to do? I added a comment at http://forums.gradle.org/gradle/topics/making_gradle_find_a_jar_in_a_flatdir_repo_when_it_is_missing_from_a_maven_repo requesting the opening of a new issue. Or should I do in a different way?

          Show
          Mauro Molinari added a comment - @Adam: but how to do? I added a comment at http://forums.gradle.org/gradle/topics/making_gradle_find_a_jar_in_a_flatdir_repo_when_it_is_missing_from_a_maven_repo requesting the opening of a new issue. Or should I do in a different way?
          Hide
          Adam Murdoch added a comment -

          @Mauro, that's fine.

          Show
          Adam Murdoch added a comment - @Mauro, that's fine.

            People

            • Assignee:
              Daz DeBoer
              Reporter:
              Luke Daley
            • Votes:
              20 Vote for this issue
              Watchers:
              23 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development