Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Bitbucket pipeline artifact config for all "target" directories of multi maven module project?

Tim Herold
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!
May 28, 2019

Hey,

 

i have a multi maven module project.

Each module generates artifacts during the build and testing process.

How to configure the bitbucket-pipeline.yml in a way that all files within all "target" directories are accessible as artifact after building?

 

I have tried it this way, but there are no artifacts displayed after build is finished.

#...
script:
- mvn --batch-mode clean package #...
artifacts:
- *.log
- '*/target/**'
- '*/target/*'
- target/**
- */target/**
- ./target/*
#...

 

 

1 answer

1 accepted

3 votes
Answer accepted
Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 21, 2019

Hey @Tim Herold,

This should do the trick (all files under target, including subdirectories):

artifacts:
- '**/target/**'

Or, if you're interested only in files with a particular extension and right under target directory, like .jar:

 artifacts:
- '**/target/*.jar'

Hope this helps.

Cheers,
Daniil

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events