Select Page
Using AnthillPro like Ivy / Maven with a dependencies.xml file to define and fetch build-time dependencies

Who needs the complexity of a Nexus repository, or Ivy when you are already using AnthillPro and it provides a better, less complex and more polished solution for dependency management. AnthillPro already provides the ability for you to define your dependencies in the UI, but most people that are familiar with AnthillPro and have been working with it for years do not know that you can manage all your build-time dependencies through a dependencies.xml file that you keep in your code repository. As a software engineer, this is the ideal solution because it allows me to control my dependencies in a simple xml file and I do not need administrative access to AnthillPro so that I can manage my dependencies via the user interface.

How does it work ?

First, you will need to go into your originating workflow configuration as an admin and check off “Trigger Only Dependencies”


Then, you will need to create your xml file and define your dependencies. Anthill projects and Codestation projects are both supported. For those that are not familiar with these 2 concepts, an Anthill project is used for something you “make” where a codestation project is used for something you “store”. Think of this as your project that you’re building as an Anthill project, and the libraries you are using for your project which you download from different places on the internet as codestation projects.

An example xml file would look like this:



Setup this file as you like, and commit it to the base path of your project in your repository.

Then, in your build job, add a shell command after you checkout your code that does:

codestation -file dependencies.xml -buildlife ${bsh:BuildLifeLookup.getCurrent().getId()} resolve

That will create your dependency associations to your buildlife, you can see them in the dependencies tab of the buildlife. Now, when your build runs the step: “Get Dependency Artifacts” the actual files will be fetched into the folder(s) that you’ve defined in your xml.

Related Reads