J2EE Module Dependencies for non-J2EE projects [message #190798] |
Fri, 30 March 2007 14:48  |
Eclipse User |
|
|
|
Hello,
Using WTP 1.5.2, should I be using the "J2EE Module Dependencies" screen
to set project dependencies for non-J2EE projects (such as regular Java
projects)?
Intuitively, "J2EE Module Dependencies" hints that it should only be
used for J2EE Modules (EJB projects, WAR projects and EAR projects
only). However, the "J2EE Module Dependencies" dialog does appear for
non-J2EE projects as well, editing the MANIFEST.MF file.
This gets to be a royal pain in the butt when you have a workspace with
J2EE and non-J2EE modules, where the J2EE modules use the non-J2EE
modules and non-J2EE modules use other non-J2EE modules (think about a
Web Application using a regular Java Project, and that Java Project uses
another Java Project). Dependencies hell.
Anybody cares to shed some light?
Isaac
|
|
|
|
Re: J2EE Module Dependencies for non-J2EE projects [message #190885 is a reply to message #190806] |
Mon, 02 April 2007 13:10   |
Eclipse User |
|
|
|
Actually I failed to mention one other detail: I was referring to
non-J2EE projects that are associated with an EAR.
If you have a stand-alone Java project, the J2EE Module Dependencies
dialog will not show; this is expected.
However if that Java project is associated with an EAR project (say, as
a utility JAR), then the J2EE Module Dependencies dialog will show for
it. And that's what I fail to understand - what is it good for? We
suddenly have two ways to specify dependencies. Perhaps the "J2EE Module
Dependencies" were meant to be "runtime dependencies" whereas the "Build
Path" was meant to be "build-time dependencies"? That means that a
developer will have to always maintain TWO sets of dependencies, which
is terribly inconvenient.
-------- Original Message --------
> This probably got fixed in 1.5.3. I just tried it with that version and
> the J2EE Module Dependencies page does not display for plain java projects.
>
> - Konstantin
|
|
|
Re: J2EE Module Dependencies for non-J2EE projects [message #190919 is a reply to message #190885] |
Mon, 02 April 2007 14:26   |
Eclipse User |
|
|
|
Originally posted by: kosta.bea.com
As soon as you referenced a java project from an ear, it became a J2EE
utility jar project. That means it's build path has to be managed using
the J2EE Module Dependencies page. That will make sure that the build
path is setup correctly and will make sure that your app will package
and run as expected. If you use the Java Build Path page directly, you
can easily end up in a situation where your app compiles, but doesn't
package or run.
- Konstantin
|
|
|
Re: J2EE Module Dependencies for non-J2EE projects [message #190967 is a reply to message #190919] |
Tue, 03 April 2007 00:31  |
Eclipse User |
|
|
|
This makes sense, however it makes the *reusable* Java Project unusable
in a non-J2EE context. Recall that I am talking about a Java Project
that can be used either within a J2EE context (i.e. inside a J2EE
application) or without a J2EE context (i.e. as a utility JAR used by a
standalone Java application). My reusable Java Project will not have any
build path and will not recompile. Therefore, I'd be forced to maintain
two sets of dependencies.
Am I missing something?
-------- Original Message --------
> As soon as you referenced a java project from an ear, it became a J2EE
> utility jar project. That means it's build path has to be managed using
> the J2EE Module Dependencies page. That will make sure that the build
> path is setup correctly and will make sure that your app will package
> and run as expected. If you use the Java Build Path page directly, you
> can easily end up in a situation where your app compiles, but doesn't
> package or run.
>
> - Konstantin
|
|
|
Powered by
FUDForum. Page generated in 0.02769 seconds