I have a simple Jenkins build that pulls down my project from github, builds it and reports the status of the build.
I want to have configure Jenkins to publish the resulting JAR file to a TARGET-SNAPSHOTS branch in my project.
Currently my project .gitignore’s /target/*
I was looking at GitPublisher but this appears to push the entire build out, rather than just the jar file.
Thoughts on the best way to do this/if this is possible?
Thanks
Since you’re using maven and you said the github downloads section is acceptable, you can use the github downloads plugin – https://github.com/github/maven-plugins. I use this for deploying the Riak java client to our downloads section as part of the build.
In your ~/.m2/settings.xml you need:
Then in your project’s
.pomsomething like:(I’m doing it as part of the install phase – you can do however you’d like)
Then simply add
-Dgithub.downloads=trueto your maven build –mvn install -Dgithub.downloads=trueThe web page for the plugin lists all the options for including/excluding files, etc.