IvyDE can be considered as the merge of two tools:
- Ivy xml files Editor: creation wizard, html preview and completion for Ivy xml tag, attributes but also attributes' values.
- Class path container: Automatic downloads, access "resolve" task from your IDE
Content
Plugin installation
IvyDE has not yet been released within the Apache Software Foundation. For the moment you can use the old location of IvyDE for installation:- the update site : http://update.jayasoft.org/
- download the binaries and unzip it in your eclipse root folder
Eclipse Preference Page
![](images/pref.jpg)
- Preference fields:
- Ivyconf URL : specify here the path to your ivyconf file. Leave it blank to use ivy default resolvers
- Retrieve option : specify here if you want ivy to do a retrieve after the resolve.
If you check retrieve you must provide a the retrieve pattern. Check ivy documentation for pattern explanation.
- Organisation: your company name for ivy editor completion
- Organisation Url: your company web site url for ivy editor completion
Project Preference Page
![](images/project_pref.jpg)
- Preference fields:
- URL : specify here the path to your ivyconf file in scope of project. Leave it blank to use ivyconf file defined in eclipse properties (see eclipse properties) or use "default" to use ivy default resolvers
Edit your ivy files easily in eclipse with the IvyDE Plugin editor.
IvyDE brings creation wizard, html preview and completion for Ivy xml tag, attributes but also for attributes' values!
Choose an organisation and browse thru its projects and revisions.
Content
Wizard
IvyDE comes with a wizard that allows you to create an ivy.xml file for your project.To open the wizard choose File->New->Other in the Eclipse menu (Ctrl+N by default)
The Ivy wizard is accessible in the category Other. Select it then click Next
![](images/wizard1.jpg)
The wizard contains only one page, and is very simple.
![](images/wizard2.jpg)
- Wizard fields:
- Container: you have to select the targeted project. (This is already set if you access the wizard thanks right click menu on your project root folder)
- File name: the ivy file name. (ivy.xml by default and its better to keep it in most of case)
- Organisation: the component owner name. (your company name or the company that provides the component if you are writing ivy.xml file for 3rd party jars). Note this value can be set in the Ivy preference page
- Module name: the component name.
- Status: the status of the project. (integration by default since we have just created its ivy file :-). Please refer to Ivy documentation for more details)
Ivy Editor
Xml Editor
![](images/editor1.jpg)
The Ivy's eclipse editor provides xml syntax coloration, tag completion, tag's attribute names completion, and for dependency and configuration tag value completion.
Completion comes with contextual help. The completion popup is displayed when hitting simultaneously the CTRL and the SPACE keys.
Available completions:
- Xml structure: allows you quickly to insert the good tag at its right place. If the tag can have nested children both notations, simple tag and open tag, are proposed
- Tag attributes: when your cursor is placed in a tag bracket the completion show available attributes for the enclosing tag.
- Attributes values: when your cursor is placed in the quote of an attribute value the completion shows available values for the matching attribute.
- Available value completion
- info: organisation (pref based), module (eclipse project name),
- info/ivyauthor: name (pref based), url (pref based)
- info/description: homepage (pref based)
- info/license: name
- info/repository: name (the other attributes depend on it), url, ivys, pattern, artifacts
- configurations/conf: visibility, deprecated, extends
- publications/artifact: type, conf, ext
- dependencies/dependency: org, name, rev are resolved thanks to Ivy using the ivyconf set in the project Ivy preference page. If not set to "default" Ivy uses its defaults resolvers configuration (ie ivyrep + ibiblio), and if not set Ivy uses the ivyconf set in the Eclipse Ivy preference page. conf values are computed from current ivy.xml file and the dependency ivy.xml file if any.
Html rendering
Ivy editor is a multi tabs editor. Located on the bottom of the editor you will found a tab named preview that allows to view the ivy file as an html file.
Note : for now, as we let the browser do the XSLT processing on a remote file this feature only work with IE. Mozilla browser will display a blank page due its security policy. (If you know a workaround please put it on the mailing list)
![](images/preview.jpg)
You are fed up with updating the class path of all your projects each time you add or remove one dependency! IvyDE will help you ! Better ... it will work for you!
Indeed, IvyDE can manage for you all your dependencies, based on a dependencies descriptor file (like ivy.xml file) it will provide a class path container for your IDE.
![]() |
Obviously IvyDE class path container can be based on a ivy.xml file, but it also manages Maven pom.xml file! |
Content
Start with IvyDE
You've just installed the IvyDE plugin from our updatesite, and now you want to enjoy it quickly!Nothing easier, just follow these steps:
- Ensure the ivyconf URL is set in your project properties or eclipse preferences.
- Ensure the ivy.xml file or maven pom.xml can be accessed under the project folder of your eclipse "Navigator" view.
- Open the "Add Library" form of Eclipse (In package Explorer, in popup menu of your project choose : [Build Path]/[Add Libraries]).
- Select "IvyDE Managed Dependencies" item.
- Select an ivy.xml file or a maven pom.xml and the desired configurations.
Your class path is set and you can see all dependencies in one unique folder of the package explorer (folder name = <ivy file name>[<configuration>]).
![](images/cp_node.jpg)
IvyDE in project life
Configure Ivy file and configuration
During life of your project you can change the ivy.xml file or maven pom.xml and change the configuration you wantto use.
These properties can be accessed by contextual menu of the IvyDE class path container.
![](images/cp_configuration.jpg)
Resolve dependencies
You can explicitly ask for a dependencies resolution from your class path container.This command will invoke the "resolve" ivy task and update your class path container.
![](images/cp_resolve.jpg)
The Ivy Console
The Ivy console provide you all the Ivy working traces that you were used to see in your command console. This view will be really useful to understand what Ivy and IvyDE are performing for you.The Ivy Console can be accessed with your eclipse Console view, selecting the "Ivy Console" item.
![](images/ivy_console_selection.jpg)
![](images/ivy_console.jpg)
General
If you want to use a maven pom.xml instead of ivy.xml file, you just have to select a pom file in the configuration form of IvyDE class path.
When a maven pom is selected, the configurations list is updated with all maven scopes.
Both examples below are a good illustration of maven pom use simplicity :
Maven1 Sample
This sample presents a simple use case of maven pom for IvyDE class path container. We are going to create an eclipse project on commons-httpclient sources.
- Download the commons httpclient sources
- Unzip this file (c:/tmp/commons-httpclient/)
- Create a new Eclipse java project based on the unzipped sources (c:/tmp/commons-httpclient/)
![](images/httpProject_errors.jpg)
Notes: your project do not compile: some imports cannot be resolved.
- Add a new class path container based on the "project.xml" pom and select "default" configuration (maven scope)
![](images/httpProject_pom.jpg)
- That's all : your project compiles !
![](images/httpProject_clean.jpg)
Maven2 Sample
This sample shows that IvyDE Class path container on a Maven2 pom can handle transitive dependancies.
- Create a new empty java project in eclipse.
- In your Ivy project configuration, set the ivy conf file below (Project/Properties/Ivy):
<ivyconf>
<conf defaultResolver="ibiblio-maven2"/>
<resolvers>
<ibiblio name="ibiblio-maven2" m2compatible="true" />
</resolvers>
</ivyconf>
Using the m2compatible attribute, you can benefit from Maven2 repository compatibility.
- Add the pom below in your project and select it for an IvyDE class path container choosing "compile" and "runtime" configurations.
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>myproject</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.0</version>
</dependency>
</dependencies>
</project>
- That's all ! Your IvyDE class path container gets all dependencies even those that were transitive to the commons-httpclient module !