Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

eclipse and Ant (fundamental question)

 
ben oliver
Ranch Hand
Posts: 375
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic