build/classes [message #196113] |
Wed, 11 July 2007 17:34 |
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 18:57 |
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 20:36 |
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
|
|
|
Powered by
FUDForum. Page generated in 0.02010 seconds