Home » Language IDEs » ServerTools (WTP) » dependant project's libs
dependant project's libs [message #201482] |
Mon, 08 October 2007 06:34  |
Eclipse User |
|
|
|
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 08:20   |
Eclipse User |
|
|
|
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 10:30   |
Eclipse User |
|
|
|
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 11:29   |
Eclipse User |
|
|
|
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 11:52   |
Eclipse User |
|
|
|
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 11:53   |
Eclipse User |
|
|
|
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 12:24   |
Eclipse User |
|
|
|
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 #208971 is a reply to message #208955] |
Fri, 22 February 2008 13:58   |
Eclipse User |
|
|
|
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 15:44   |
Eclipse User |
|
|
|
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 15:46  |
Eclipse User |
|
|
|
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
|
|
|
Goto Forum:
Current Time: Sat May 10 19:32:23 EDT 2025
Powered by FUDForum. Page generated in 0.05662 seconds
|