Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » build/classes
build/classes [message #196113] Wed, 11 July 2007 13:34 Go to next message
Eclipse User
Originally posted by: frank.nospam.cc

Why is the default output path for class filess build/classes and not
WebContent/WEB-INF/classes?
What are the benefits of doing so?
What are the disadvantages of switching the output to WEB-INF/classes?
Re: build/classes [message #196153 is a reply to message #196113] Wed, 11 July 2007 14:57 Go to previous messageGo to next message
Eclipse User
Originally posted by: kosta.bea.com

Frank wrote:
> Why is the default output path for class filess build/classes and not
> WebContent/WEB-INF/classes?
> What are the benefits of doing so?
> What are the disadvantages of switching the output to WEB-INF/classes?

This structure keeps source and generated files separate, which is handy
when you need to add the project to a source control system or otherwise
share it (you know to share everything except for the build directory).
It also allows you to have binary classes part of your application
source (you put those in WebContent/WEB-INF/classes directory and they
get added to your classpath) without getting those classes confused with
the classes generated from the source files in your project.

- Konstantin
Re: build/classes [message #196199 is a reply to message #196153] Wed, 11 July 2007 16:36 Go to previous message
Eclipse User
Originally posted by: frank.nospam.cc

Konstantin Komissarchik schrieb:
> Frank wrote:
>> Why is the default output path for class filess build/classes and not
>> WebContent/WEB-INF/classes?
>> What are the benefits of doing so?
>> What are the disadvantages of switching the output to WEB-INF/classes?
>
> This structure keeps source and generated files separate, which is handy
> when you need to add the project to a source control system or otherwise
> share it (you know to share everything except for the build directory).
> It also allows you to have binary classes part of your application
> source (you put those in WebContent/WEB-INF/classes directory and they
> get added to your classpath) without getting those classes confused with
> the classes generated from the source files in your project.
>
> - Konstantin

thanks for your answer!
If there is no other reason, I'll overwrite the default settings and
generate the class files directly into WEB-INF/classes, because:
(a) putting a .cvsignore file to output or to WEB-INF seems to me the same
(b) I like to use the WebContent folder as webapp folder for tomcat (no
copying to a special webapps directory), so I have to create WEB-INF
classes manually (or by ant) and to remove it before synchronizing with cvs.
(c) the "natural" place for additional classes is (in my opinion) in
WEB-INF/lib as jar

frank
Previous Topic:WTP JSF Tools Tutorial
Next Topic:Publish causes runtime files to be deleted
Goto Forum:
  


Current Time: Wed Apr 16 18:52:16 EDT 2014

Powered by FUDForum. Page generated in 0.01659 seconds