Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Help with jar files not getting exported in WAR file
Help with jar files not getting exported in WAR file [message #212464] Thu, 17 April 2008 18:54 Go to next message
Eclipse User
Originally posted by: adb.teamware.com

I have a utility project that uses a number of jar files in its lib directory.
These show up as 'Referenced libraries' in Eclipse 3.3.1.1.

The show up in the build path and a number of these are ticked in the order and
export page.

This project is set as a dependency by another web project, but I am getting
class not found exceptions when running my web app.

I've read a some of the similar posts here, but I cannot understand why this is
a problem and how to configure it correctly.

I get warnings like:

Classpath entry /Search/lib/commons-collections-3.2.jar will not be exported or
published. Runtime ClassNotFoundExceptions may result.

So, if do Quick Fix on it, it gives me the chance to 'Mark the associated raw
classpath as a publish/export dependency.'. If I do this, it moves that jar
file from 'Referenced libraries' to the 'EAR libraries' tree node.

The following is added to the <classpathentry> entry in the .classpath file

<attributes>
<attribute name="org.eclipse.jst.component.dependency" value="../"/>
</attributes>

The entry before the quick fix was

<classpathentry exported="true" kind="lib" path="lib/commons-collections-3.2.jar">

and in the build path libraries tab, the library now shows 'Public / export
dependencey : Added to parent project.' and it will be exported to WEB-INF/lib
in the WAR file.

I've spent half a day on this trying to find out how on earth I can just tell it
which libraries I want exported in the WAR file, but for the life of me cannot
find a way to do it other than the quick fix.

I can't seem to move the libraries to the EAR tab and unticking/re-ticking the
file in the export tab does not help

Where am I going wrong???
Antony
Re: Help with jar files not getting exported in WAR file [message #212469 is a reply to message #212464] Thu, 17 April 2008 19:35 Go to previous messageGo to next message
Eclipse User
Originally posted by: adb.teamware.com

In my J2EE module dependencies for the web project, I have the dependency
project ticked. Also listed separately are the libraries shown in the utility
project EAR libraries tree, but they are not ticked, but the box is green. What
does that mean?

Antony


Antony Bowesman wrote:
> I have a utility project that uses a number of jar files in its lib
> directory. These show up as 'Referenced libraries' in Eclipse 3.3.1.1.
>
> The show up in the build path and a number of these are ticked in the
> order and export page.
>
> This project is set as a dependency by another web project, but I am
> getting class not found exceptions when running my web app.
>
> I've read a some of the similar posts here, but I cannot understand why
> this is a problem and how to configure it correctly.
>
> I get warnings like:
>
> Classpath entry /Search/lib/commons-collections-3.2.jar will not be
> exported or published. Runtime ClassNotFoundExceptions may result.
>
> So, if do Quick Fix on it, it gives me the chance to 'Mark the
> associated raw classpath as a publish/export dependency.'. If I do
> this, it moves that jar file from 'Referenced libraries' to the 'EAR
> libraries' tree node.
>
> The following is added to the <classpathentry> entry in the .classpath file
>
> <attributes>
> <attribute name="org.eclipse.jst.component.dependency" value="../"/>
> </attributes>
>
> The entry before the quick fix was
>
> <classpathentry exported="true" kind="lib"
> path="lib/commons-collections-3.2.jar">
>
> and in the build path libraries tab, the library now shows 'Public /
> export dependencey : Added to parent project.' and it will be exported
> to WEB-INF/lib in the WAR file.
>
> I've spent half a day on this trying to find out how on earth I can just
> tell it which libraries I want exported in the WAR file, but for the
> life of me cannot find a way to do it other than the quick fix.
>
> I can't seem to move the libraries to the EAR tab and
> unticking/re-ticking the file in the export tab does not help
>
> Where am I going wrong???
> Antony
Re: Help with jar files not getting exported in WAR file [message #212717 is a reply to message #212464] Mon, 21 April 2008 16:39 Go to previous messageGo to next message
Eclipse User
Originally posted by: hrobertfrost.gmail.com

Hi Antony,

As of 3.0 M4, the "J2EE Module Dependencies" tab is also displayed in
project properties for utility projects that are referenced only by dynamic
web projects. You can use this UI to add/remove the .classpath attribute.

See http://wiki.eclipse.org/ClasspathEntriesPublishExportSupport for
details.

Hope this helps,

Rob


Details on this functionality can be found:
"Antony Bowesman" <adb@teamware.com> wrote in message
news:fu8kfi$mnr$1@build.eclipse.org...
>I have a utility project that uses a number of jar files in its lib
>directory. These show up as 'Referenced libraries' in Eclipse 3.3.1.1.
>
> The show up in the build path and a number of these are ticked in the
> order and export page.
>
> This project is set as a dependency by another web project, but I am
> getting class not found exceptions when running my web app.
>
> I've read a some of the similar posts here, but I cannot understand why
> this is a problem and how to configure it correctly.
>
> I get warnings like:
>
> Classpath entry /Search/lib/commons-collections-3.2.jar will not be
> exported or published. Runtime ClassNotFoundExceptions may result.
>
> So, if do Quick Fix on it, it gives me the chance to 'Mark the associated
> raw classpath as a publish/export dependency.'. If I do this, it moves
> that jar file from 'Referenced libraries' to the 'EAR libraries' tree
> node.
>
> The following is added to the <classpathentry> entry in the .classpath
> file
>
> <attributes>
> <attribute name="org.eclipse.jst.component.dependency" value="../"/>
> </attributes>
>
> The entry before the quick fix was
>
> <classpathentry exported="true" kind="lib"
> path="lib/commons-collections-3.2.jar">
>
> and in the build path libraries tab, the library now shows 'Public /
> export dependencey : Added to parent project.' and it will be exported to
> WEB-INF/lib in the WAR file.
>
> I've spent half a day on this trying to find out how on earth I can just
> tell it which libraries I want exported in the WAR file, but for the life
> of me cannot find a way to do it other than the quick fix.
>
> I can't seem to move the libraries to the EAR tab and unticking/re-ticking
> the file in the export tab does not help
>
> Where am I going wrong???
> Antony
Re: Help with jar files not getting exported in WAR file [message #212726 is a reply to message #212469] Mon, 21 April 2008 16:41 Go to previous messageGo to next message
Eclipse User
Originally posted by: hrobertfrost.gmail.com

Hi Antony,

What you are seeing are the JARs from the utility project that will be added
to the published/exported content of that module. They are not "ticked"
(i.e. non-selectable) because their inclusion is controlled by the
..classpath attribute in the dependent project.

Hope this helps.

-Rob

"Antony Bowesman" <adb@teamware.com> wrote in message
news:fu8mrc$85i$1@build.eclipse.org...
> In my J2EE module dependencies for the web project, I have the dependency
> project ticked. Also listed separately are the libraries shown in the
> utility project EAR libraries tree, but they are not ticked, but the box
> is green. What does that mean?
>
> Antony
>
>
> Antony Bowesman wrote:
>> I have a utility project that uses a number of jar files in its lib
>> directory. These show up as 'Referenced libraries' in Eclipse 3.3.1.1.
>>
>> The show up in the build path and a number of these are ticked in the
>> order and export page.
>>
>> This project is set as a dependency by another web project, but I am
>> getting class not found exceptions when running my web app.
>>
>> I've read a some of the similar posts here, but I cannot understand why
>> this is a problem and how to configure it correctly.
>>
>> I get warnings like:
>>
>> Classpath entry /Search/lib/commons-collections-3.2.jar will not be
>> exported or published. Runtime ClassNotFoundExceptions may result.
>>
>> So, if do Quick Fix on it, it gives me the chance to 'Mark the associated
>> raw classpath as a publish/export dependency.'. If I do this, it moves
>> that jar file from 'Referenced libraries' to the 'EAR libraries' tree
>> node.
>>
>> The following is added to the <classpathentry> entry in the .classpath
>> file
>>
>> <attributes>
>> <attribute name="org.eclipse.jst.component.dependency" value="../"/>
>> </attributes>
>>
>> The entry before the quick fix was
>>
>> <classpathentry exported="true" kind="lib"
>> path="lib/commons-collections-3.2.jar">
>>
>> and in the build path libraries tab, the library now shows 'Public /
>> export dependencey : Added to parent project.' and it will be exported to
>> WEB-INF/lib in the WAR file.
>>
>> I've spent half a day on this trying to find out how on earth I can just
>> tell it which libraries I want exported in the WAR file, but for the life
>> of me cannot find a way to do it other than the quick fix.
>>
>> I can't seem to move the libraries to the EAR tab and
>> unticking/re-ticking the file in the export tab does not help
>>
>> Where am I going wrong???
>> Antony
Re: Help with jar files not getting exported in WAR file [message #212750 is a reply to message #212717] Mon, 21 April 2008 22:12 Go to previous messageGo to next message
Eclipse User
Originally posted by: adb.teamware.com

Hi Rob,

> As of 3.0 M4, the "J2EE Module Dependencies" tab is also displayed in
> project properties for utility projects that are referenced only by dynamic
> web projects. You can use this UI to add/remove the .classpath attribute.
>
> See http://wiki.eclipse.org/ClasspathEntriesPublishExportSupport for
> details.

In my J2EE Module Dependencies, I just get a red X with "Selected module not
associated with an Enterprise Application module."

What am I missing?
Antony


>
> Hope this helps,
>
> Rob
>
>
> Details on this functionality can be found:
> "Antony Bowesman" <adb@teamware.com> wrote in message
> news:fu8kfi$mnr$1@build.eclipse.org...
>> I have a utility project that uses a number of jar files in its lib
>> directory. These show up as 'Referenced libraries' in Eclipse 3.3.1.1.
>>
>> The show up in the build path and a number of these are ticked in the
>> order and export page.
>>
>> This project is set as a dependency by another web project, but I am
>> getting class not found exceptions when running my web app.
>>
>> I've read a some of the similar posts here, but I cannot understand why
>> this is a problem and how to configure it correctly.
>>
>> I get warnings like:
>>
>> Classpath entry /Search/lib/commons-collections-3.2.jar will not be
>> exported or published. Runtime ClassNotFoundExceptions may result.
>>
>> So, if do Quick Fix on it, it gives me the chance to 'Mark the associated
>> raw classpath as a publish/export dependency.'. If I do this, it moves
>> that jar file from 'Referenced libraries' to the 'EAR libraries' tree
>> node.
>>
>> The following is added to the <classpathentry> entry in the .classpath
>> file
>>
>> <attributes>
>> <attribute name="org.eclipse.jst.component.dependency" value="../"/>
>> </attributes>
>>
>> The entry before the quick fix was
>>
>> <classpathentry exported="true" kind="lib"
>> path="lib/commons-collections-3.2.jar">
>>
>> and in the build path libraries tab, the library now shows 'Public /
>> export dependencey : Added to parent project.' and it will be exported to
>> WEB-INF/lib in the WAR file.
>>
>> I've spent half a day on this trying to find out how on earth I can just
>> tell it which libraries I want exported in the WAR file, but for the life
>> of me cannot find a way to do it other than the quick fix.
>>
>> I can't seem to move the libraries to the EAR tab and unticking/re-ticking
>> the file in the export tab does not help
>>
>> Where am I going wrong???
>> Antony
>
>
Re: Help with jar files not getting exported in WAR file [message #212758 is a reply to message #212750] Mon, 21 April 2008 22:32 Go to previous messageGo to next message
Eclipse User
Originally posted by: hrobertfrost.gmail.com

Hi Antony,

It sounds like you are using a version of WTP prior to the change that added
J2EE Module Dependencies support for utility projects only referenced from
just dynamic web projects.

Try the current milestone of WTP 3.0.

-Rob

"Antony Bowesman" <adb@teamware.com> wrote in message
news:fujhi3$89k$1@build.eclipse.org...
> Hi Rob,
>
>> As of 3.0 M4, the "J2EE Module Dependencies" tab is also displayed in
>> project properties for utility projects that are referenced only by
>> dynamic web projects. You can use this UI to add/remove the .classpath
>> attribute.
>>
>> See http://wiki.eclipse.org/ClasspathEntriesPublishExportSupport for
>> details.
>
> In my J2EE Module Dependencies, I just get a red X with "Selected module
> not associated with an Enterprise Application module."
>
> What am I missing?
> Antony
>
>
>>
>> Hope this helps,
>>
>> Rob
>>
>>
>> Details on this functionality can be found:
>> "Antony Bowesman" <adb@teamware.com> wrote in message
>> news:fu8kfi$mnr$1@build.eclipse.org...
>>> I have a utility project that uses a number of jar files in its lib
>>> directory. These show up as 'Referenced libraries' in Eclipse 3.3.1.1.
>>>
>>> The show up in the build path and a number of these are ticked in the
>>> order and export page.
>>>
>>> This project is set as a dependency by another web project, but I am
>>> getting class not found exceptions when running my web app.
>>>
>>> I've read a some of the similar posts here, but I cannot understand why
>>> this is a problem and how to configure it correctly.
>>>
>>> I get warnings like:
>>>
>>> Classpath entry /Search/lib/commons-collections-3.2.jar will not be
>>> exported or published. Runtime ClassNotFoundExceptions may result.
>>>
>>> So, if do Quick Fix on it, it gives me the chance to 'Mark the
>>> associated raw classpath as a publish/export dependency.'. If I do
>>> this, it moves that jar file from 'Referenced libraries' to the 'EAR
>>> libraries' tree node.
>>>
>>> The following is added to the <classpathentry> entry in the .classpath
>>> file
>>>
>>> <attributes>
>>> <attribute name="org.eclipse.jst.component.dependency" value="../"/>
>>> </attributes>
>>>
>>> The entry before the quick fix was
>>>
>>> <classpathentry exported="true" kind="lib"
>>> path="lib/commons-collections-3.2.jar">
>>>
>>> and in the build path libraries tab, the library now shows 'Public /
>>> export dependencey : Added to parent project.' and it will be exported
>>> to WEB-INF/lib in the WAR file.
>>>
>>> I've spent half a day on this trying to find out how on earth I can just
>>> tell it which libraries I want exported in the WAR file, but for the
>>> life of me cannot find a way to do it other than the quick fix.
>>>
>>> I can't seem to move the libraries to the EAR tab and
>>> unticking/re-ticking the file in the export tab does not help
>>>
>>> Where am I going wrong???
>>> Antony
>>
Re: Help with jar files not getting exported in WAR file [message #212766 is a reply to message #212758] Mon, 21 April 2008 23:35 Go to previous messageGo to next message
Eclipse User
Originally posted by: adb.teamware.com

Hi Rob,

> It sounds like you are using a version of WTP prior to the change that added
> J2EE Module Dependencies support for utility projects only referenced from
> just dynamic web projects.

Sorry for the dumb question, but I have Eclipse Europa which shows me I have Web
Standard Tools WST 2.0.1 200709110510. Is WST the same as WTP?

Antony
Re: Help with jar files not getting exported in WAR file [message #212892 is a reply to message #212766] Thu, 24 April 2008 09:51 Go to previous message
Eclipse User
Originally posted by: hrobertfrost.gmail.com

No worries on the question; WST is a subset of WTP and the Europa releases
are for 2.0.x rather than 3.0 so that explains the behavior you are seeing.

You'll need to migrate to 3.0 or continue to use the QuickFix mechanism.

-Rob

"Antony Bowesman" <adb@teamware.com> wrote in message
news:fujmd6$rdm$1@build.eclipse.org...
> Hi Rob,
>
>> It sounds like you are using a version of WTP prior to the change that
>> added J2EE Module Dependencies support for utility projects only
>> referenced from just dynamic web projects.
>
> Sorry for the dumb question, but I have Eclipse Europa which shows me I
> have Web Standard Tools WST 2.0.1 200709110510. Is WST the same as WTP?
>
> Antony
Previous Topic:J2EE Preview Server, Jetty, Dynamic Web Projects and log4j
Next Topic:classpath error with embedded tomcat
Goto Forum:
  


Current Time: Fri Aug 29 10:19:56 EDT 2014

Powered by FUDForum. Page generated in 0.13500 seconds