Main Tutorials

How to debug Ant Ivy project in Eclipse IDE

In this tutorial, we will show you how to debug an Ant-Ivy web project in Eclipse IDE.

Technologies used :

  1. Eclipse 4.2
  2. Eclipse Tomcat Plugin
  3. Ant 1.9.4
  4. Apache IvyDE
  5. Spring 4.1.3.RELEASE
Note
Previous Ant Spring MVC web project will be reused.

1. Install Apache IvyDE

Install Apache IvyDE, it integrates Ivy into Eclipse IDE. Restart Eclipse to finish the installation.

ivy-site

2. Add Ivy support to Project

Imports previous Ant Spring MVC project into Eclipse IDE as Java project (we will convert it later).

Note
There are some error icons on Java source, ignore it, the error will be gone after integrated with Ivy dependency management.

2.1 Right clicks on the project folder, select “configuration -> Add Ivy Dependency Management”

Debug-ant-Ivy-in-eclipse-1

2.2 Right clicks on either ivy.xml or build.xml, choose “Add Ivy Library…”, a Ivy dialog box will be prompted, clicks on the finish button to accept the default settings.

Debug-ant-Ivy-in-eclipse-2

2.3 Right clicks on the project folder again, Select “Ivy”, many options are available now.

Debug-ant-Ivy-in-eclipse-3

3. Convert to Eclipse Web Project

To convert the imported Java project to web project (WTP) in Eclipse :

3.1 Right clicks on the project, select “properties -> Project Facets” :

Check Java, select 1.7, check Dynamic Web Module, select 2.5, clicks on the “Further configuration available”, clicks “next” to accept the default for Java application,

Debug-ant-Ivy-in-eclipse-4

Update “Content directory” to war folder (The folder which contains the WEB-INF folder), unchecked the generate web.xml option.

Debug-ant-Ivy-in-eclipse-5

3.2 On project properties, select “Deployment Assembly”, clicks on the “Add…” button. Select “Java Build Path Entries -> Ivy”.

Debug-ant-Ivy-in-eclipse-6

Make sure the folders are corrected, and Ivy libraries are added.

Debug-ant-Ivy-in-eclipse-7

4. Debug It

Above project is integrated with Eclipse, just debug the project as usual. In Server view, just create a Tomcat server and attaches the web project.

Debug-ant-Ivy-in-eclipse-8

Done.

References

  1. IvyDE official website
  2. Ant Spring MVC web project

About Author

author image
Founder of Mkyong.com, love Java and open source stuff. Follow him on Twitter. If you like my tutorials, consider make a donation to these charities.

Comments

Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments