Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Using a batch file and wget/curl, how can I download the Multiverse-Core-.jar from here?

I want to use the timestamping option and the "All files in zip" link doesn't work since the "last-modified" header doesn't exist for it. If I use, then the timestamping option works, but I want to be able to use the first link and not have to change it every time the version number changes. I've tried

wget -r -l 1 -nH -A jar -R *javadoc.jar,*sources.jar

But it just creates "job\Multiverse-Core\lastStableBuild\artifact\target" in the current directory without the files. Is there something wrong with my script?

share|improve this question
up vote 2 down vote accepted

wget respects the robots.txt file for recursive downloads. And that file prohibits everything (for no good reason AFAICT, as Build Now requires to be POSTed in Jenkins, at least in recent versions).

Jenkins has an API. Several objects, including builds, have API endpoints. In this case,

You could query or and parse the returned text for the artifacts element. The tree argument allows filtering, like e.g. in


Alternatively, use XPath for more powerful filtering, but note that in a recent security update, some functionality (like text()) was disabled. Example:

From the command line, you can parse the XML e.g. using a recent version of xmllint, or, in the Xpath example, just ignore the text and select the file names.

share|improve this answer
Could you perhaps show me how I use this to get curl/wget to download just the Multiverse-Core.jar in a batch script? I'm using Windows 7 if that matters. – Craft1n3ss Apr 25 '13 at 7:32
@Craft1n3ss I don't know enough batch. – Daniel Beck Apr 25 '13 at 7:34
Thanks for the information anyway. I can probably do it myself if I search around or ask another question. I'd give you an upvote, but I don't have enough reputation (this was my first question). – Craft1n3ss Apr 25 '13 at 7:45
Got it! using FOR /F "tokens=14 delims=<>" %%a IN ('curl -g "‌​ifacts[fileName]"') DO ECHO %%a will echo the exact name of the file I want. Thanks for the help. – Craft1n3ss Apr 26 '13 at 23:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.