khaleel. Powered by Blogger.

how-to-integrate-ant-tool-with-eclipse?

Thursday 2 June 2011

ANT Eclipse IDE(latest edition of Eclipse IDE is Galileo) integration is a very simple process as summarized in following steps:


1. As a first step, create a Java Project in Eclipse IDE.


2. Associate a build.xml with this project and ensure you put this XML at the same location as shown in package structure in Eclipse IDE :



The code of build.xml is as given below:



<?xml version="1.0" ?> 
<project name="IQJava" default="execute">

 <target name="init" depends="clean">
  <mkdir dir="build/classes" />
 </target>

 <target name="compile" depends="init">
  <javac srcdir="src" destdir="build/classes" />
 </target>
 
 <target name="execute" depends="compile">
  <java classname="com.iqjava.ant.AntExample" 
              classpath="build/classes" />
 </target>

 <target name="clean">
  <delete dir="build" />
 </target>
 
</project>



3. Run this build XML

0 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...
Promote Your Blog

About This Blog

This blog is for java lovers

Total Pageviews

About Me

khaleel-bapatla
BAPATLA, ap, India
simple and honest
View my complete profile

  © Blogger template On The Road by Ourblogtemplates.com 2009

Back to TOP