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

More easily referenced Maven local repo cache

    Details

    • Type: New Feature
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.1

      Description

      Currently it is customary to include the user's local maven repository cache as a dependency repository for "downloading" artifacts. The standard way seems to be:

      repositories {
          ...
          mavenRepo urls: "file://" + System.getProperty('user.home') + "/.m2/repository/"
      }
      

      The problem with that is that users are free to specify an alternate cache directory, the standard way being via settings.xml.

      I have developed some code y'all are free to use that sniffs out that situation. In my build I simply add that location as a repository. But I think the best generic solution is to make this available as a method mush like mavenCentral() is currently. Then user could say:

      repositories {
          ...
          mavenLocal()
      }
      

      mavenCache() was another term suggested.

      The "sniffing" code is available at http://github.com/hibernate/hibernate-core/blob/master/buildSrc/src/main/java/org/hibernate/build/gradle/maven/LocalMavenRepoSniffer.java

        Attachments

          Activity

            People

            • Assignee:
              hans_d Hans Dockter
              Reporter:
              steve@hibernate.org Steve Ebersole
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: