Issue Summary
Post upgrading Bamboo to 9.6.11, the artifact transfer fails with below exception when Artifacts are located outside of the Working directory and Package threshold is enabled which will zip the large numbers of files
error 06-May-2025 16:47:38 com.atlassian.bamboo.build.artifact.BambooRemoteArtifactHandler: File /var/atlassian/application-data/bamboo-agent/classpath/FastInfoset-1.2.15.jar not contained within the working directory /var/atlassian/application-data/bamboo-agent/xml-data/build-dir/BAM-BOO-JOB1 error 06-May-2025 16:47:38 Unable to publish artifact [art]: Unable to publish artifact Required job artifact Http Compression On : [art], patterns: [**/*] anchored at: [/var/atlassian/application-data/bamboo-agent/classpath] for BAM-BOO-JOB1-12 via com.atlassian.bamboo.build.artifact.BambooRemoteArtifactHandler@34a56c00
Steps to Reproduce
1) Define the artifact as below, In the location mention it as /var/atlassian/application-data/bamboo-agent/classpath, this is outside the build working directory.
2) Disable the Bamboo server artifact handler Package threshold

3) Run the build and it will complete successfully.
4) Now enable the Package threshold as below

Expected Results
The artifacts should be transferred even after the Package threshold is enabled.
Actual Results
The Artifact transfer fails with below exception
error 06-May-2025 16:47:38 com.atlassian.bamboo.build.artifact.BambooRemoteArtifactHandler: File /var/atlassian/application-data/bamboo-agent/classpath/FastInfoset-1.2.15.jar not contained within the working directory /var/atlassian/application-data/bamboo-agent/xml-data/build-dir/BAM-BOO-JOB1 error 06-May-2025 16:47:38 Unable to publish artifact [art]: Unable to publish artifact Required job artifact Http Compression On : [art], patterns: [**/*] anchored at: [/var/atlassian/application-data/bamboo-agent/classpath] for BAM-BOO-JOB1-12 via com.atlassian.bamboo.build.artifact.BambooRemoteArtifactHandler@34a56c00
Workaround
1. Disable the Package threshold
This might have another negative effect where the Artifacts might consume more storage and transfer might be slow, as the artifacts won't be zipped.
2. Move all the Artifacts under the working directory of the build