Bamboo "Unable to publish artifact ... no files matched" in CI
Bamboo evaluated an artifact definition's location and file pattern after the job and matched zero files. Either the build did not produce the output, or the location/pattern does not point at where it landed.
What this error means
The job log warns "Unable to publish artifact ... no files matched the pattern" and the artifact is empty for downstream subscribers.
Unable to publish artifact 'app-jar':
No files matched the pattern 'target/*.jar' in the working directory.Common causes
The artifact location or pattern is wrong
The definition's location (base directory) plus pattern does not match where the build actually wrote the output, so nothing is collected.
The build did not produce the files
An earlier task failed or produced output under a different path, so there are no files for the pattern to match.
How to fix it
Align the artifact definition with the real output path
- Confirm where the build writes its output (list the working directory in a debug step).
- Set the artifact location to that base directory and the copy pattern to the produced files.
- Re-run so the artifact collects the files.
# Job > Artifacts > <definition>
# Location: target Copy pattern: *.jar (matches target/*.jar)Ensure the producing task succeeds first
Confirm the build task that creates the artifact ran and succeeded before the artifact step, otherwise there is nothing to publish.
How to prevent it
- Keep artifact location and pattern in sync with the build output path.
- Fail the build if a required artifact matches no files, so it is caught immediately.
- List the working directory in CI when adding a new artifact definition.