Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » dependant project's libs
dependant project's libs [message #201482] Mon, 08 October 2007 10:34 Go to next message
Zohar Amir is currently offline Zohar AmirFriend
Messages: 419
Registered: July 2009
Senior Member
Hi,
I've asked about this before, but I hope there's been some progress since...
I have a Web project which depends on another java project. The java project
uses some jar file (they are marked to be exported in that project's build
path's export tab). When I export my web project to a WAR file those jar
files are not included in that WAR file.
Any way of making them being included?
Re: dependant project's libs [message #201498 is a reply to message #201482] Mon, 08 October 2007 14:45 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
In WTP 2.0, you should see a warning in the Problems view like the
following:

Classpath entry <your exported jar> will not be exported or published.
Runtime ClassNotFoundExceptions may result.

The only UI way to have the jar included is to use the Quick Fix on this
problem item. If you have done this and the jar is still not being
included, it would be a bug.

Cheers,
Larry

zohar wrote:
> Hi,
> I've asked about this before, but I hope there's been some progress
> since...
> I have a Web project which depends on another java project. The java
> project uses some jar file (they are marked to be exported in that
> project's build path's export tab). When I export my web project to a
> WAR file those jar files are not included in that WAR file.
> Any way of making them being included?
Re: dependant project's libs [message #201506 is a reply to message #201498] Mon, 08 October 2007 19:29 Go to previous messageGo to next message
Zohar Amir is currently offline Zohar AmirFriend
Messages: 419
Registered: July 2009
Senior Member
Thanks.
One thing though - any reason why I cannot select multiple warnings and fix
them all at once?

BTW: if there's ever a contest for the most helpful person on this (and
other) newsgroup - you have my vote.

"Larry Isaacs" <Larry.Isaacs@sas.com> wrote in message
news:fedfph$5vs$1@build.eclipse.org...
> In WTP 2.0, you should see a warning in the Problems view like the
> following:
>
> Classpath entry <your exported jar> will not be exported or published.
> Runtime ClassNotFoundExceptions may result.
>
> The only UI way to have the jar included is to use the Quick Fix on this
> problem item. If you have done this and the jar is still not being
> included, it would be a bug.
>
> Cheers,
> Larry
>
> zohar wrote:
>> Hi,
>> I've asked about this before, but I hope there's been some progress
>> since...
>> I have a Web project which depends on another java project. The java
>> project uses some jar file (they are marked to be exported in that
>> project's build path's export tab). When I export my web project to a WAR
>> file those jar files are not included in that WAR file.
>> Any way of making them being included?
Re: dependant project's libs [message #201514 is a reply to message #201498] Mon, 08 October 2007 19:38 Go to previous messageGo to next message
Zohar Amir is currently offline Zohar AmirFriend
Messages: 419
Registered: July 2009
Senior Member
What does this quick fix do?

"Larry Isaacs" <Larry.Isaacs@sas.com> wrote in message
news:fedfph$5vs$1@build.eclipse.org...
> In WTP 2.0, you should see a warning in the Problems view like the
> following:
>
> Classpath entry <your exported jar> will not be exported or published.
> Runtime ClassNotFoundExceptions may result.
>
> The only UI way to have the jar included is to use the Quick Fix on this
> problem item. If you have done this and the jar is still not being
> included, it would be a bug.
>
> Cheers,
> Larry
>
> zohar wrote:
>> Hi,
>> I've asked about this before, but I hope there's been some progress
>> since...
>> I have a Web project which depends on another java project. The java
>> project uses some jar file (they are marked to be exported in that
>> project's build path's export tab). When I export my web project to a WAR
>> file those jar files are not included in that WAR file.
>> Any way of making them being included?
Re: dependant project's libs [message #201553 is a reply to message #201514] Tue, 09 October 2007 12:19 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
It adds an attribute to the classpath entry for the exported jar in the
..classpath file of the utility project. Once the attribute is there,
you can see evidence of it under the jar in the Libraries tab of the
Java Build Path properties. You can select the attribute and remove it
if necessary using that project properties page.

Cheers,
Larry

zohar wrote:
> What does this quick fix do?
>
> "Larry Isaacs" <Larry.Isaacs@sas.com> wrote in message
> news:fedfph$5vs$1@build.eclipse.org...
>> In WTP 2.0, you should see a warning in the Problems view like the
>> following:
>>
>> Classpath entry <your exported jar> will not be exported or published.
>> Runtime ClassNotFoundExceptions may result.
>>
>> The only UI way to have the jar included is to use the Quick Fix on this
>> problem item. If you have done this and the jar is still not being
>> included, it would be a bug.
>>
>> Cheers,
>> Larry
>>
>> zohar wrote:
>>> Hi,
>>> I've asked about this before, but I hope there's been some progress
>>> since...
>>> I have a Web project which depends on another java project. The java
>>> project uses some jar file (they are marked to be exported in that
>>> project's build path's export tab). When I export my web project to a WAR
>>> file those jar files are not included in that WAR file.
>>> Any way of making them being included?
>
>
Re: dependant project's libs [message #201561 is a reply to message #201506] Tue, 09 October 2007 12:20 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
I'm not sure if the "Quick Fix" API supports handling more than one
problem at a time. I would guess that the "Quick Fix" approach wasn't
chosen because of its desirability, but simply because it didn't require
any new API to be added. I'm not sure what is planned for the future
with respect to improved UI for this feature, but I would also guess
that will likely require support to be added outside of WTP, probably in
JDT.

Cheers,
Larry

zohar wrote:
> Thanks.
> One thing though - any reason why I cannot select multiple warnings and fix
> them all at once?
>
> BTW: if there's ever a contest for the most helpful person on this (and
> other) newsgroup - you have my vote.
>
> "Larry Isaacs" <Larry.Isaacs@sas.com> wrote in message
> news:fedfph$5vs$1@build.eclipse.org...
>> In WTP 2.0, you should see a warning in the Problems view like the
>> following:
>>
>> Classpath entry <your exported jar> will not be exported or published.
>> Runtime ClassNotFoundExceptions may result.
>>
>> The only UI way to have the jar included is to use the Quick Fix on this
>> problem item. If you have done this and the jar is still not being
>> included, it would be a bug.
>>
>> Cheers,
>> Larry
>>
>> zohar wrote:
>>> Hi,
>>> I've asked about this before, but I hope there's been some progress
>>> since...
>>> I have a Web project which depends on another java project. The java
>>> project uses some jar file (they are marked to be exported in that
>>> project's build path's export tab). When I export my web project to a WAR
>>> file those jar files are not included in that WAR file.
>>> Any way of making them being included?
>
>
Re: dependant project's libs [message #201595 is a reply to message #201561] Tue, 09 October 2007 14:30 Go to previous messageGo to next message
Zohar Amir is currently offline Zohar AmirFriend
Messages: 419
Registered: July 2009
Senior Member
after I did the quick fix I got something like for each jar:

Invalid classpath publish/export dependency
/Project/lib/commons-codec-1.3.jar. Dependencies for non-web projects must
be exported.

What's that?

"Larry Isaacs" <Larry.Isaacs@sas.com> wrote in message
news:fefrln$v03$1@build.eclipse.org...
> I'm not sure if the "Quick Fix" API supports handling more than one
> problem at a time. I would guess that the "Quick Fix" approach wasn't
> chosen because of its desirability, but simply because it didn't require
> any new API to be added. I'm not sure what is planned for the future with
> respect to improved UI for this feature, but I would also guess that will
> likely require support to be added outside of WTP, probably in JDT.
>
> Cheers,
> Larry
>
> zohar wrote:
>> Thanks.
>> One thing though - any reason why I cannot select multiple warnings and
>> fix them all at once?
>>
>> BTW: if there's ever a contest for the most helpful person on this (and
>> other) newsgroup - you have my vote.
>>
>> "Larry Isaacs" <Larry.Isaacs@sas.com> wrote in message
>> news:fedfph$5vs$1@build.eclipse.org...
>>> In WTP 2.0, you should see a warning in the Problems view like the
>>> following:
>>>
>>> Classpath entry <your exported jar> will not be exported or published.
>>> Runtime ClassNotFoundExceptions may result.
>>>
>>> The only UI way to have the jar included is to use the Quick Fix on this
>>> problem item. If you have done this and the jar is still not being
>>> included, it would be a bug.
>>>
>>> Cheers,
>>> Larry
>>>
>>> zohar wrote:
>>>> Hi,
>>>> I've asked about this before, but I hope there's been some progress
>>>> since...
>>>> I have a Web project which depends on another java project. The java
>>>> project uses some jar file (they are marked to be exported in that
>>>> project's build path's export tab). When I export my web project to a
>>>> WAR file those jar files are not included in that WAR file.
>>>> Any way of making them being included?
>>
Re: dependant project's libs [message #201620 is a reply to message #201595] Tue, 09 October 2007 15:29 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
It means you haven't exported that jar in the utility project. You will
need to export it to fix the error.

Larry

zohar wrote:
> after I did the quick fix I got something like for each jar:
>
> Invalid classpath publish/export dependency
> /Project/lib/commons-codec-1.3.jar. Dependencies for non-web projects must
> be exported.
>
> What's that?
>
> "Larry Isaacs" <Larry.Isaacs@sas.com> wrote in message
> news:fefrln$v03$1@build.eclipse.org...
>> I'm not sure if the "Quick Fix" API supports handling more than one
>> problem at a time. I would guess that the "Quick Fix" approach wasn't
>> chosen because of its desirability, but simply because it didn't require
>> any new API to be added. I'm not sure what is planned for the future with
>> respect to improved UI for this feature, but I would also guess that will
>> likely require support to be added outside of WTP, probably in JDT.
>>
>> Cheers,
>> Larry
>>
>> zohar wrote:
>>> Thanks.
>>> One thing though - any reason why I cannot select multiple warnings and
>>> fix them all at once?
>>>
>>> BTW: if there's ever a contest for the most helpful person on this (and
>>> other) newsgroup - you have my vote.
>>>
>>> "Larry Isaacs" <Larry.Isaacs@sas.com> wrote in message
>>> news:fedfph$5vs$1@build.eclipse.org...
>>>> In WTP 2.0, you should see a warning in the Problems view like the
>>>> following:
>>>>
>>>> Classpath entry <your exported jar> will not be exported or published.
>>>> Runtime ClassNotFoundExceptions may result.
>>>>
>>>> The only UI way to have the jar included is to use the Quick Fix on this
>>>> problem item. If you have done this and the jar is still not being
>>>> included, it would be a bug.
>>>>
>>>> Cheers,
>>>> Larry
>>>>
>>>> zohar wrote:
>>>>> Hi,
>>>>> I've asked about this before, but I hope there's been some progress
>>>>> since...
>>>>> I have a Web project which depends on another java project. The java
>>>>> project uses some jar file (they are marked to be exported in that
>>>>> project's build path's export tab). When I export my web project to a
>>>>> WAR file those jar files are not included in that WAR file.
>>>>> Any way of making them being included?
>
Re: dependant project's libs [message #201629 is a reply to message #201620] Tue, 09 October 2007 15:52 Go to previous messageGo to next message
Zohar Amir is currently offline Zohar AmirFriend
Messages: 419
Registered: July 2009
Senior Member
In 'Java Build Path' -> 'Order and Export' it is checked...
Is that the right place?

"Larry Isaacs" <Larry.Isaacs@sas.com> wrote in message
news:feg6ov$st3$1@build.eclipse.org...
> It means you haven't exported that jar in the utility project. You will
> need to export it to fix the error.
>
> Larry
>
> zohar wrote:
>> after I did the quick fix I got something like for each jar:
>>
>> Invalid classpath publish/export dependency
>> /Project/lib/commons-codec-1.3.jar. Dependencies for non-web projects
>> must be exported.
>>
>> What's that?
>>
>> "Larry Isaacs" <Larry.Isaacs@sas.com> wrote in message
>> news:fefrln$v03$1@build.eclipse.org...
>>> I'm not sure if the "Quick Fix" API supports handling more than one
>>> problem at a time. I would guess that the "Quick Fix" approach wasn't
>>> chosen because of its desirability, but simply because it didn't require
>>> any new API to be added. I'm not sure what is planned for the future
>>> with respect to improved UI for this feature, but I would also guess
>>> that will likely require support to be added outside of WTP, probably in
>>> JDT.
>>>
>>> Cheers,
>>> Larry
>>>
>>> zohar wrote:
>>>> Thanks.
>>>> One thing though - any reason why I cannot select multiple warnings and
>>>> fix them all at once?
>>>>
>>>> BTW: if there's ever a contest for the most helpful person on this (and
>>>> other) newsgroup - you have my vote.
>>>>
>>>> "Larry Isaacs" <Larry.Isaacs@sas.com> wrote in message
>>>> news:fedfph$5vs$1@build.eclipse.org...
>>>>> In WTP 2.0, you should see a warning in the Problems view like the
>>>>> following:
>>>>>
>>>>> Classpath entry <your exported jar> will not be exported or published.
>>>>> Runtime ClassNotFoundExceptions may result.
>>>>>
>>>>> The only UI way to have the jar included is to use the Quick Fix on
>>>>> this problem item. If you have done this and the jar is still not
>>>>> being included, it would be a bug.
>>>>>
>>>>> Cheers,
>>>>> Larry
>>>>>
>>>>> zohar wrote:
>>>>>> Hi,
>>>>>> I've asked about this before, but I hope there's been some progress
>>>>>> since...
>>>>>> I have a Web project which depends on another java project. The java
>>>>>> project uses some jar file (they are marked to be exported in that
>>>>>> project's build path's export tab). When I export my web project to a
>>>>>> WAR file those jar files are not included in that WAR file.
>>>>>> Any way of making them being included?
>>
Re: dependant project's libs [message #201637 is a reply to message #201620] Tue, 09 October 2007 15:53 Go to previous messageGo to next message
Zohar Amir is currently offline Zohar AmirFriend
Messages: 419
Registered: July 2009
Senior Member
I just run the 'Validate' on those projects and it got OK...

"Larry Isaacs" <Larry.Isaacs@sas.com> wrote in message
news:feg6ov$st3$1@build.eclipse.org...
> It means you haven't exported that jar in the utility project. You will
> need to export it to fix the error.
>
> Larry
>
> zohar wrote:
>> after I did the quick fix I got something like for each jar:
>>
>> Invalid classpath publish/export dependency
>> /Project/lib/commons-codec-1.3.jar. Dependencies for non-web projects
>> must be exported.
>>
>> What's that?
>>
>> "Larry Isaacs" <Larry.Isaacs@sas.com> wrote in message
>> news:fefrln$v03$1@build.eclipse.org...
>>> I'm not sure if the "Quick Fix" API supports handling more than one
>>> problem at a time. I would guess that the "Quick Fix" approach wasn't
>>> chosen because of its desirability, but simply because it didn't require
>>> any new API to be added. I'm not sure what is planned for the future
>>> with respect to improved UI for this feature, but I would also guess
>>> that will likely require support to be added outside of WTP, probably in
>>> JDT.
>>>
>>> Cheers,
>>> Larry
>>>
>>> zohar wrote:
>>>> Thanks.
>>>> One thing though - any reason why I cannot select multiple warnings and
>>>> fix them all at once?
>>>>
>>>> BTW: if there's ever a contest for the most helpful person on this (and
>>>> other) newsgroup - you have my vote.
>>>>
>>>> "Larry Isaacs" <Larry.Isaacs@sas.com> wrote in message
>>>> news:fedfph$5vs$1@build.eclipse.org...
>>>>> In WTP 2.0, you should see a warning in the Problems view like the
>>>>> following:
>>>>>
>>>>> Classpath entry <your exported jar> will not be exported or published.
>>>>> Runtime ClassNotFoundExceptions may result.
>>>>>
>>>>> The only UI way to have the jar included is to use the Quick Fix on
>>>>> this problem item. If you have done this and the jar is still not
>>>>> being included, it would be a bug.
>>>>>
>>>>> Cheers,
>>>>> Larry
>>>>>
>>>>> zohar wrote:
>>>>>> Hi,
>>>>>> I've asked about this before, but I hope there's been some progress
>>>>>> since...
>>>>>> I have a Web project which depends on another java project. The java
>>>>>> project uses some jar file (they are marked to be exported in that
>>>>>> project's build path's export tab). When I export my web project to a
>>>>>> WAR file those jar files are not included in that WAR file.
>>>>>> Any way of making them being included?
>>
Re: dependant project's libs [message #201645 is a reply to message #201629] Tue, 09 October 2007 16:24 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
Yes. That worked for me in a simple test case. Assuming the
/lib/commons-codec-1.3.jar in the "Project" project is exported, it may
be that something didn't cause the problem item to disappear when it
should. You might try un-exporting commons-codec-1.3.jar, save,
re-export, and save to give it another kick to try to get the problem
item to disappear.

Larry

zohar wrote:
> In 'Java Build Path' -> 'Order and Export' it is checked...
> Is that the right place?
>
> "Larry Isaacs" <Larry.Isaacs@sas.com> wrote in message
> news:feg6ov$st3$1@build.eclipse.org...
>> It means you haven't exported that jar in the utility project. You will
>> need to export it to fix the error.
>>
>> Larry
>>
>> zohar wrote:
>>> after I did the quick fix I got something like for each jar:
>>>
>>> Invalid classpath publish/export dependency
>>> /Project/lib/commons-codec-1.3.jar. Dependencies for non-web projects
>>> must be exported.
>>>
>>> What's that?
>>>
>>> "Larry Isaacs" <Larry.Isaacs@sas.com> wrote in message
>>> news:fefrln$v03$1@build.eclipse.org...
>>>> I'm not sure if the "Quick Fix" API supports handling more than one
>>>> problem at a time. I would guess that the "Quick Fix" approach wasn't
>>>> chosen because of its desirability, but simply because it didn't require
>>>> any new API to be added. I'm not sure what is planned for the future
>>>> with respect to improved UI for this feature, but I would also guess
>>>> that will likely require support to be added outside of WTP, probably in
>>>> JDT.
>>>>
>>>> Cheers,
>>>> Larry
>>>>
>>>> zohar wrote:
>>>>> Thanks.
>>>>> One thing though - any reason why I cannot select multiple warnings and
>>>>> fix them all at once?
>>>>>
>>>>> BTW: if there's ever a contest for the most helpful person on this (and
>>>>> other) newsgroup - you have my vote.
>>>>>
>>>>> "Larry Isaacs" <Larry.Isaacs@sas.com> wrote in message
>>>>> news:fedfph$5vs$1@build.eclipse.org...
>>>>>> In WTP 2.0, you should see a warning in the Problems view like the
>>>>>> following:
>>>>>>
>>>>>> Classpath entry <your exported jar> will not be exported or published.
>>>>>> Runtime ClassNotFoundExceptions may result.
>>>>>>
>>>>>> The only UI way to have the jar included is to use the Quick Fix on
>>>>>> this problem item. If you have done this and the jar is still not
>>>>>> being included, it would be a bug.
>>>>>>
>>>>>> Cheers,
>>>>>> Larry
>>>>>>
>>>>>> zohar wrote:
>>>>>>> Hi,
>>>>>>> I've asked about this before, but I hope there's been some progress
>>>>>>> since...
>>>>>>> I have a Web project which depends on another java project. The java
>>>>>>> project uses some jar file (they are marked to be exported in that
>>>>>>> project's build path's export tab). When I export my web project to a
>>>>>>> WAR file those jar files are not included in that WAR file.
>>>>>>> Any way of making them being included?
>
>
Re: dependant project's libs [message #208907 is a reply to message #201645] Thu, 21 February 2008 14:47 Go to previous messageGo to next message
Wolfgang Röckelein is currently offline Wolfgang RöckeleinFriend
Messages: 122
Registered: July 2009
Senior Member
Hi,

>> "Larry Isaacs" <Larry.Isaacs@sas.com> wrote in message
>> news:feg6ov$st3$1@build.eclipse.org...
>>> It means you haven't exported that jar in the utility project. You
>>> will need to export it to fix the error.

Why is it necessary to export the jar?

For applications Eclipse makes a IMHO correct distinctions:
jars which are not exported are not visible e.g. for code-assist but are included at runtime.
Also tools like the FatJar include the non-exported jars.

How can I accomplish this (jar is included in the WEB-INF/lib for tun-time but not visible at design time? This is helpful eg for driver jars which are dynamically loaded. I do not want the driver
classes to be visible to the programmers as to not accidentally introduce dependencies on them them but they are obviously needed at runtime.

Thanks,
Wolfgang
Re: dependant project's libs [message #208949 is a reply to message #208907] Fri, 22 February 2008 14:34 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
Wolfgang Röckelein wrote:
> Hi,
>
>>> "Larry Isaacs" <Larry.Isaacs@sas.com> wrote in message
>>> news:feg6ov$st3$1@build.eclipse.org...
>>>> It means you haven't exported that jar in the utility project. You
>>>> will need to export it to fix the error.
>
> Why is it necessary to export the jar?
>
> For applications Eclipse makes a IMHO correct distinctions:
> jars which are not exported are not visible e.g. for code-assist but are
> included at runtime.
> Also tools like the FatJar include the non-exported jars.
>
> How can I accomplish this (jar is included in the WEB-INF/lib for
> tun-time but not visible at design time? This is helpful eg for driver
> jars which are dynamically loaded. I do not want the driver classes to
> be visible to the programmers as to not accidentally introduce
> dependencies on them them but they are obviously needed at runtime.
>
> Thanks,
> Wolfgang

The issue relates to the difference between Java applications and Java
EE applications. By this I mean that Java applications typically have a
single classloader containing all the application jars and classes. For
Java EE applications, the Java EE application server typically provides
a classloader hierarchy including server supplied classloaders and a
classloader for the Java EE application(s). For Java EE applications in
Eclipse, the choice of exporting or not exporting is used to distinguish
between jars that belong in the Java EE application's classloader and
jars that will be available in the server supplied classloaders.

I'm not aware of a standard way to include a jar in WEB-INF/lib and not
have it visible at build/design time. Beyond using a custom Ant task to
build a war with extra "non-design time" jars included, I'm not sure
what other approaches might be available.

Cheers,
Larry
Re: dependant project's libs [message #208955 is a reply to message #208907] Fri, 22 February 2008 15:12 Go to previous messageGo to next message
Rob Frost is currently offline Rob FrostFriend
Messages: 64
Registered: July 2009
Member
The requirement to export cp entries in dependent projects that are marked
for publish/export was removed in 3.0 M4 and 2.0.2 (the error is replaced
with a warning), see https://bugs.eclipse.org/bugs/show_bug.cgi?id=198338

-Rob

"Wolfgang R
Re: dependant project's libs [message #208971 is a reply to message #208955] Fri, 22 February 2008 18:58 Go to previous messageGo to next message
Wolfgang Röckelein is currently offline Wolfgang RöckeleinFriend
Messages: 122
Registered: July 2009
Senior Member
Rob Frost wrote:
> The requirement to export cp entries in dependent projects that are marked
> for publish/export was removed in 3.0 M4 and 2.0.2 (the error is replaced
> with a warning), see https://bugs.eclipse.org/bugs/show_bug.cgi?id=198338

Yes, but the jars are not included in the WEB-INF/lib directory for tun-time availability.

The post news://news.eclipse.org:119/fpmmhf$7d6$1@build.eclipse.org from Larry made this clear,
however I am not wholly convinced that it is wise to have two different meanings
- J2EE: if not exported, jar is not in the war and not available for a run on server from eclipse
- Java: if not exported, jar is available for eg application run from eclipse
for the same setting (export jar mark), esp when it comes to Utility Projects that can be used in both settings
(or rather not really used in both settings because of this issue...

BTW, Larry: When everything is controlled by the export mark, why is then the additional marker set with the quick fix necessary?

Regards,
Wolfgang
Re: dependant project's libs [message #208987 is a reply to message #208971] Fri, 22 February 2008 20:44 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
Wolfgang Röckelein wrote:
> Rob Frost wrote:
>> The requirement to export cp entries in dependent projects that are
>> marked for publish/export was removed in 3.0 M4 and 2.0.2 (the error
>> is replaced with a warning), see
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=198338
>
> Yes, but the jars are not included in the WEB-INF/lib directory for
> tun-time availability.
>
> The post news://news.eclipse.org:119/fpmmhf$7d6$1@build.eclipse.org from
> Larry made this clear,
> however I am not wholly convinced that it is wise to have two different
> meanings
> - J2EE: if not exported, jar is not in the war and not available for a
> run on server from eclipse
> - Java: if not exported, jar is available for eg application run from
> eclipse
> for the same setting (export jar mark), esp when it comes to Utility
> Projects that can be used in both settings
> (or rather not really used in both settings because of this issue...
>
> BTW, Larry: When everything is controlled by the export mark, why is
> then the additional marker set with the quick fix necessary?
>
> Regards,
> Wolfgang

Rob is saying that I am wrong for WTP 2.0.2 and WTP 3.0 M4 and later.
If you don't export, you still get the jar in WEB-INF/lib but you will
have to live with a warning in the Problems view for this use case. I
think that is what Bug 198338 was about.

Cheers,
Larry
Re: dependant project's libs [message #208996 is a reply to message #208971] Fri, 22 February 2008 20:46 Go to previous message
Rob Frost is currently offline Rob FrostFriend
Messages: 64
Registered: July 2009
Member
hi Wolfgang,

The JARs represented by those classpath entries certainly should be added to
the WEB-INF/lib directory of the referencing dynamic web project when it is
exported as a WAR or published despite not being exported on the Java build
path (they do need the "publish/export" attribute; I just verified this
behavior using WTP 3.0 and Tomcat 6.0).

If you are not seeing them in WEB-INF/lib it is a bug so please open a
bugzilla with appropriate repro steps.

FYI: the export check is performed for the validator; actual contribution
to the published/exported module structure is governed by the dependency cp
entry attribute (see
http://wiki.eclipse.org/ClasspathEntriesPublishExportSupport for full
details on this functionality).

Larry: if you've encountered issues with this yourself (or belief I should
revert back to the old behavior of enforcing the export with an error), let
me know.

Hope this helps,

Rob

"Wolfgang R
Previous Topic:Replacing org.eclipse.jst.servlet.ui.project.facet.WebFacetInstallPage
Next Topic:Content assist on own facet
Goto Forum:
  


Current Time: Thu Apr 18 23:23:28 GMT 2024

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

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

Back to the top