How can I force maven snapshot updates in pipelines when using maven cache?

Michiel Oliemans February 15, 2018

I'm using maven cache in bitbucket pipelines. During development in the staging branch I'm relying on SNAPSHOTs which are in active development as well. I'd like to be able to use the maven cache, but exclude the SNAPSHOTs from the cache, and instead have those updated every time. Right now the only way to have those SNAPSHOTs updated is to clear the cache.

Is there an option that could be configured to support this or is this a feature that could be added to pipelines? 

1 answer

1 vote
Mikhail Kopylov October 31, 2018

@Michiel Oliemans I've faced the same trouble. Have you found the solution?

Michiel Oliemans October 31, 2018

It's not beautiful, but it works in my case. I've added the following script before I start the maven build:

find ~/.m2/ -name "*SNAPSHOT" | xargs rm -rf

That basically removes all directories in the maven that end with "SNAPSHOT".

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events