aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes eclipse and Ant (fundamental question) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "eclipse and Ant (fundamental question)" Watch "eclipse and Ant (fundamental question)" New topic
Author

eclipse and Ant (fundamental question)

ben oliver
Ranch Hand

Joined: Mar 28, 2006
Posts: 375
I am new to eclipse IDE. Suppose I want to write a j2ee application, I have some ejb, servlet and jsp and web.xml, etc. and I want to create a .EAR file with standard struture. First I need to create a "Project" in IDE, then I put those code in some "src" folder, now here are my questions ---

1. I need some .jar files to compile the package, should I include these .jar in IDE's classpath, or should I write a separate build.xml to include them and run this build.xml like "ANT" ?

2. Can I do some mapping to "transfer" the generated .class files into certain location that the application server can get ? or does this have to be done by using ANT ?

3. Eclipse doesn't automatically give users a build.xml, right ? This file has to be created by user, is that right ?
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by ben oliver:
1. I need some .jar files to compile the package, should I include these .jar in IDE's classpath, or should I write a separate build.xml to include them and run this build.xml like "ANT" ?


None of the above. You should add them to your project's build path (in the project properties). This should be explained in Eclipse's online help.


2. Can I do some mapping to "transfer" the generated .class files into certain location that the application server can get ? or does this have to be done by using ANT ?


There are plugins that configure application servers to directly work on the class files generated by Eclipse. What server are you using?


3. Eclipse doesn't automatically give users a build.xml, right ? This file has to be created by user, is that right ?


If you need one, you need to write it manually. But if you don't need to build the project outside of Eclipse, you don't need a build.xml.


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
 
jQuery in Action, 2nd edition
 
subject: eclipse and Ant (fundamental question)