With Ivy version 9.2 we introduced a great new feature that automatically packs your Maven dependencies into Ivy archives, either with the Axon Ivy Designer or the project-build-plugin (from version 9.2.1 on). You just need to convert your Ivy project into an Eclipse Maven project.
Why is this such great news?
First, you don’t need to worry about any binaries in your Ivy projects anymore if you want to add a specific library to your Ivy project. You just add Maven dependencies. With these dependencies, Maven will automatically download and install the right libraries in the specified version for you and add them to your project’s build path.
Before 9.2, if you wanted to add a specific library to your project you either did manually by downloading the .jar file, copying it into a local project
/lib folder and adding it to the project’s classpath; or you used the maven-dependency-plugin’s copy or copy-dependency target as described on our old Q&A Website (see here). The especially annoying thing with the maven-dependency-plugin is that you need to do a Maven run first (
mvn clean generate-resources) to download, install the libraries and then manually adding them to your build path. So, the first time you check out your already existing project from your VCS you get an error in the Designer (which confuses me every time I open a project like that!).
Second, you don’t need to check-in any libraries in your VCS anymore like you had to do when copying them manually. One of the things I really dislike doing is checking-in .jar files into my Git repository! By defining my libraries as Maven dependencies, I don’t have to do that anymore; downloading, adding it to the project’s build path and packaging into Ivy archives is all done automatically.
Now, with coming Ivy version 9.3 we are going one step forward and are creating all new projects as Maven project by default and push you to convert your old projects into Maven projects. If you import your old projects into a new 9.3 Designer, you will see an error message that your project is in a wrong version and needs to be converted. During this conversion, besides other things, the Designer will convert your projects into Maven projects. And it will check your .classpath and pom.xml configuration files for manual entries and the maven-dependency plugin, printing out errors if there are any entries.
The conversion log window in your Designer might look like this:
If you have library entries in your Ivy project and would like to remove and replace them with Maven dependencies, follow the great description in our Migration Notes on how to do that.
If you don’t want to convert your project yet or you can’t (if a library is not available as a Maven dependency), don’t worry, you don’t have to do it, the old way is still working.
To add more libraries to your Ivy Maven projects, just right-click on your project’s Deployment file, choose
Open With -> Maven POM Editor, go to the Dependencies tab and click button
Hope that helps!