Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Where is Java EE Module Dependencies in Helios?
Where is Java EE Module Dependencies in Helios? [message #550429] Fri, 30 July 2010 10:56 Go to next message
Adam is currently offline AdamFriend
Messages: 4
Registered: July 2010
Junior Member
I'm used to using Eclipse Ganymede at my workplace but I've just installed Helios at home. There is usually a very useful feature called "Java EE Module Dependencies" which appears in the project properties for a dynamic web project in Ganymede and allows you to specify libraries which will be linked into WEB-INF/lib at runtime. However where can I find this feature in Helios??

Ganymede (blacked out confidential information):
http://store.hawknetwork.org/Eclipse_Ganymede_JEEMD.PNG

Helios:
http://store.hawknetwork.org/Eclipse_Helios_NoJEEMD.png
Re: Where is Java EE Module Dependencies in Helios? [message #550504 is a reply to message #550429] Fri, 30 July 2010 14:58 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3245
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 7/30/2010 4:56 AM, ajburley@gmail.com wrote:
> I'm used to using Eclipse Ganymede at my workplace but I've just
> installed Helios at home. There is usually a very useful feature called
> "Java EE Module Dependencies" which appears in the project properties
> for a dynamic web project in Ganymede and allows you to specify
> libraries which will be linked into WEB-INF/lib at runtime. However
> where can I find this feature in Helios??
>
> Ganymede (blacked out confidential information):
>
>
> Helios:

Galileo had this option for Dynamic Web Projects, but Helios does not
seem to (even for Dynamic Web Projects). There must be an equivalent way
to accomplish it. I can't believe all libraries would be marked as Java
EE Module Dependencies since you might not want them copied in actual
deployment (such as some of the commons-*.jar libraries when deploying
to Tomcat).

I'd like to know the answer too.

Russ Bateman
Re: Where is Java EE Module Dependencies in Helios? [message #550508 is a reply to message #550504] Fri, 30 July 2010 15:14 Go to previous messageGo to next message
Adam is currently offline AdamFriend
Messages: 4
Registered: July 2010
Junior Member
Well no, they aren't all marked as such, which is my problem. I want to reference libraries in other projects from within my WAR project, but Tomcat complains that it can't find the relevant classes. My project is indeed a Dynamic Web Project.
Re: Where is Java EE Module Dependencies in Helios? [message #550530 is a reply to message #550508] Fri, 30 July 2010 16:41 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3245
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 7/30/2010 9:14 AM, ajburley@gmail.com wrote:
> Well no, they aren't all marked as such, which is my problem. I want to
> reference libraries in other projects from within my WAR project, but
> Tomcat complains that it can't find the relevant classes. My project is
> indeed a Dynamic Web Project.

I guess you could just by-pass the Java Build Path approach and dump
them directly into WebContent/WEB-INF/lib. From the other projects, you
can use Java Build Path -> Libraries -> Add Library -> Web App Library
to consume them, no?
Re: Where is Java EE Module Dependencies in Helios? [message #550535 is a reply to message #550508] Fri, 30 July 2010 17:07 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1310
Registered: July 2009
Senior Member
On 7/30/2010 11:14 AM, ajburley@gmail.com wrote:
> Well no, they aren't all marked as such, which is my problem. I want to
> reference libraries in other projects from within my WAR project, but
> Tomcat complains that it can't find the relevant classes. My project is
> indeed a Dynamic Web Project.

The replacement is the Deployment Assembly page. It can do a number of
things that the Java EE Module Dependencies could not. For example, you
can specify the name of the jar you want created for a dependent project
if "<project_name>.jar" isn't what you want. However, not everything is
as easy or as obvious as it was with the Java EE Module Dependencies
page. Handling dependent jars in Dynamic Web Projects and dependent
utility projects is one of the use cases I think is currently a step
backwards in usability. For now, adding dependent jars using the Java
Build Path and using the Problems or Markers view to mark them for
inclusion in WEB-INF/lib may be the simplest approach.

Jars on the Java Build Path that are not marked for inclusion in the
"WEB-INF/lib" of the Dynamic Web Projects that use them, directly or
indirectly, should result in a warning in the Problems or Markers view.
The Quick Fix for the warning will mark the jar for inclusion. If
this jar is in a dependent project and marked for inclusion, but isn't
exported in the dependent project, then a different warning will appear
stating that "Classpath visibility within Eclipse and at runtime will
differ." Exporting the jar makes this warning go away.

Cheers,
Larry
Re: Where is Java EE Module Dependencies in Helios? [message #550674 is a reply to message #550535] Wed, 04 August 2010 06:40 Go to previous messageGo to next message
Adam is currently offline AdamFriend
Messages: 4
Registered: July 2010
Junior Member
Larry Isaacs wrote on Fri, 30 July 2010 13:07
The replacement is the Deployment Assembly page. It can do a number of
things that the Java EE Module Dependencies could not. For example, you
can specify the name of the jar you want created for a dependent project
if "<project_name>.jar" isn't what you want. However, not everything is
as easy or as obvious as it was with the Java EE Module Dependencies
page. Handling dependent jars in Dynamic Web Projects and dependent
utility projects is one of the use cases I think is currently a step
backwards in usability. For now, adding dependent jars using the Java
Build Path and using the Problems or Markers view to mark them for
inclusion in WEB-INF/lib may be the simplest approach.

Jars on the Java Build Path that are not marked for inclusion in the
"WEB-INF/lib" of the Dynamic Web Projects that use them, directly or
indirectly, should result in a warning in the Problems or Markers view.
The Quick Fix for the warning will mark the jar for inclusion. If
this jar is in a dependent project and marked for inclusion, but isn't
exported in the dependent project, then a different warning will appear
stating that "Classpath visibility within Eclipse and at runtime will
differ." Exporting the jar makes this warning go away.

Cheers,
Larry


I'm still stuck with this I'm afraid. I can't see from the Deployment Assembly page how to achieve what I want. What I really want to do is to create a folder mapping from WEB-INF/lib to the folders my libraries are in from the associated project. However, the Deployment Assembly doesn't let me create a folder mapping other than to the root directory.

I don't get a warning in the Problems view. All I get is a java.lang.ClassNotFoundException in the console when I try to start Tomcat.

Can someone give me step by step instructions as to how to add a library from another project to the Deployment Assembly so it will be resolved into WEB-INF/lib at runtime?
Re: Where is Java EE Module Dependencies in Helios? [message #550822 is a reply to message #550674] Wed, 04 August 2010 12:46 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1310
Registered: July 2009
Senior Member
On 8/4/2010 2:40 AM, Adam wrote:
> Larry Isaacs wrote on Fri, 30 July 2010 13:07
>> The replacement is the Deployment Assembly page. It can do a number of
>> things that the Java EE Module Dependencies could not. For example,
>> you can specify the name of the jar you want created for a dependent
>> project if "<project_name>.jar" isn't what you want. However, not
>> everything is as easy or as obvious as it was with the Java EE Module
>> Dependencies page. Handling dependent jars in Dynamic Web Projects and
>> dependent utility projects is one of the use cases I think is
>> currently a step backwards in usability. For now, adding dependent
>> jars using the Java Build Path and using the Problems or Markers view
>> to mark them for inclusion in WEB-INF/lib may be the simplest approach.
>>
>> Jars on the Java Build Path that are not marked for inclusion in the
>> "WEB-INF/lib" of the Dynamic Web Projects that use them, directly or
>> indirectly, should result in a warning in the Problems or Markers
>> view. The Quick Fix for the warning will mark the jar for inclusion.
>> If this jar is in a dependent project and marked for inclusion, but
>> isn't exported in the dependent project, then a different warning will
>> appear stating that "Classpath visibility within Eclipse and at
>> runtime will differ." Exporting the jar makes this warning go away.
>>
>> Cheers,
>> Larry
>
>
> I'm still stuck with this I'm afraid. I can't see from the Deployment
> Assembly page how to achieve what I want. What I really want to do is to
> create a folder mapping from WEB-INF/lib to the folders my libraries are
> in from the associated project. However, the Deployment Assembly doesn't
> let me create a folder mapping other than to the root directory.
>
> I don't get a warning in the Problems view. All I get is a
> java.lang.ClassNotFoundException in the console when I try to start Tomcat.
>
> Can someone give me step by step instructions as to how to add a library
> from another project to the Deployment Assembly so it will be resolved
> into WEB-INF/lib at runtime?

A folder mapping isn't the way to add libraries to the web project as
they won't be included in the project's build classpath. Does your web
project depend on what is built in the project containing the folder
with the libraries? If so, has it been added as a dependency and how?

Cheers,
Larry
Re: Where is Java EE Module Dependencies in Helios? [message #550912 is a reply to message #550822] Wed, 04 August 2010 15:46 Go to previous messageGo to next message
Adam is currently offline AdamFriend
Messages: 4
Registered: July 2010
Junior Member
Larry Isaacs wrote on Wed, 04 August 2010 08:46
A folder mapping isn't the way to add libraries to the web project as
they won't be included in the project's build classpath. Does your web
project depend on what is built in the project containing the folder
with the libraries? If so, has it been added as a dependency and how?

Cheers,
Larry


Hi Larry, thanks for getting back to me.

The project containing the libraries contains only resources and does not contain any source code or require building.... My web project does not therefore depend on it - and it isn't listed as a project dependency. Should it be? I will have other projects in future which my web project does depend on, but I haven't quite got that far yet....
Re: Where is Java EE Module Dependencies in Helios? [message #550952 is a reply to message #550912] Wed, 04 August 2010 16:44 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1310
Registered: July 2009
Senior Member
On 8/4/2010 11:46 AM, Adam wrote:
> Larry Isaacs wrote on Wed, 04 August 2010 08:46
>> A folder mapping isn't the way to add libraries to the web project as
>> they won't be included in the project's build classpath. Does your web
>> project depend on what is built in the project containing the folder
>> with the libraries? If so, has it been added as a dependency and how?
>>
>> Cheers,
>> Larry
>
>
> Hi Larry, thanks for getting back to me.
>
> The project containing the libraries contains only resources and does
> not contain any source code or require building.... My web project does
> not therefore depend on it - and it isn't listed as a project
> dependency. Should it be? I will have other projects in future which my
> web project does depend on, but I haven't quite got that far yet....

Given that use case, the simplest approach with Deployment Assembly is
to use Add -> Archive -> Browse to add the workspace jars. However,
closer to adding a "folder of jars" is Add -> Classpath Container ->
Finish -> User Library -> and select from the available User Libraries,
creating any new User Libraries that you need. When creating a User
Library, you can select multiple jars from a folder when adding the jars
to the library. If you add additional jars to the folder later, you
will have to update the User Library to include them. I don't know of a
way to "add jars to a folder" and have them automatically included in a
web project's published "WEB-INF/lib" other than dropping them in the
"WebContent/WEB-INF/lib" of the web project itself.

Cheers,
Larry
Re: Where is Java EE Module Dependencies in Helios? [message #559834 is a reply to message #550952] Sun, 19 September 2010 19:04 Go to previous messageGo to next message
breako  is currently offline breako Friend
Messages: 57
Registered: July 2009
Member
Hi,
I am major difficulty deploying an Enterprise Eclipse project on Glassfish and I think it may be to do with this.

I have a Enterprise Archive Project which contains a dynamic web project of type JSF 2.0 and a EJB modules project.

I can't deploy both together in the Enterprise project successfully.
The errors I get are telling me that my dynamic web project cannot find EJBs in the EJB project. I added the EJB project as a dependent project so the web would compile.

But something is going wrong in the deploy.

Any help appreciated?

If there is a smarter way to develope enterprise projects in Helios please advice.

Thanks.

Re: Where is Java EE Module Dependencies in Helios? [message #559885 is a reply to message #559834] Mon, 20 September 2010 08:46 Go to previous message
lhu Missing name is currently offline lhu Missing nameFriend
Messages: 3
Registered: September 2010
Junior Member
hi,

Do the ear project is deployed as you want on the server?
Previous Topic:IWAB0014E On Web Client Code Generation
Next Topic:Decorating the JS Editor title icon with an overlay
Goto Forum:
  


Current Time: Wed Nov 26 14:18:05 GMT 2014

Powered by FUDForum. Page generated in 0.03419 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software