specifying only some project src dirs to deploy to tomcat [message #205947] |
Mon, 17 December 2007 15:33 |
Eclipse User |
|
|
|
Originally posted by: adam.hardy.no.spam.cyberspaceroad.spam
I have a project where I do not want to deploy some of the test resources.
I have them in one directory, separate from my main classes, but WTP 2 puts the
directory on the tomcat classpath.
Not only that, the test directory appears in front of the normal directory on
the tomcat classpath.
Is there a dialog somewhere that allows me to specify to WTP not to publish this
test directory to tomcat?
Thanks in advance,
Adam
|
|
|
|
Re: specifying only some project src dirs to deploy to tomcat [message #205970 is a reply to message #205947] |
Mon, 17 December 2007 17:20 |
Larry Isaacs Messages: 1354 Registered: July 2009 |
Senior Member |
|
|
adam hardy wrote:
> I have a project where I do not want to deploy some of the test resources.
>
> I have them in one directory, separate from my main classes, but WTP 2
> puts the directory on the tomcat classpath.
>
> Not only that, the test directory appears in front of the normal
> directory on the tomcat classpath.
>
> Is there a dialog somewhere that allows me to specify to WTP not to
> publish this test directory to tomcat?
>
> Thanks in advance,
>
> Adam
I'll assume that what you meant by "tomcat classpath" is actually the
"webapp classpath" and you are referring to a Dynamic Web Project with
multiple Java source directories. In the project properties Java Build
Path page in the Source tab, you will need to enable the "Allow output
folders for source folders", if you haven't already. Then specify a
different output location for those source folders you don't want to be
included in the webapp, if you haven't already. Finally, you need to
open then .settings/org.eclipse.wst.common.component (use the Navigator
view to make it visible) file in the project and delete the
<wb-resource> element whose "source-path" attribute corresponds to the
source folder you don't want included. I'm not aware of a UI way to
accomplish this last step, but I may have overlooked it.
If I have misinterpreted the question, please clarify.
Cheers,
Larry
|
|
|
Re: specifying project src dir order on classpath [message #206007 is a reply to message #205963] |
Tue, 18 December 2007 13:46 |
Eclipse User |
|
|
|
Originally posted by: adam.hardy.no.spam.cyberspaceroad.spam
Rob Frost on 17/12/07 17:12, wrote:
> UI support for controlling the publish/export behavior of Java src folders
> does not currently exist.
>
> You can remove this src folder from publish/export consideration by removing
> the corresponding "wb-resource" mapping in the project's
> .settings/org.eclipse.wst.common.component file. For a dynamic web project,
> this will look something like:
>
> ...
> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
> ...
>
> Note: these wb-resource mappings are automatically updated by WTP when Java
> src folders are created/removed/refactored.
I just came across another issue almost the same as this.
I ordered my src directories on the classpath in my project because I always
want the test directory to be the 'dominant' src ahead of the src in my main dir.
WTP automatically re-ordered the src folders just now, and it put the main src
folder ahead of the test src folder.
Presumably this is just random - they're not sorted or specified to be in this
order are they?
Could ordering by specified by the user and kept via the sources dialog on the
Java Build Path project settings? I'd be happy to add a Jira :)
regards
Adam
|
|
|
|
Re: specifying project src dir order on classpath [message #206046 is a reply to message #206015] |
Wed, 19 December 2007 12:26 |
Eclipse User |
|
|
|
Originally posted by: adam.hardy.no.spam.cyberspaceroad.spam
https://bugs.eclipse.org/bugs/show_bug.cgi?id=213442
It looks like the algorithm copying the files for 'Order and Export' which
causes 211929 is plain wrong. For src dir ordering though, the files are copied
by the compile process correctly into the build directory at compile time so the
top dirs in .classpath are dominant. I guess it's a completely seperate issue.
Regards
Adam
Rob Frost on 18/12/07 14:51, wrote:
> Yes, please do enter a bugzilla with details on this issue (assign to
> jst.j2ee and include your specific repro scenario).
>
> On this topic of WTP respecting the Java build path specified ordering, you
> may want to add yourself to the cc list for
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=211929
>
> "adam hardy" <adam.hardy@no.spam.cyberspaceroad.spam> wrote in message
>> I ordered my src directories on the classpath in my project because I
>> always want the test directory to be the 'dominant' src ahead of the src
>> in my main dir.
>>
>> WTP automatically re-ordered the src folders just now, and it put the main
>> src folder ahead of the test src folder.
>>
>> Presumably this is just random - they're not sorted or specified to be in
>> this order are they?
>>
>> Could ordering by specified by the user and kept via the sources dialog on
>> the Java Build Path project settings? I'd be happy to add a Jira :)
|
|
|
Powered by
FUDForum. Page generated in 0.03447 seconds