It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

Dmytro Muravov Nov 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

 

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
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder

...ipe.sh :  #!/bin/bash source "$(dirname "$0")/common.sh" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

1,975 views 1 19
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you