Lab: Working with Ivy

Steven J Zeil

Last modified: Apr 10, 2014

Contents:
1. Install IvyDE
2. Using Ivy

This is a self-assessment activity to give you practice in working with the Ivy configuration manager. Feel free to share your problems, experiences, and choices in the Forum.

1. Install IvyDE

IvyDE is the Ivy plugin for Eclipse. Install it in your Eclipse environment, following the instructions here.

2. Using Ivy

  1. If you already have a copy of the codeCompCommon project in your Eclipse workspace, open that up. If not, download it from the course GitLab.

  2. Examine the ivy.xml and ivysettings.xml files. Try to figure out what these do.

  3. Right-click on your codeCompCommon project and select Build Path Configure Build Path. On the Libraries tab, remove all libraries except the Java system library. Click OK.

    You should see several read error markers appear on the project (if they weren’t there already).

  4. Return to the Configure Build Path dialog. Now chose Add Library... and choose IvyDE Managed Dependencies. On the Main and Settings tabs, select the ivy.xml and ivysettings.xml files for your project. (You may need to “Enable project specific settngs”.)

    For ivysettings.xml, take note of the different options for how to specify the file location. Which of these is likely to result in more portable Eclipse project settings?

  5. When you OK these changes to the build path, Eclipse should commence to resolve your Ivy requests, fetching the required libraries and adding them to its internal build path. The red error marks should eventually fade.

    If this does not happen automatically, right-click on the project, find the Ivy menu, and request a resolve.

  6. Open the build.xml file and examine the Ivy-related tasks and targets. Run the build. Take note of the Ivy-related messages in the console pane.

  7. Edit the ivy.xml file to request a newer version (4.11) of JUnit. Run the ant build again. Examine the messages in the console window. Did the new version load?