Documentation (1.2.0)

IvyDE can be considered as the merge of two tools:

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:

Eclipse Preference Page




    Preference fields:
  1. Ivyconf URL : specify here the path to your ivyconf file. Leave it blank to use ivy default resolvers
  2. 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.
  3. Organisation: your company name for ivy editor completion
  4. Organisation Url: your company web site url for ivy editor completion

Project Preference Page




    Preference fields:
  1. 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

Editor

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



The wizard contains only one page, and is very simple.


    Wizard fields:
  1. 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)
  2. File name: the ivy file name. (ivy.xml by default and its better to keep it in most of case)
  3. 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
  4. Module name: the component name.
  5. 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)
When the form is correctly filled you can press Finish button. Eclipse will automatically open the Ivy editor.

Ivy Editor

Xml Editor




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:

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)


Classpath Container

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:
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>]).

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 want
to use.
These properties can be accessed by contextual menu of the IvyDE class path container.



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.


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.





Use with maven poms

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/)



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)



- That's all : your project compiles !


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 !