Pipeline cache with custom maven config

Hello, in my Java project I need to define a custom settings.xml file, because in a specific branch I need to download from a private maven repository, but seems the cache is not correctly used with this configuration (in another branch, where I don't use the custom settings.xml file the cache is used).

This is the custom settings.xml (stored in the project tree as scripts/builder/maven-settings.xml):

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">

  <localRepository>${user.home}/.m2/repository/</localRepository>

  <servers>
    <server>
    <id>private-repository</id>
    <username>my-account</username>
<password>SECRET</password>
</server>
</servers>
</settings>

I also added the localRepository config but seems don't change nothing.

This is the xxx file:

image: maven:3.3.3-jdk-8

pipelines:
custom:
build-win:
- step:
caches:
- maven
script:
- mvn -B -s scripts/builder/maven-settings.xml -DargLine=-Xmx3072m package

any ideas? Thanks in advance!

0 answers

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

415 views 5 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