I tried to leverage Bitbucket as private maven repository for the gradle project. Below are steps I tried to setup in Bitbucket and gradle project.
Bitbucket 5.0.1:
1. Create a project "repo" in Bitbucket and enable project having public access with read only
2. Create a repository "maven-repo" in Bitbucket
3. Commit com/company/shared/utils/1.0/utils-1.0.jar to "maven-repo"
Gradle Project:
1. Add Bitbucket "maven-repo" in build.gradle
repositories {
mavenCentral()
maven { url "http://bitbucketServer:9000/projects/REPO/repos/maven-repo/browse" }
}
2. Add utils-1.0.jar as dependency in build.gradle
dependencies {
// http://bitucketServer:9000/projects/REPO/repos/maven-repo/browse
compile 'com.company.shared:utils:1.0'
}
However, I got "Could not resolve: com.company.shared:utils:1.0".
I am using http://synergian.github.io/wagon-git/bitbucket.html version 0.2.5 to deploy and consume the artifact from my private bitbucket. Following the same steps as given in the documentation http://synergian.github.io/wagon-git/bitbucket.html.
Error:
`Could not resolve dependencies for project com.xxx:yyy:jar:1.0.0: The following artifacts could not be resolved: com.aaa:bbb:jar:3.0: Could not find artifact com.aaa:bbb:jar:3.0 in xxx_repo (https://api.bitbucket.org/2.0/repositories/company/xxx_repo/raw/releases)`
Research:
From my research, I found many suggested the problem in repository URL so I changed to
https://bitbucket.org/company/xxx_repo/raw/releases/ from this URL I am able to access the repo but the compilation fails with an error saying zip END header not found
`Compilation failure:
[ERROR] Error reading /home/msuser1/.m2/repository/com/aaa/bbb/3.0/bbb-3.0.jar; zip END header not found`
And too many warning saying checksum validation failed.
`[WARNING] Could not validate integrity of download from https://bitbucket.org/company/xxx_repo/raw/artifacts/com/aaa/bbb/3.0/bbb-3.0.jar: Checksum validation failed, expected <!doctype but is 2f947caee42a20633fb9c412ew53591f64b8c4481`
Solution:
**What is the exact URL for consuming the artifact from a private bitbucket?**
**Can anyone provide complete working steps to deploy and consume artifact from private bitbucket using wagon-git?**
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you any progress with this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Bitbucket manages source code. You should be looking at Nexus OSS or Artifactory for serving dependencies.
https://www.sonatype.com/download-oss-sonatype
https://jfrog.com/artifactory/
https://dzone.com/articles/maven-repository-manager-nexus
https://jfrog.com/blog/artifactory-vs-nexus-integration-matrix/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
By same logic we shouldn't use bb pipeline or anything else, because initially bb was designed to do only source control..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.