Use with maven poms
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.
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 project, create an ivysettings.xml file:
<ivysettings>Using the m2compatible attribute, you can benefit from Maven2 repository compatibility.
<conf defaultResolver="ibiblio"/>
<resolvers>
<ibiblio name="ibiblio" />
</resolvers>
</ivysettings>
- In your project, create a pom.xml file:
<project>- On the pom.xml file, open the context menu and click on "Add Ivy Library...":
<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>
- Select "Enable project specific settings" and set the "Ivy setting path" to: project:///ivysettings.xml
- Select the configuration compile and runtime
Printer Friendly