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

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

Dmytro Muravov November 17, 2017

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

0 votes
richard_leon September 28, 2018

 

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
TAGS
AUG Leaders

Atlassian Community Events