It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Artifacts immutable?

Timo Böwing I'm New Here Mar 22, 2019


I am using Bitbucket Pipelines and passing a folder between steps works so far, using:


   - step: &compile
      name: Compile (no tests)
- maven
- target/**
- mvn --batch-mode compile -DskipTests -DbuildNumber=$BITBUCKET_BUILD_NUMBER

(full version)

However, it seems that once I declared the artifact it is immutable to succeeding steps and they cannot write to it?

I am using Maven with Docker option and it seems that when doing this:

  • Step 1 mvn compile # generates .class file in ./target

  • Steps... with tests etc.
  • Step 4: mvn package # should add .jar file to ./target - not working

That Step 4 cannot add stuff to the {{./target}} folder - files from Step 1 are present (generated .class files).

Here is my pipeline, including directory listings visible in the build logs.

Another user reported a possible similar thingy with Node builds and using the cache. Is this because I am using the Maven cache, that causes my ./target folder to be not writable in following steps? Think that Maven cache only buffers the local Maven Repo.


Thanks for any support here,


1 answer

0 votes
Timo Böwing I'm New Here Apr 07, 2019

Turns out I had to add the artifact element in each succeeding step, just like the documentation tells... :(

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder :  #!/bin/bash source "$(dirname "$0")/" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

1,935 views 1 19
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you