include dynamic web project in another dynamic web project [message #505835] |
Tue, 05 January 2010 05:10  |
Eclipse User |
|
|
|
I have a dynamic web project (DWP) which has some generic filters, servlets and listeners. This project is a DWP because it contains test situations; it's configured in a Tomcat server and I can do run through some test scenario's.
Naturally I want to use this in a real life DWP, so I want to include the "utility DWP" project, but Eclipse doesn't show it in the JEE module dependencies; only non-DWP projects are listed.
I assume it is on purpose, but I think my scenario is not that strange. Is there a away around?
|
|
|
|
|
|
|
|
|
|
|
Re: include dynamic web project in another dynamic web project [message #507109 is a reply to message #506885] |
Mon, 11 January 2010 22:42   |
Eclipse User |
|
|
|
Tom Eugelink ha scritto:
> The generic DWP contains a test environment testing the servlets and
> filters, so it is configured as a DWP in the server itself. The actual
> project uses the generic servlets, and naturally is configured as a DWP
> project in the server.
>
> The setup is not that strange, is it? It's like you're building a JAR
> project and have a utility JAR project it depends on. The utility JAR
> project has its own test environment.
I still can't understand what's your problem.
If your problem is "how can I set the dependency", the solution is "set
up the generic project as a Utility project" (if that wouldn't work
please explain why). Then, you will be able to set it as a JEE module
dependency for your actual project, so that a JAR of the utility project
will be automatically built by Eclipse and deployed to WEB-INF/lib
folder of your actual project. The existance of a test environment in
the utility project shouldn't be a problem for that. If it is, please
explain why (and define what's your test environment... test classes? A
web application?).
If your problem is "I want to add a DWP as a JEE module dependency for
another DWP", the answer is: as of now, you can't. But it's still not
clear why you want the generic project to be a DWP at all costs.
I think the solution to your problem exists, but it may not be yours.
Mauro.
|
|
|
|
Re: include dynamic web project in another dynamic web project [message #507198 is a reply to message #507117] |
Tue, 12 January 2010 08:16   |
Eclipse User |
|
|
|
Tom,
Now that I clearly see your situation, it seems perfect for the use of a Utility Project that I explained earlier.
You ccould then set it up this way:
Utility Project:
- java source code of generic servlets and filters
Testing DWP:
- web environment for testing; configfiles, jsps, etc.
- JEE Module Dependency of the "Utility Project"
Actual DWP:
- java source code of application code
- web environment with application config files, jsps, additional servlets, etc, etc
- JEE Module Dependency of the "Utility Project"
In this way the Java source code in the "Utility Project" is accessibly from both your Testing and Actual DWPs and you are able to create the neccissary JEE Module Dependencies.
But as you said in the beginning there is no way to have a JEE Module Dependency on a DWP from a DWP. Not working in that area I do not know the reasons why but you could always search for an open Bugzilla request for this feature or open your own if you can not find one. Though I think the solution I described above is the expected practice.
Blue Skies,
~Ian
|
|
|
|
Re: include dynamic web project in another dynamic web project [message #507375 is a reply to message #507198] |
Wed, 13 January 2010 04:18  |
Eclipse User |
|
|
|
This is now clear for me too. And Ian could not explain it better.
Ian Tewksbury ha scritto:
> But as you said in the beginning there is no way to have a JEE Module
> Dependency on a DWP from a DWP. Not working in that area I do not know
> the reasons why but you could always search for an open Bugzilla request
> for this feature or open your own if you can not find one. Though I
> think the solution I described above is the expected practice.
This is the request:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=107039
Tom, you could monitor that bug and add your vote.
I was wrong, there's not current work on this, I got confused about the
in-progress work for e4 for low-level resource mapping.
Mauro.
|
|
|
Powered by
FUDForum. Page generated in 0.35707 seconds