Non-Java dependencies

+

Ivy is a generic dependency manager and can manipulate jars as well as any other kind of resources. IvyDE leverages this feature by bringing dependency management to non Java Eclipse projects.

In this document we will document how to work with IvyDE and non Java dependencies with a concrete exemple: we will manage the dependencies between some javascript files and bring them into a Java webapp.

Import the sample project into Eclipse

+
+The full project sample can be downloaded from there. Unzip it somewhere and import it into Eclipse (see "Existing Projects into Workspace" in the "Import" menu).

The Eclipse project is already configured with an IvyDE classpath container so we can run the Java webapp. We will just have to add the retrieve of the javascript files.

Configure the non-Java dependencies

+
+

Configure the Ivy nature

+
+In order to manage dependencies with Ivy, it is required for the Eclipse project to have the "Ivy" nature.

In the sample project, an Ivyde classpath container is already configured, so the Eclipse project already has the "Ivy" nature.

In case your project doesn't has it, right click on the project and in the menu "Configure" select "Add Ivy dependency management".

+
+

Add a retrieve setup

+
+Now that the project has the Ivy nature, a new entry should have appeared in the properties of your project. This is where non Java dependencies are managed.

+
+Now select "New..." to create a retrieve setup.

+
+

Name

+It gives a human readable name to the retrieve setup. This name will be used later in the context menu to actually launch a retreive of the dependencies.For the sample project, let's choose "javascripts".

Ivy file

+The ivy file which declares the dependencies to retrieve.For the sample project, we will use the same one has the one which is used for the Java dependencies (it is not required).

Retrieve pattern

+It defines where the dependencies should be retrieved.For the sample project we want them there: src/org/apache/ivyde/sample/webappjsrepo/js/[artifact]-[revision].[ext].

Delete old retrieved artifacts

+Before doing a retrieve, the location where the dependencies are dowloaded will be wiped out is this option is selected.

Configurations

+This is a comma separated list of configuration names which will be used for the resolve (* means All).For the sample project, we want it to be js.

Types

+This is a comma seperated list of type names which is be retrieved (* means All).For the sample project, we want them all: *.

Now in the "Settings" tab, the setup entries are the same as the global ones. Click on "Enable project specific settings" to customize for your setup.

+
+For the sample project, we want to use the ivysettings in the java project: ${workspace_loc:ivyde-sample-webapp-js-repo/ivysettings.xml}.

Finally, click OK to finish.

Launch a retrieve

+
+Now that the retrieve is setup, a new entry should be available in the "Ivy" context menu. The menu entry should be "Retrieve 'xxx'" where "xxx" is the name you gave to the retrieve setup. For the sample project, it will be "Retrieve 'javascripts'".

Select the entry to actually launch the retrieve. The Eclipse project get automatically refreshed with the retrieved files. For the sample project look into src/org/apache/ivyde/sample/webappjsrepo/js/jquery-1.7.1.min.js.

+
+

Launch the sample webapp

+
+To see the result, we'll launch the Java webapp and look it it your browser locally.

Right click the Java class org.apache.ivyde.sample.webappjsrepo.HTTPServer and select "Run As" / "Java Application".Now open the web page http://localhost:8888/index.htmlIf working properly, the javascript files should have been properly loaded and the input field should have automatically been filled with a default value.

Eclipse global preferences

+ Apache IvyDE maintains a global configuration, which controls the behaviour of every Ivy instance in every project in the workspace. This global configuration can be overrided in each project.

The global configuration can be found in the preferences of Eclipse (menu Window > Preferences for Windows and Linux users, Eclipse > Preferences for mac users), and select the item Ivy.

Global Ivy preferences

+
+

+
+

Offline

+

If checked, it will force Ivy to never check resources via any network and trust its cache

+

On Eclipse startup:

+

Specifies what Apache IvyDE should do in every project containing an IvyDE managed classpath container when Eclipse is starting up.

+

On Ivy file change:

+

Controls whether a resolve is performed each time Eclipse detects a change on an ivy.xml file configured by an IvyDE container via a save in the editor, a refresh, or a team/update.

+

Organisation:

+

Your company name for Ivy editor completion.

+

Organisation URL:

+

Your company web site url for Ivy editor completion.

+

Open a popup on each failed resolve

+

On a resolve error, IvyDE mark an error on the ivy.xml of the project; if checked it will also open a popup with a detailed error message

+
+

Advanced

+
+

+
+

Resolve before launch:

+

An IvyDE container can be used in the classpath of a launch configuration, and the container can be resolved on each launch. See the documentation about launch configurations for further information on this feature.

+
+

Use extended resolve id

+

A resolve id is an identifier which helps Ivy to make cache of results of resolve. By default IvyDE each the id which is composed of the organisation and the module name. An extended resolve id is also composed of the status, branch and revision. If you have troubles with the resolve of multiple versions of the same project within the same workspace, you should probably enable this option.

+
+

Classpath container

+
+

+
+

Resolve dependencies in workpace:

+

Apache IvyDE allows Ivy dependencies between projects in the workspace to be realized through project references rather than jars from the repository. See the documentation for further information on this feature.

+

Accepted types:

+

A comma separated list of extensions which will make IvyDE add the artifact to the classpath

+

Order of the classpath entries:

+

By default, the classpath container entries are ordered by order of declaration in the ivy.xml. When there are many entries, it can be useful to have them ordered lexically for enhanced readability.

+

Build the classpath with:

+

Either Ivy with build a classpath with references to the artifacts in its cache.

+

Or Ivy will retrieve the artifacts with the specified pattern, and then build a classpath with the retrieved jars.

Retrieve pattern: The pattern to use for the retrieve. Check Ivy documentation for pattern explanation.

+

Delete old retrieve artifacts: On each retrieve, the previously retrieved libraries will be removed (similar to the sync argument in the Ant task).

+

Types: The types of artifact to retrieve (a comma separated list)

+

+
+
+

Ivy settings

+
+

+
+

Reload the settings only on demand:

+

By default, Apache IvyDE will parse the ivy settings file each times it is needed (each resolve, refresh, clean cache or completion in the ivy editor). For remote ivysettings this can slow the UI dramatically, so it is possible to make IvyDE keep the settings in a cache and only reload them via the context menu on the container).

+

Ivy settings path:

+

The path to your ivy settings file. Leave it blank to use Ivy default resolvers. See also the documentation about Eclipse variables.

+

Property files:

+

This is a list of Java properties files to load before loading the ivysettings.xml. Specify in this files properties which you expect to use in the ivysettings.xml

+
+

Source/Javadoc mapping

+
+

+
+

Sources types:

+

A comma separated list of Ivy "type" names which should be considered sources.

+

Sources suffixes:

+

A comma separated list of suffixes which will make IvyDE attach as source the artifact with the suffix to the artifact without the suffix. For instance, "commons-lang-sources.jar" will be attached as source to "commons-lang.jar" with the default value.

+

Javadoc types:

+

same as sources types but for javadocs

+

Javadoc suffixes:

+

same as sources suffixes but for javadocs

+

Auto map jar artifacts with unique source artifact

+

If checked, in case there is only one artifact which is detected of type source, then IvyDE will consider this artifact the source of every jar of the module

Auto map jar artifacts with unique javadoc artifact

Workspace resolver

Closing trigger resolve:

Closing a project which has the workspace resolver enabled will trigger a resolve on every project that depends on it.

+

Opening trigger resolve:

+

When a project is opened, IvyDE will trigger the resolve of every other project which has the workspace resolver enabled.

+

Ignore version when resolving workspace projects:

+

This option forces the workspace resolver to ignore the version of a module specified in an ivy.xml if a project containing an Ivy file with that module organization and name is found in the workspace, instead substituting a project reference. This may have unintended consequences.

Release Annoucement

The Apache IvyDE Eclipse plugin integrates Apache Ivy's dependency management into Eclipse. It lets you manage your dependencies declared in an ivy.xml in your Java Eclipse projects, or any other kind of project which needs dependency management. Apache IvyDE will contribute to the classpath of your Java project or you can make it retrieve your dependencies directly into your project. Last but not least Apache IvyDE offer editors of ivy.xml and ivysettings.xml files with completion. Get some preview here: http://ant.apache.org/ivy/ivyde/screenshots.html

Major changes in this release:* a synchronous resolve job has been introduced to take into account projet's inter dependencies and avoid too many workspace build,*
resolved classpath can now be based on retrieved artifacts,* IvyDE retrieve feature can now be use on non Java projets

Compatibility:* this release is expected to work with every version of Ivy 2.1 or superior* as for this release and the next ones, IvyDE now expects to be installed in Eclipse 3.4 or superior.* the Eclipse updatesite has been upgrade and now only supports Eclipse 3.5 or superior. Eclipse 3.4 users can still install it manually.

This release is considered as beta since the important changes in IvyDE resolve feature. We encourage our early users to test it and report us any issue they found.

What is Apache IvyDE?

Apache IvyDE lets you manage your dependencies declared in an ivy.xml in your Java Eclipse projects, or any other kind of project which needs dependency management. Apache IvyDE will contribute to the classpath of your Java project or you can make it retrieve your dependencies directly into your project. Last but not least Apache IvyDE offer editors of ivy.xml and ivysettings.xml files with completion. Get some preview here: http://ant.apache.org/ivy/ivyde/screenshots.html.

Status of this release

+
+This release contains sevral major improvements along with some bug fixes. The majorimprovements are about the resolve scheduler and how retrieved artifact are handled.Thus this release is considered as a beta one.

Major Changes in this Release

+
+As for this release and the next ones, Apache IvyDE now expects to be installed in Eclipse 3.4 or superior.

Apache IvyDE has now a synchronous job to launch resolve of dependencies on the projets. SoIvyDE will be able to order the resolve of the projects in the correct order regardingtheir inter dependencies. And the immediate effect is that Eclipse get notified onlyone time of a classpath change, and thus triggerin only one wrokspace build.

Apache IvyDE is now capable of having a classpath based on retrieved artifact rather thanon the cached ones.

The existing retrieve configuration are now considered "standonale" ones, as theyare independant of the classpath container. They can even now be part of non Javaproject.

Committers and Contributors for this Release

+
+Here is the list of people who have contributed source code and documentationto this release. Many thanks to all of them, and also to the whole IvyDE communitycontributing ideas and feedback, and promoting the use of Apache IvyDE. The list would be toolong, but Apache IvyDE couldn't be what it is without you!
+

Resolve Visualizer

+

The resolve vizulizer show the graph of the dependencies of a project.

Open the view

+
+To open it, you should open the corresponding view: in the "Window" menu, open the "Show View" submenu and select "Other..."; the view "Ivy Resolve Visualizer" should be found in the "IvyDE" category.

+
+

Show a project dependencies

+
+Once the view is open, click on the button to select a container and see the result: