Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » WTP0.7 - JAR Dependency handling: Regression from 1.0M5 ??
WTP0.7 - JAR Dependency handling: Regression from 1.0M5 ?? [message #134876] Thu, 25 August 2005 10:19 Go to next message
Eclipse UserFriend
Originally posted by: Laurentd75_nosp_am.yahoo.fr

Hi folks,

****************
*** SYNOPSIS ***
****************

I have been longing for WTP to correctly handle dependencies between
projects, and this was delivered in 1.0M5 released last June: a new "Java
JAR dependencies" page was added to the Project properties dialog, where
one can select utility projects to add as Web library projects to a Web
module.

However, it seems that the subsequent I-builds, and the final 0.7 build
are broken in this respect: the "Java JAR dependencies" page no longer
lists the other projects in the workspace that can be added as utility
modules.
The only way to achieve correct dependency handling seems to manually edit
the .classpath file, as explained further below.

***************
*** EXAMPLE ***
***************

1) Create a dynamic Web project called "TestDep_Master".
2) Create a utility Java project called "TestDep_Util".
3) in "TestDepUtil" create a new class called UtilBean
(see source below):

package testdep.util;

public class UtilBean {
public String value;
public String getValue() { return value; }
public void setValue(String value) { this.value = value; }
}

4) Now, back to the "TestDep_Master" Web project, create a servlet that
uses the class we just created in the Java utility project (see source
below):

package testdep.servlet;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import testdep.util.UtilBean;

public class TestServlet extends HttpServlet {

public TestServlet() { super(); }

protected void doGet(HttpServletRequest req,
HttpServletResponse res)
throws ServletException, IOException {

UtilBean bean = new testdep.util.UtilBean();
bean.setValue("Hello, world!");
PrintWriter pw = res.getWriter();
pw.println("<html><body>");
pw.println("<p>" + bean.getValue() + "</p>");
pw.println("</body></html>");
}
}

5) of course, you will need to add the TestDep_Util project to the Java
build path of the TestDep_Master project so that the latter compiles OK.

6) The previous step is NOT enough for the servlet to execute correctly
when deployed to the server: what we need is to tell WTP that classes from
the TestDep_Util project must be exported to the server as well. This is
what the "Java JAR dependencies" page in the Project properties dialog is
for.

When you select "Project properties" for TestDep_Master in WTP1.0M5 and go
to the "Java JAR dependencies" page, the "TestDep_Util" project will
appear in the grid listing workspace projects, and you can tick the
checkbox next to its name to have it deployed as a utility project when
TestDep_Master is executed on the server.

Unfortunately, this seems broken in latter I-builds and in the final WTP
0.7 release: the "Java JAR dependencies" page is still there, but it
doesn't list any projects !

Consequently, the "TestDep-Master" project cannot execute correctly in the
server, cause the sservlet's dependency on the TestDep_Util cannot be
satisfied.

THERE IS A WORKAROUND though, that involves MANUALLY EDITING the
classpath file of the Web project in WTP 0.7 to mimic the action
performed in M5 when adjusting settings in the "Java JAR dependencies"
page:

You just have to add a new "classpathentry" element to the .classpath
file of the TestDep_Master project, as examplified below:

<classpathentry exported="true" kind="src" path="/TestDep_Util"/>


After this is done, the TestDep_Master projec will run smoothly on the
server, since the TestDep_Util project will get deployed as a JAR file
inside the Webapp's "lib/" folder (you can check for yourself in Eclipse's
Navigator window by browsing through the "TestDep_Master/.deployables"
folder).


*******************
*** WRAPPING UP ***
*******************

- Is anybody in the WTP team aware of this regression, and possibly of any
underlying reasons for it ???

- Against which WTP component should I submit a bug report for this ???
(my best guess would be "jst.j2ee", but I'm not sure)

- Any plans or hope that this will be addressed shortly in an upcoming
maintenance release ?


Many thanks or your feedback,

Laurent
Re: WTP0.7 - JAR Dependency handling: Regression from 1.0M5 ?? [message #134891 is a reply to message #134876] Thu, 25 August 2005 10:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ns_dkerber.ns_WarrenRogersAssociates.com

In article <ac40ea4ee3c93355bf3e80d45ae1f88a$1@www.eclipse.org>,
Laurentd75_nosp_am@yahoo.fr says...
>
> Hi folks,
>
> ****************
> *** SYNOPSIS ***
> ****************
>
> I have been longing for WTP to correctly handle dependencies between
> projects, and this was delivered in 1.0M5 released last June: a new "Java
> JAR dependencies" page was added to the Project properties dialog, where
> one can select utility projects to add as Web library projects to a Web
> module.

It works for me. I installed the all-in-one Eclipse/wtp about 3 weeks
ago, and have a project exactly like your description below. The only
issue I have with it is that I *don't* want the dependent jar to be put
into the deployment war, because it's a library which is used in
multiple projects, and I deploy it separately to the tomcat server. To
accomplish this, I need to turn off the Java Jar Dependencies
temporarily when I build the war, and then turn it back on for debugging
on my development machine.

.....

--
Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).
Re: WTP0.7 - JAR Dependency handling: Regression from 1.0M5 ?? [message #134916 is a reply to message #134891] Thu, 25 August 2005 11:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Laurentd75_nosp_am.yahoo.fr

David Kerber wrote:

> It works for me. I installed the all-in-one Eclipse/wtp about 3 weeks
> ago, and have a project exactly like your description below.

Hi David,

I'm a bit skeptical about your statement. Are you able to demonstrate your
point by detailing the procedure to go through in WTP0.7 so that a Web
project ("WebProj") making use of another Java project ("UtilProj") gets
correctly deployed with "UtilProj.jar" copied in its WEB-INF/lib folder ?

Obviously I'm talking of a procedure other than manually editing the Web
project's .classpath file, a workaround which I already covered in my
original message.

Regards,
Laurent
Re: WTP0.7 - JAR Dependency handling: Regression from 1.0M5 ?? [message #134929 is a reply to message #134876] Thu, 25 August 2005 11:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Laurentd75_nosp_am.yahoo.fr

PROBLEM SEEMS CORRECTED IN R0.7 MAINTENANCE RELEASE M20050819
(and onwards, hopefully..)

I just installed a fresh Eclipse 3.1 with WTP 0.7 build M20050819, and the
"Java JAR dependencies" page in Project properties now works as expected.

Moreover, any settings in this page seem now to be (logically) linked with
settings in the "Projects" tab of the "Java Build Path" page: if you
add/delete a project in either of these 2 pages, the change will get
reflected in the other, which makes good sense to me !!

Haven't tried in the latter maintenance builds, cause I'm a bit worried
about the number of warnings / JUnit failures / API violations that they
exhibit. I'm a little concerned these builds may be far less stable than
M20050819 that only has a few compilation warnings, but no JUnit failures
or API violations.

(To see the numbers, go to http://download.eclipse.org/webtools/downloads/
and scroll down to the "R0.7 Stream Maintenance Builds" heading).


I'm still a bit worried that such an obvious bug (a regression bug) was
left in the final 0.7 release...

LASTLY, SPEAKING OF BUGS: where can I the list of corrected bugs in a
particular maintenance build ??
When you go to the download page for a particular build (e.g.
http://download.eclipse.org/webtools/downloads/drops/M-M2005 0819-200508191754/),
you see a few links, one of which is "Build notes", nbut is doesn't
contain any info most of the time. I cannot find a "list of corrected bugs
in this build" section anywhere...
Re: WTP0.7 - JAR Dependency handling: Regression from 1.0M5 ?? [message #134992 is a reply to message #134916] Thu, 25 August 2005 12:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ns_dkerber.ns_WarrenRogersAssociates.com

In article <c449496a249a4db879235e0eb5f0726d$1@www.eclipse.org>,
Laurentd75_nosp_am@yahoo.fr says...
> David Kerber wrote:
>
> > It works for me. I installed the all-in-one Eclipse/wtp about 3 weeks
> > ago, and have a project exactly like your description below.
>
> Hi David,
>
> I'm a bit skeptical about your statement. Are you able to demonstrate your
> point by detailing the procedure to go through in WTP0.7 so that a Web
> project ("WebProj") making use of another Java project ("UtilProj") gets
> correctly deployed with "UtilProj.jar" copied in its WEB-INF/lib folder ?

LIke I said, I *don't* want the .jar inside the .war file in my project,
and it put it in there the first time I tried to export the .war.
However, I noticed in your later message that a later build seems to
work. That's probably the one I have, since I only downloaded about 3
weeks ago.


> Obviously I'm talking of a procedure other than manually editing the Web
> project's .classpath file, a workaround which I already covered in my
> original message.

I've never done that, and in fact don't even know where that file is.


--
Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).
Re: WTP0.7 - JAR Dependency handling: Regression from 1.0M5 ?? [message #135038 is a reply to message #134876] Thu, 25 August 2005 14:45 Go to previous messageGo to next message
Eclipse UserFriend
Hi Laurent,

Yes, I have noticed the same bug, and tried bypassing it by manually editing
..wtpmodules but with limited success. (I have posted on this yesterday).

"Laurent D" <Laurentd75_nosp_am@yahoo.fr> wrote in message
news:ac40ea4ee3c93355bf3e80d45ae1f88a$1@www.eclipse.org...
>
> Hi folks,
>
> ****************
> *** SYNOPSIS ***
> ****************
>
> I have been longing for WTP to correctly handle dependencies between
> projects, and this was delivered in 1.0M5 released last June: a new "Java
> JAR dependencies" page was added to the Project properties dialog, where
> one can select utility projects to add as Web library projects to a Web
> module.
>
> However, it seems that the subsequent I-builds, and the final 0.7 build
> are broken in this respect: the "Java JAR dependencies" page no longer
> lists the other projects in the workspace that can be added as utility
> modules.
> The only way to achieve correct dependency handling seems to manually edit
> the .classpath file, as explained further below.
>
> ***************
> *** EXAMPLE ***
> ***************
> 1) Create a dynamic Web project called "TestDep_Master". 2) Create a
> utility Java project called "TestDep_Util".
> 3) in "TestDepUtil" create a new class called UtilBean
> (see source below):
>
> package testdep.util;
>
> public class UtilBean {
> public String value;
> public String getValue() { return value; }
> public void setValue(String value) { this.value = value; } }
>
> 4) Now, back to the "TestDep_Master" Web project, create a servlet that
> uses the class we just created in the Java utility project (see source
> below):
>
> package testdep.servlet;
> import java.io.*;
> import javax.servlet.*;
> import javax.servlet.http.*;
> import testdep.util.UtilBean;
>
> public class TestServlet extends HttpServlet {
>
> public TestServlet() { super(); }
> protected void doGet(HttpServletRequest req, HttpServletResponse res)
> throws ServletException, IOException {
> UtilBean bean = new testdep.util.UtilBean();
> bean.setValue("Hello, world!");
> PrintWriter pw = res.getWriter();
> pw.println("<html><body>");
> pw.println("<p>" + bean.getValue() + "</p>");
> pw.println("</body></html>");
> } }
>
> 5) of course, you will need to add the TestDep_Util project to the Java
> build path of the TestDep_Master project so that the latter compiles OK.
> 6) The previous step is NOT enough for the servlet to execute correctly
> when deployed to the server: what we need is to tell WTP that classes from
> the TestDep_Util project must be exported to the server as well. This is
> what the "Java JAR dependencies" page in the Project properties dialog is
> for.
> When you select "Project properties" for TestDep_Master in WTP1.0M5 and go
> to the "Java JAR dependencies" page, the "TestDep_Util" project will
> appear in the grid listing workspace projects, and you can tick the
> checkbox next to its name to have it deployed as a utility project when
> TestDep_Master is executed on the server.
>
> Unfortunately, this seems broken in latter I-builds and in the final WTP
> 0.7 release: the "Java JAR dependencies" page is still there, but it
> doesn't list any projects !
>
> Consequently, the "TestDep-Master" project cannot execute correctly in the
> server, cause the sservlet's dependency on the TestDep_Util cannot be
> satisfied.
>
> THERE IS A WORKAROUND though, that involves MANUALLY EDITING the classpath
> file of the Web project in WTP 0.7 to mimic the action performed in M5
> when adjusting settings in the "Java JAR dependencies" page:
>
> You just have to add a new "classpathentry" element to the .classpath
> file of the TestDep_Master project, as examplified below:
>
> <classpathentry exported="true" kind="src" path="/TestDep_Util"/>
>
>
> After this is done, the TestDep_Master projec will run smoothly on the
> server, since the TestDep_Util project will get deployed as a JAR file
> inside the Webapp's "lib/" folder (you can check for yourself in Eclipse's
> Navigator window by browsing through the "TestDep_Master/.deployables"
> folder).
>
>
> *******************
> *** WRAPPING UP ***
> *******************
>
> - Is anybody in the WTP team aware of this regression, and possibly of any
> underlying reasons for it ???
>
> - Against which WTP component should I submit a bug report for this ???
> (my best guess would be "jst.j2ee", but I'm not sure)
>
> - Any plans or hope that this will be addressed shortly in an upcoming
> maintenance release ?
>
>
> Many thanks or your feedback,
>
> Laurent
>
>
Re: WTP0.7 - JAR Dependency handling: Regression from 1.0M5 ?? [message #139565 is a reply to message #134876] Mon, 19 September 2005 19:54 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: laurentd75___no.sp_am.yahoo.fr

"Laurent D" <Laurentd75_nosp_am@yahoo.fr> a
Re: WTP0.7 - JAR Dependency handling: Regression from 1.0M5 ?? [message #140527 is a reply to message #134929] Sat, 24 September 2005 12:54 Go to previous messageGo to next message
Eclipse UserFriend
On Thu, 25 Aug 2005 11:43:50 -0400, Laurent D <Laurentd75_nosp_am@yahoo.=
fr> wrote:


>
> Haven't tried in the latter maintenance builds, cause I'm a bit worrie=
d
> about the number of warnings

No need to worry about the compiler warnings. They are the result of som=
e
changes to the default warnings displayed by compiler, not changes to th=
e
code (and actually represents an important fix to correct the version
of the compiler used to compile the code! :)

See
https://bugs.eclipse.org/bugs/show_bug.cgi?id=3D107117
for details. Was also discussed some on wtp-dev.
While we do need to clean them up they do not represent
any changes to the code itself.
Re: WTP0.7 - JAR Dependency handling: Regression from 1.0M5 ?? [message #140812 is a reply to message #140527] Mon, 26 September 2005 21:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: laurentd75___no.sp_am.yahoo.fr

"David Williams" wrote:

> No need to worry about the compiler warnings. They are the result of some
> changes to the default warnings displayed by compiler, not changes to the
code
> See https://bugs.eclipse.org/bugs/show_bug.cgi?id=107117 for details.

Hi David, and thanks for the tip.

In any case, I think I'll wait the upcoming release of 0.7.1 now !!

Cheers,
Laurent
Re: WTP0.7 - JAR Dependency handling: Regression from 1.0M5 ?? [message #143175 is a reply to message #134876] Tue, 11 October 2005 17:37 Go to previous message
Eclipse UserFriend
Originally posted by: pecanov.mt.net.mk

Does anyone have any information about this bug.
I am using Eclipse 3.1 with WTP 0.7.1 and the jar dependency list keeps
popping up empty, although several java projects are present in workspace.
Any luck with WTP M8 maybe?

thanx

Laurent D wrote:
>
> Hi folks,
>
> ****************
> *** SYNOPSIS ***
> ****************
>
> I have been longing for WTP to correctly handle dependencies between
> projects, and this was delivered in 1.0M5 released last June: a new
> "Java JAR dependencies" page was added to the Project properties dialog,
> where one can select utility projects to add as Web library projects to
> a Web module.
>
> However, it seems that the subsequent I-builds, and the final 0.7 build
> are broken in this respect: the "Java JAR dependencies" page no longer
> lists the other projects in the workspace that can be added as utility
> modules.
> The only way to achieve correct dependency handling seems to manually
> edit the .classpath file, as explained further below.
>
> ***************
> *** EXAMPLE ***
> ***************
>
> 1) Create a dynamic Web project called "TestDep_Master". 2) Create a
> utility Java project called "TestDep_Util".
> 3) in "TestDepUtil" create a new class called UtilBean
> (see source below):
>
> package testdep.util;
>
> public class UtilBean {
> public String value;
> public String getValue() { return value; }
> public void setValue(String value) { this.value = value; } }
>
> 4) Now, back to the "TestDep_Master" Web project, create a servlet that
> uses the class we just created in the Java utility project (see source
> below):
>
> package testdep.servlet;
> import java.io.*;
> import javax.servlet.*;
> import javax.servlet.http.*;
> import testdep.util.UtilBean;
>
> public class TestServlet extends HttpServlet {
>
> public TestServlet() { super(); }
>
> protected void doGet(HttpServletRequest req,
> HttpServletResponse res) throws
> ServletException, IOException {
> UtilBean bean = new testdep.util.UtilBean();
> bean.setValue("Hello, world!");
> PrintWriter pw = res.getWriter();
> pw.println("<html><body>");
> pw.println("<p>" + bean.getValue() + "</p>");
> pw.println("</body></html>");
> } }
>
> 5) of course, you will need to add the TestDep_Util project to the Java
> build path of the TestDep_Master project so that the latter compiles OK.
> 6) The previous step is NOT enough for the servlet to execute correctly
> when deployed to the server: what we need is to tell WTP that classes
> from the TestDep_Util project must be exported to the server as well.
> This is what the "Java JAR dependencies" page in the Project properties
> dialog is for.
> When you select "Project properties" for TestDep_Master in WTP1.0M5 and
> go to the "Java JAR dependencies" page, the "TestDep_Util" project will
> appear in the grid listing workspace projects, and you can tick the
> checkbox next to its name to have it deployed as a utility project when
> TestDep_Master is executed on the server.
>
> Unfortunately, this seems broken in latter I-builds and in the final WTP
> 0.7 release: the "Java JAR dependencies" page is still there, but it
> doesn't list any projects !
>
> Consequently, the "TestDep-Master" project cannot execute correctly in
> the server, cause the sservlet's dependency on the TestDep_Util cannot
> be satisfied.
>
> THERE IS A WORKAROUND though, that involves MANUALLY EDITING the
> classpath file of the Web project in WTP 0.7 to mimic the action
> performed in M5 when adjusting settings in the "Java JAR dependencies"
> page:
>
> You just have to add a new "classpathentry" element to the .classpath
> file of the TestDep_Master project, as examplified below:
>
> <classpathentry exported="true" kind="src" path="/TestDep_Util"/>
>
>
> After this is done, the TestDep_Master projec will run smoothly on the
> server, since the TestDep_Util project will get deployed as a JAR file
> inside the Webapp's "lib/" folder (you can check for yourself in
> Eclipse's Navigator window by browsing through the
> "TestDep_Master/.deployables" folder).
>
>
> *******************
> *** WRAPPING UP ***
> *******************
>
> - Is anybody in the WTP team aware of this regression, and possibly of
> any underlying reasons for it ???
>
> - Against which WTP component should I submit a bug report for this ???
> (my best guess would be "jst.j2ee", but I'm not sure)
>
> - Any plans or hope that this will be addressed shortly in an upcoming
> maintenance release ?
>
>
> Many thanks or your feedback,
>
> Laurent
>
>
Previous Topic:XML editor fails after using ANT editor on file
Next Topic:ant script to add user library ?
Goto Forum:
  


Current Time: Mon May 12 09:23:56 EDT 2025

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

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

Back to the top