The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

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

TAGS
AUG Leaders

Atlassian Community Events