Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Maven cache not working anymore

Hey, 

since a few days the maven cache does not seem to work for me anymore. I use a custom maven settings.xml which holds information about a private repo. This worked like 5 days ago and I could see the maven cache in the bitbucket ui. Since I didn't change the pipelines config, I assume that there may be is something wrong on the other end?

My pipelines config

image: maven:3.6.1

pipelines:
branches:
stage:
- step:
name: Build
caches:
- maven
script:
- chmod +x create-settings.sh && ./create-settings.sh
- mvn -s settings.xml clean install
artifacts:
- webapp/target/*.war

 In the Teardown phase it says: 

Assembling contents of new cache 'maven'
Searching for files matching artifact pattern webapp/target/*.war
Artifact pattern webapp/target/*.war matched 1 files with a total size of 389.6 MiB
Compressed files matching artifact pattern webapp/target/*.war to 389.6 MiB in 14 seconds
Uploading artifact of 389.6 MiB
Successfully uploaded artifact in 25 seconds

But when I run a subsequent build it downloads all dependencies again. 

Any ideas?

 

2 answers

1 accepted

1 vote
Answer accepted

Update: I just updated my pipeline to the following nad it worked again. I am not sure if it is working because of my changes or because I simply edited the pipelines.yml...

image: maven:3.6.1

pipelines:
branches:
stage:
- step:
name: Build
image: maven:3.6.1
caches:
- maven
script:
- chmod +x create-settings.sh && ./create-settings.sh
- mvn -B -s settings.xml package
artifacts:
- webapp/target/*.war

@Jan Rose  This looks like workaround? Why official pipeline cache docs doesn't mention that?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events