I was trying to wget one of Jenkins Artifacts, but was continuously getting a 404 error.
HTTP request sent, awaiting response... 404 Not Found 2017-05-19 13:12:13 ERROR 404: Not Found.
My request was as follows.
wget https://wso2.org/jenkins/job/ballerinalang/job/tools-distribution/257/org.ballerinalang.tools$ballerina-tools/artifact/org.ballerinalang.tools/ballerina-tools/0.87-SNAPSHOT/ballerina-tools-0.87-SNAPSHOT.zip
So my issue was, My URL had some special charactors. (tools$ballerina-tools) A $ character. So Bash droped this when fetching the artefact, So Jenkins was unable to find the actual resource. To solve this type of issue you can use a scape charater to skip the special character.
\$
Full Request is as Follows.
wget https://wso2.org/jenkins/job/ballerinalang/job/tools-distribution/257/org.ballerinalang.tools\$ballerina-tools/artifact/org.ballerinalang.tools/ballerina-tools/0.87-SNAPSHOT/ballerina-tools-0.87-SNAPSHOT.zip
This is one of million ways to get an 404 error, Just mentioning to help someone to save couple of hours. :)


