How to handle maven dependency to ZIP-file in Bitbucket pipeline? Edited

I am new to the Bitbucket and have just moved my source code (a maven-based Java program) to the Bitbucket.

Originally the maven pom.xml had the following dependency to a ZIP-file with some testdata which has resided in a repository manager:


<dependency>
<groupId>my.group.id</groupId>
<artifactId>MyTestdata</artifactId>
<version>6.0</version>
<type>zip</type>
<scope>test</scope>
</dependency>

Of course now the Bitbucket's pipeline has no access to that repository and cannot build.

Question(s):

  1. What is the proper way to solve the testdata dependency in the new Bitbucket's integration environment?
  2. Where and how can I deploy my testdata, is it the "Downloads" section of my repository?  
  3. How to specify in the pom.xml the dependency to an artifact from the downloads section?

 Thank you for your time!

Dmytro

1 answer

 

Hi Dmytro.

- What is the proper way to solve the testdata dependency in the new Bitbucket's integration environment?

The proper way is implement a public maven repository manager with platforms like nexus or artifactory  https://dzone.com/articles/maven-repository-manager-nexus. That saves time and headache.

Steps could be : 

a.- Install your  MyTestdata as maven dependency to your maven repository manager

b.- Add some configurations to your pom.xml and settings.xml in order to download  your MyTestdata as maven dependency. Heroku allow setting,xml override. Bitbucket must too.

You will not need to add extra configuration in your bitbucket pipeline.

Sources:

https://docs.gitlab.com/ee/ci/examples/artifactory_and_gitlab/

https://blog.bosch-si.com/developer/setting-up-maven-and-artifactory/

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

436 views 6 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you