Proper project structure for output path?

My project is like this:

- \App_Project_Folder
-


\src
-


com.etc.etc
-


\jsp
-


all web files

I have App_project_Folder as the root of my "content", and then in source folders, I have jsp and src. My output path points to App_Project_Folder\src, because all my .java files are under src, and I want to compile to my sources.

Why does Aurora now copy everything in my JSP directory into my src directory when I compile? This isn't making sense to me.

10 comments
Comment actions Permalink

Ian Zabel wrote:

My project is like this:

- \App_Project_Folder
---- \src
-------- com.etc.etc
---- \jsp
-------- all web files

I have App_project_Folder as the root of my "content", and then in source folders, I have jsp and src. My output path points to App_Project_Folder\src, because all my .java files are under src, and I want to compile to my sources.

Why does Aurora now copy everything in my JSP directory into my src directory when I compile? This isn't making sense to me.

Not sure what you mean, it works for me.

My structure is as follows

Project
src (your source dir for your java files)
webapp
index.jsp (or what ever)
images
WEB-INF
jsps
more.jsp
lib
classes
(this is your output folder. Idea will compile and copy
everything in your src dir in here. So if you have xml and
dtds and such they'll end up in here.)
(also contains Struts xml file etc...)
tlds (for tag libs)
web.xml

When you setup the web app point to the webapp directory as the root of
the webapp.

You should be good to go.

R

0
Comment actions Permalink

Hm, so this is different behavior than 3.0.5, right? It never did this before.

I can see how this would be good, because previously, only our ant builds would properly copy over all of our .properties files for our I18N. This would make that process easier in development.

Is there a way to disable this? It becomes a pain having completely different project structures for the same source tree so that I can switch back and forth between 3.0.5 and Aurora.

0
Comment actions Permalink

Ian Zabel wrote:

Is there a way to disable this? It becomes a pain having completely different project structures for the same source tree so that I can switch back and forth between 3.0.5 and Aurora.


My recommendation would be not to compile into your source path and
compile into a separate classes directory (at same level as src).

Ciao,
Gordon

--
Gordon Tyler (Software Developer)
Quest Software <http://java.quest.com/>
260 King Street East, Toronto, Ontario M5A 4L5, Canada
Voice: 416-643-4846 | Fax: 416-594-1919

0
Comment actions Permalink

Is there a way to disable this?


Uncheck Project Properties->Compiler->Clear output directory on rebuild.

Hm, so this is different behavior than 3.0.5, right? It never did this

before.

In ariadna the checkbox was called synchronize output directory and both
ariadna and aurora behave mostly in the same way.


0
Comment actions Permalink

Gordon Tyler wrote:

Ian Zabel wrote:

>> Is there a way to disable this? It becomes a pain having completely
>> different project structures for the same source tree so that I can
>> switch back and forth between 3.0.5 and Aurora.


My recommendation would be not to compile into your source path and
compile into a separate classes directory (at same level as src).

Ciao,
Gordon

Gordon in a webapp if you put the classes in your src, the app server
won't find the classes, the proper structure for any web app is as I
described it in my previous email. The container will look in classes
and lib under WEB-INF for classes and jar files. You CAN however put
all your source files under the classes/[packages and sources here]
directory and it should compile them as it goes along, but that's just
nasty imho.

Ian, I've always done this in 3.0.5, I've never really done it any other
way, it seems to be the cleanest and most consistent way of working with
web-apps.

Perhaps JetBrains has a different view of it.
R

0
Comment actions Permalink

Carlos Costa e Silva wrote:

>>Is there a way to disable this?


Uncheck Project Properties->Compiler->Clear output directory on rebuild.


Carlos, you don't always want to do that, if your output is the classes
directory under WEB-INF (for a webapp), you might have put some files
there manually, like struts-config.xml or repository.xml from OJB and it
will blow these away, unless you put them as part of your src directory
at the root, which would be OK, but you have to remember to do that or
lose your settings!

R

0
Comment actions Permalink

Uncheck Project Properties->Compiler->Clear output directory on rebuild.

>

Carlos, you don't always want to do that, if your output is the classes
directory under WEB-INF (for a webapp), you might have put some files
there manually, like struts-config.xml or repository.xml from OJB and it
will blow these away,


Do you mean that with the "Clear output directory on rebuild" unchecked idea
removes files from the output path? I was under the impression that with
this box unchecked things in the output path stayed there, but I may be
wrong (I always work with this checked and different source/output dirs, so
I'm not sure now).


0
Comment actions Permalink

Carlos Costa e Silva wrote:

>>>Uncheck Project Properties->Compiler->Clear output directory on rebuild.
>>
>>Carlos, you don't always want to do that, if your output is the classes
>>directory under WEB-INF (for a webapp), you might have put some files
>>there manually, like struts-config.xml or repository.xml from OJB and it
>>will blow these away,


Do you mean that with the "Clear output directory on rebuild" unchecked idea
removes files from the output path? I was under the impression that with
this box unchecked things in the output path stayed there, but I may be
wrong (I always work with this checked and different source/output dirs, so
I'm not sure now).


No you're right, I misread, it's the whole double negative thing :)

R

0
Comment actions Permalink

Why does Aurora now copy everything in my JSP directory into my src directory when I compile? This isn't making sense to me.


Because there are some files under the "jsp" directory that are considered as resource files. All resource files that are located
under the directories that are marked as "source" are copied to the output directory (which is the same as one of the source roots
in your configuration).
You could either compile to a dedicated directory (the best solution IMHO), or, if you don't need the resources to be copied to the
output directory (since they are already there), just clear the list of regular expressions that specify resources in File | Project
Properties | Compiler

--

Best regards,
Eugene Zhuravlev
JetBrains, Inc, http://www.intellij.com
"Develop with pleasure!"


0
Comment actions Permalink


"Carlos Costa e Silva" <carlos@keysoft.pt> wrote in message news:bj5fak$ve3$1@is.intellij.net...

Is there a way to disable this?

>

Uncheck Project Properties->Compiler->Clear output directory on rebuild.


I don't think this will help :)

Hm, so this is different behavior than 3.0.5, right? It never did this

before.

>

In ariadna the checkbox was called synchronize output directory and both
ariadna and aurora behave mostly in the same way.

>

More specifically, in Ariadna, the option controlled whether Make and Rebuild will delete output files that correspond to deleted or
modified sources. In Aurora, it only affects "Rebuild" command and if the option is on, all files in output directories are
deleted. That's why the name of the option has been changed.

--

Best regards,
Eugene Zhuravlev
JetBrains, Inc, http://www.intellij.com
"Develop with pleasure!"


0

Please sign in to leave a comment.