Unable to download artifact Shared artifact: [myhello], pattern: [myhello.war]

My deployment project always fails due to artifact factor.

1. Build plan runs successfully but I find "Unable to publish artifact" in the build logs. Below is the log details:

Logs
The following logs have been generated by the jobs in this plan.
Expand all Collapse all Job Logs
Default Job Default Stage Download or View
01-一月-1970 08:00:00 [INFO] Surefire report directory: D:\Program Files\Bamboo-home\xml-data\build-dir\HEL-HEL-JOB1\target\surefire-reports
01-一月-1970 08:00:00
01-一月-1970 08:00:00 -------------------------------------------------------
01-一月-1970 08:00:00 T E S T S
01-一月-1970 08:00:00 -------------------------------------------------------
01-一月-1970 08:00:00 Running shijinet.test.TestCase1
01-一月-1970 08:00:00 Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.261 sec
01-一月-1970 08:00:00 Running shijinet.test.TestCase2
01-一月-1970 08:00:00 Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.01 sec
01-一月-1970 08:00:00
01-一月-1970 08:00:00 Results :
01-一月-1970 08:00:00
01-一月-1970 08:00:00 Tests run: 5, Failures: 0, Errors: 0, Skipped: 0
01-一月-1970 08:00:00
01-一月-1970 08:00:00 [INFO]
01-一月-1970 08:00:00 [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ test ---
01-一月-1970 08:00:00 [INFO] Building jar: D:\Program Files\Bamboo-home\xml-data\build-dir\HEL-HEL-JOB1\target\png-test.jar
01-一月-1970 08:00:00 [INFO] ------------------------------------------------------------------------
01-一月-1970 08:00:00 [INFO] BUILD SUCCESS
01-一月-1970 08:00:00 [INFO] ------------------------------------------------------------------------
01-一月-1970 08:00:00 [INFO] Total time: 10.567 s
01-一月-1970 08:00:00 [INFO] Finished at: 2016-11-23T17:23:13+08:00
01-一月-1970 08:00:00 [INFO] Final Memory: 32M/331M
01-一月-1970 08:00:00 [INFO] ------------------------------------------------------------------------
01-一月-1970 08:00:00 Unable to publish artifact [myhello war]:

 

2. The deployment project fails and below is the log details:

Failed: Deployment of release-4 to PNG_latest_jar
Details
Releaserelease-4
master
TriggerManual run by chenyjCompleted23 Nov 2016 04:22 PMDuration< 1 secondOn agentDefault AgentStatusFAILED
The deployment generated 28 lines of output. Download or View full deployment log
01-一月-1970 08:00:00 Build Deployment of 'release-4' on 'PNG_latest_jar' started building on agent Default Agent
01-一月-1970 08:00:00
01-一月-1970 08:00:00 Build working directory is D:\Program Files\Bamboo-home\xml-data\build-dir\1671169-1802241
01-一月-1970 08:00:00 Executing build Deployment of 'release-4' on 'PNG_latest_jar'
01-一月-1970 08:00:00 Starting task 'Clean working directory task' of type 'com.atlassian.bamboo.plugins.bamboo-artifact-downloader-plugin:cleanWorkingDirectoryTask'
01-一月-1970 08:00:00 Cleaning working directory 'D:\Program Files\Bamboo-home\xml-data\build-dir\1671169-1802241'
01-一月-1970 08:00:00 Finished task 'Clean working directory task' with result: Success
01-一月-1970 08:00:00 Starting task 'Download release contents' of type 'com.atlassian.bamboo.plugins.bamboo-artifact-downloader-plugin:artifactdownloadertask'
01-一月-1970 08:00:00 Preparing to download plan result HEL-HEL-22 artifact: Shared artifact: [myhello], pattern: [myhello.war]
01-一月-1970 08:00:00 Unable to download artifact Shared artifact: [myhello], pattern: [myhello.war]
01-一月-1970 08:00:00 Task configuration:
01-一月-1970 08:00:00 artifactId_0 -> [-1]
01-一月-1970 08:00:00 sourcePlanKey -> [HEL-HEL]
01-一月-1970 08:00:00 localPath_0 -> []
01-一月-1970 08:00:00 Task runtime configuration:
01-一月-1970 08:00:00 securityToken -> [a79301fe7ddfb154658fab4060c8da506b1c6954]
01-一月-1970 08:00:00 runtimeArtifactIds_0 -> [0]
01-一月-1970 08:00:00 artifactName_0 -> [myhello]
01-一月-1970 08:00:00 artifactId_0 -> [1736705]
01-一月-1970 08:00:00 resultKey -> [HEL-HEL-22]
01-一月-1970 08:00:00 artifactLocation_0 -> []
01-一月-1970 08:00:00 localPath_0 -> []
01-一月-1970 08:00:00 artifactPattern_0 -> [myhello.war]
01-一月-1970 08:00:00 Finished task 'Download release contents' with result: Error
01-一月-1970 08:00:00 Finalising the build...
01-一月-1970 08:00:00 Stopping timer.
01-一月-1970 08:00:00 Build 1671169-1802241-2064396 completed.
01-一月-1970 08:00:00 Finished processing deployment result Deployment of 'release-4' on 'PNG_latest_jar'

2 answers

0 vote

Hello Simon,

It seems the artifact was not published:

01-一月-1970 08:00:00 Unable to publish artifact [myhello war]:

Due to that, the artifact could not be downloaded:

01-一月-1970 08:00:00 Preparing to download plan result HEL-HEL-22 artifact: Shared artifact: [myhello], pattern: [myhello.war]
01-一月-1970 08:00:00 Unable to download artifact Shared artifact: [myhello], pattern: [myhello.war]

Kind regards,
Rafael P. Sperafico

Yes, its the reason why the deployment step fails. thanks.

Moreover, I want to know how to generate war with maven 3.x task in Bamboo. Could you pls tell me how to ? 

0 vote

Please check that your artifact is present in working directory. According to provided logs your build generates jar file

01-一月-1970 08:00:00 [INFO] Building jar: D:\Program Files\Bamboo-home\xml-data\build-dir\HEL-HEL-JOB1\target\png-test.jar

But you artifact copy pattern is myhello.war

Yes, I change the artifact setting and now I have artifacts created.

One more thing, I'm using Maven 3.x for compiling and packaging source codes. How to get war file with Maven task? thanks

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Renan Battaglin
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,341 views 0 5
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you