Missed Team ’24? Catch up on announcements here.

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

Pipeline cache with custom maven config

Luca Morettoni
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 27, 2017

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!

1 answer

0 votes
Matti Ilvonen November 18, 2019

I would like to know if you had any answer to this.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events