Nested WebContent Directory for Dynamic Web Projects [message #197947] |
Tue, 07 August 2007 19:25  |
Eclipse User |
|
|
|
Originally posted by: corvino.gmail.com
I want to change the WebContent directory to be three levels deep in my
project workspace when creating a Dynamic Web Project. With WebTools
1.5 I was able to do this when creating the project by entering
src/web/etc for the WebContent directory. After upgrading to WebTools
2.0, I find that I am unable to do this. Eclipse says '/ is an invalid
character in resource name ...'.
I also don't understand why I can't change the location of the
WebContent directory after project creation. I used to be able to
accomplish this by editing XML files in the project .settings directory,
but with WebTools 2.0 I haven't been able to get even this to work. If
the setting is allowed at project creation time, why can't I change it?
And why can't I give it any valid directory name.
Thanks for any help you can offer,
Nathan
|
|
|
Re: Nested WebContent Directory for Dynamic Web Projects [message #198072 is a reply to message #197947] |
Thu, 09 August 2007 11:25   |
Eclipse User |
|
|
|
hi Nathan,
See comments below.
-Rob
"Nathan Corvino" <corvino@gmail.com> wrote in message
news:f9av1i$avp$1@build.eclipse.org...
>I want to change the WebContent directory to be three levels deep in my
>project workspace when creating a Dynamic Web Project. With WebTools 1.5 I
>was able to do this when creating the project by entering src/web/etc for
>the WebContent directory. After upgrading to WebTools 2.0, I find that I
>am unable to do this. Eclipse says '/ is an invalid character in resource
>name ...'.
Looks like this is a bug in the Dynamic Web project wizard, see
https://bugs.eclipse.org/bugs/show_bug.cgi?id=194501
> I also don't understand why I can't change the location of the WebContent
> directory after project creation. I used to be able to accomplish this
> by editing XML files in the project .settings directory, but with WebTools
> 2.0 I haven't been able to get even this to work. If the setting is
> allowed at project creation time, why can't I change it? And why can't I
> give it any valid directory name.
Although you can now simply rename/move the WebContent directory, trying to
map it underneath src is going to be problematic: the "src" directory
(really the compiled output of the src directory, /build/classes by default)
is already mapped to /WEB-INF/classes. The refactoring logic that handles
updating the component file in response to these refactoring ops does not
handle the case where you try to move a non-Java src dir underneath a Java
src dir; even if it did (or if you directly edit the component file
yourself), you would end up with your WebContent contents duplicated in the
published/exported WAR (under both the root and WEB-INF/classes)
>
> Thanks for any help you can offer,
>
> Nathan
|
|
|
|
Re: Nested WebContent Directory for Dynamic Web Projects [message #198531 is a reply to message #198491] |
Mon, 20 August 2007 10:03  |
Eclipse User |
|
|
|
The inability to specify that structure in the new project wizard is
certainly a regression (and I believe it has been fixed in 2.0.1)
If "src" in this case is not in fact a Java src folder, then the support for
refactoring the WebContent folder to this location should work. If it does
not, please open a bugzilla.
-Rob
"Dave Syer" <david_syer@hotmail.com> wrote in message
news:fa7b6e$une$1@build.eclipse.org...
>I very much suspect that the original post related to a Maven or Maven like
>layout - "src" does not have to be the location of Java source code, even
>though WTP seems to think that is a good idea. It seems like a pretty bad
>regression to me.
>
> "Rob Frost" <rfrost@bea.com> wrote in message
> news:f9fblj$sl0$1@build.eclipse.org...
>> Although you can now simply rename/move the WebContent directory, trying
>> to map it underneath src is going to be problematic: the "src" directory
>> (really the compiled output of the src directory, /build/classes by
>> default) is already mapped to /WEB-INF/classes. The refactoring logic
>> that handles updating the component file in response to these refactoring
>> ops does not handle the case where you try to move a non-Java src dir
>> underneath a Java src dir; even if it did (or if you directly edit the
>> component file yourself), you would end up with your WebContent contents
>> duplicated in the published/exported WAR (under both the root and
>> WEB-INF/classes)
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.25919 seconds