Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,551,670
Community Members
 
Community Events
184
Community Groups

How can I use Bitbucket as private maven repository?

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". 

3 answers

Try this:


https://jeroenmols.com/blog/2016/02/05/wagongit/

 

Sounds thats work, I will try it later.

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?**

Have you any progress with this?

By same logic we shouldn't use bb pipeline or anything else, because initially bb was designed to do only source control..

Like hamedyaslem1 likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events