0

How can I reference a custom remote Maven repository which is hosted on Stash (aka. Bitbucket Server)? Here is what I tried in the root build.gradle:

allprojects {
    repositories {
        jcenter()
        maven {
            // This Stash path does not work
            url "https://stash.company.lan/projects/AP/repos/internal-repository"
        }
        maven {
            // This GitHub path works fine
            url "https://github.com/user/mvn-repo/tree/master"
        }
    }
}

I cannot figure out the correct path to the raw folder structure for Stash so Gradle understands. When I reference a library stored in the repository the following error is thrown:

Error:Cause: unable to find valid certification path to requested target

JJD
  • 50,076
  • 60
  • 203
  • 339

2 Answers2

0

I dont know why you want use Stash, because using SCM instead Nexus is not so good way... But, if you want, check nebula plugin for gradle, here is it. Maybe it will help you ;)

Just

JJD
  • 50,076
  • 60
  • 203
  • 339
Hrabosch
  • 1,541
  • 8
  • 12
0

Jeroen Mols describes a setup in his article:

I have not tried it yet since I decided to install a local Nexus instance meanwhile. Please comment here if it worked for you.

JJD
  • 50,076
  • 60
  • 203
  • 339