James Carr | Rants and Musings of an Agile Developer

Archive for March 2011

At my day job I’m helping initiate a major push to migrate our old complicated ant + ivy (with flat file repo) build to using gradle with artifacts resolved against artifactory. As part of that I thought it’d be a good idea to store scripts and plugins for our build in artifactory to make it easier to include them. For example, a project that deploys as a war to weblogic might look like this:

Which would inherit the tasks and configurations needed to build a war out and deploy it on weblogic. Unfortunately gradle (as of this writing) doesn’t have a way to push non-build artifacts to a maven style repository so it looks like it’d have to be a DIY solution. Luckily using Artifactory’s REST API this task was actually quite easy:

This simply issues a PUT with the file I want to place in the repo. Now if I want to publish changes to our build scripts to be used across the organization all I need to do is run gradle push and they’re published and ready. They could probably be versioned but at the moment I am still debating the value of versioning the build scripts. :)

No tags

Theme Design by devolux.nh2.me