|
Re: Where is Java EE Module Dependencies in Helios? [message #550504 is a reply to message #550429] |
Fri, 30 July 2010 14:58 |
|
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 #550530 is a reply to message #550508] |
Fri, 30 July 2010 16:41 |
|
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 |
Larry Isaacs Messages: 1354 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 |
Adam 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 |
Larry Isaacs Messages: 1354 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 #550952 is a reply to message #550912] |
Wed, 04 August 2010 16:44 |
Larry Isaacs Messages: 1354 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
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04966 seconds