I'm trying to copy artifacts after the Bamboo build finishes. I have set it to copy from the maven target to get site report. Like so to get all the directories and files from the target dir.
/target/
*.*
When I look at the artifacts after the build run, I only have one directory and the .war file that was created during the build. I'm puzzled why I'm not getting the /site dir and the others /cobertura etc,
I take it that you are using Bamboo's Artifact definitions as outlined in Configuring a job's build artifacts, i.e. according to the image below your artifact's Location is
/target/
and its Copy pattern is*.*
?In case, please note that the Copy pattern isn't a common DOS/UNIX wildcard one, rather an Ant file copy pattern:
This specifically allows to create patterns for the selective inclusion and exclusion of files from an entire directory hierarchy rather than just from the top level one (which might include entire directories of course). The latter is apparently what you actually intended by applying the DOS/UNIX wildcard
*.*
, but as an Ant pattern this just matches all files within the top level directory:Furthermore, you can use the special pattern
**
to match multiple directory levels:Long story short, in order to include all files and directories within Location
target
as specified you simply need to use**/*
.