Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » extending dynamic webproject
extending dynamic webproject [message #186468] Thu, 18 January 2007 14:21 Go to next message
Eclipse UserFriend
Originally posted by: mremme.braintags.de

Hi all,

i just started to switch from sysdeo to webtools. So far all is working
fine but i have a problem to get the following scenario run:

project A is a utility project
project B is a dynamic WebProject within a servlet
project C is a dynamic WebProject, too, which extends classes from project B

I defined the dependencies by both, the project classpath and i defined
the J2EE Module Dependencies as far as i could by adding the project A
to B and C.
Additionally i added a jar-file of Project B to project C which brings
my system to run without ClassNotFound.

Now i would like to rebuild automatically the linked jar file when i am
starting or restarting the tomcat. Is there a known way to manage this?

In the worse case i would try to add an ant build into the catalina, but
i beleive that there is existing a more integrated way.

Thanks in advance,

Michael
Re: extending dynamic webproject [message #186525 is a reply to message #186468] Thu, 18 January 2007 22:06 Go to previous messageGo to next message
Dario Bassan is currently offline Dario BassanFriend
Messages: 8
Registered: July 2009
Junior Member
Michael,
I'm not sure to understand your issue.
I'm working with Eclispe 3.2 + WTP 1.5.2 or Rational v7 (that's based on
the same Eclispe and WTP Level) and "Build Automatically" as workspace
preference.
I'm working with Tomcat 5.5 and WebSphere v6.1.

When you reference your Java Project using J2EE Module Dependencies or
Web Libraries the build path and when you change your code (in Utility
or Webapp prj) it's automatically published (if your server is
"Running") or mark your server with state="Republish" if it's stopped.
WTP will publish when you will start it.

When everything is OK the server has state="Synchronized".

Take a look to server state and the code deployed directory in your
workspace:

..metadata/org.eclipse.wst.server.core/tmp0/webapps (Tomcat)
..metadata/org.eclipse.wst.server.core/tmp0 (WebSphere v6.1)

Dario
Re: extending dynamic webproject [message #186544 is a reply to message #186525] Fri, 19 January 2007 08:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mremme.braintags.de

Dario,

merci for this hint. I am sure i did not manage to outline my question correct.
I am working with eclipse 3.2, WTP 1.5.2, Tomcat 5.5.2
The thing is:
as i understood i can link utility projects into a dynamic web project which results into an automaticly buildt and
synchronized jar file inside my webapp like you described.
Now i would like to reach that the sources of this dynamic webproject are synchronized the same way into another dynamic
webproject.
I tried a lot of things like linking the source directly, manually editing the
..settings/org.eclipse.wst.common.component or the facets files. But each of those tests produced some other problems.
At the end the only way i saw is to produce a jar from the first dynamic webproject and to link this jar inside the J2EE
Module Dependencies into the second dynamic webproject.

Of couse this is working, but this means that i have to rebuild the jar file manually each time i am changing somethings
in the fist webproject. Because i am lazy and because i am having several dependencies like that i would like to process
an automatic build when the server requires a refresh / synchronization.

Hope i described better what i mean, now.

Michael

Dario schrieb:
> Michael,
> I'm not sure to understand your issue.
> I'm working with Eclispe 3.2 + WTP 1.5.2 or Rational v7 (that's based on
> the same Eclispe and WTP Level) and "Build Automatically" as workspace
> preference.
> I'm working with Tomcat 5.5 and WebSphere v6.1.
>
> When you reference your Java Project using J2EE Module Dependencies or
> Web Libraries the build path and when you change your code (in Utility
> or Webapp prj) it's automatically published (if your server is
> "Running") or mark your server with state="Republish" if it's stopped.
> WTP will publish when you will start it.
>
> When everything is OK the server has state="Synchronized".
>
> Take a look to server state and the code deployed directory in your
> workspace:
>
> .metadata/org.eclipse.wst.server.core/tmp0/webapps (Tomcat)
> .metadata/org.eclipse.wst.server.core/tmp0 (WebSphere v6.1)
>
> Dario
Re: extending dynamic webproject [message #186552 is a reply to message #186544] Fri, 19 January 2007 15:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: kosta.bea.com

Would it work to factor out the code of the one web project that you
want to reference in the other one into a separate utility project that
both web apps can reference?

- Konstantin
Re: extending dynamic webproject [message #186573 is a reply to message #186552] Fri, 19 January 2007 15:48 Go to previous message
Eclipse UserFriend
Originally posted by: mremme.braintags.de

Hi Konstantin,

if possible i would like to avoid exactly that. First we are working in a team of 5 people here, additionally some
externals. Second much more i would loose some parts of our svn history - i am too much chicken to risk that :-)

As an interim solution i now added some ant builders into the project which are updating the jars automatic.

Second i played a little bit with your article about extending facets. Although i think this is not the sollution
neither this brought me to take a closer look to other extension points and just at that time i found the nice extension
point org.eclipse.wst.server.core.publishTasks which seems to bring me to the aim.

best, Michael

Konstantin Komissarchik schrieb:
> Would it work to factor out the code of the one web project that you
> want to reference in the other one into a separate utility project that
> both web apps can reference?
>
> - Konstantin
Previous Topic:eclipse is very slow
Next Topic:Codebase of generator: XSD Schema -> XML instance
Goto Forum:
  


Current Time: Sat Apr 20 04:28:17 GMT 2024

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

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

Back to the top