Home » Language IDEs » ServerTools (WTP) » Need guidance - WTP vs. existing projects
Need guidance - WTP vs. existing projects [message #137135] |
Wed, 07 September 2005 21:19 |
Eclipse User |
|
|
|
Originally posted by: luxmatic.hotmail.com
I've a simple goal - grabbing an open source servlet-based project (Xwiki
in this case, but my question is general in nature) and
editing/running/debugging the project within Eclipse. It appears that WTP
is the way to go here - it certainly seems capable of doing this.
I'm comfortable enough with Eclipse to create a new Java project based on
this source, it compiles fine, etc. I'm actually impressed with how
simple this aspect was to set up.
On the other hand, *running/debugging* this project under Eclipse/WTP does
not appear to be simple. I can't figure it out - the path to follow is
not obvious. How does one make this work via WTP? Is there some
fundamental thing I'm missing on the use of Eclipse/WTP that is making
this difficult?
I've come to the conclusion that my way of thinking just isn't compatible
with this toolset, so I'm hoping I can get some guidance.
Using Eclipse 3.1, and WTP 0.7.
|
|
|
Re: Need guidance - WTP vs. existing projects [message #137147 is a reply to message #137135] |
Wed, 07 September 2005 22:28 |
Eclipse User |
|
|
|
Originally posted by: erickson_d.yahoo.removethis.com
Amen, brother! I agree 100%. Sorry I can't offer any guidance myself,
but hopefully if there are enough people to whom this matters, and they
make themselves known, we can find an answer.
D. Brady wrote:
>
> I've a simple goal - grabbing an open source servlet-based project
> (Xwiki in this case, but my question is general in nature) and
> editing/running/debugging the project within Eclipse. It appears that
> WTP is the way to go here - it certainly seems capable of doing this.
>
> I'm comfortable enough with Eclipse to create a new Java project based
> on this source, it compiles fine, etc. I'm actually impressed with how
> simple this aspect was to set up.
>
> On the other hand, *running/debugging* this project under Eclipse/WTP
> does not appear to be simple. I can't figure it out - the path to
> follow is not obvious. How does one make this work via WTP? Is there
> some fundamental thing I'm missing on the use of Eclipse/WTP that is
> making this difficult?
>
> I've come to the conclusion that my way of thinking just isn't
> compatible with this toolset, so I'm hoping I can get some guidance.
>
> Using Eclipse 3.1, and WTP 0.7.
>
>
|
|
|
Re: Need guidance - WTP vs. existing projects [message #137320 is a reply to message #137135] |
Thu, 08 September 2005 12:48 |
Eclipse User |
|
|
|
Originally posted by: fredrik.andersson.adeprimo.se
D. Brady wrote:
>
> I've a simple goal - grabbing an open source servlet-based project
> (Xwiki in this case, but my question is general in nature) and
> editing/running/debugging the project within Eclipse. It appears that
> WTP is the way to go here - it certainly seems capable of doing this.
>
> I'm comfortable enough with Eclipse to create a new Java project based
> on this source, it compiles fine, etc. I'm actually impressed with how
> simple this aspect was to set up.
>
> On the other hand, *running/debugging* this project under Eclipse/WTP
> does not appear to be simple. I can't figure it out - the path to
> follow is not obvious. How does one make this work via WTP? Is there
> some fundamental thing I'm missing on the use of Eclipse/WTP that is
> making this difficult?
>
> I've come to the conclusion that my way of thinking just isn't
> compatible with this toolset, so I'm hoping I can get some guidance.
>
> Using Eclipse 3.1, and WTP 0.7.
>
>
If you have an existing war-file it's easy to import it as a Dynamic Web
Project. Just do File -> Import -> WAR-file and step through the wizard.
You may get duplicate entries in the library path for jar-files under
WEB-INF, but these are easy to remove in the resulting project's properties.
I've used this wizard successfully with various war-files such as the
OpenLaszlo-servlet and the Spring framework sample web applications.
/Fredrik
|
|
|
Re: Need guidance - WTP vs. existing projects [message #137518 is a reply to message #137320] |
Thu, 08 September 2005 20:45 |
Eclipse User |
|
|
|
Originally posted by: luxmatic.hotmail.com
Fredrik Andersson wrote:
> If you have an existing war-file it's easy to import it as a Dynamic Web
> Project. Just do File -> Import -> WAR-file and step through the wizard.
> You may get duplicate entries in the library path for jar-files under
> WEB-INF, but these are easy to remove in the resulting project's properties.
> I've used this wizard successfully with various war-files such as the
> OpenLaszlo-servlet and the Spring framework sample web applications.
> /Fredrik
That's good to know - thanks much...
It doesn't seem like it would be possible to coordinate the source changes
you make via the imported war (which you would have to package yourself
before the import) with the svn repository... or am I missing something?
|
|
|
Re: Need guidance - WTP vs. existing projects [message #137820 is a reply to message #137135] |
Fri, 09 September 2005 15:07 |
Eclipse User |
|
|
|
Originally posted by: luxmatic.hotmail.com
D. Brady wrote:
> I've come to the conclusion that my way of thinking just isn't compatible
> with this toolset, so I'm hoping I can get some guidance.
Save Fredrik's response, I've not received any help on this. Am I right
to assume that this toolset can't be used to work with projects that are
created outside of WTP? Or does it require much tweaking of obscure
configuration files? It certainly isn't possible to do this through the
UI. Or is it?
Thanks in advance for you insight...
|
|
|
Re: Need guidance - WTP vs. existing projects [message #137843 is a reply to message #137820] |
Fri, 09 September 2005 16:39 |
Eclipse User |
|
|
|
Originally posted by: ns_dkerber.ns_WarrenRogersAssociates.com
In article <543df16fad43209fe524237ed0f624f9$1@www.eclipse.org>,
luxmatic@hotmail.com says...
> D. Brady wrote:
>
> > I've come to the conclusion that my way of thinking just isn't compatible
> > with this toolset, so I'm hoping I can get some guidance.
>
> Save Fredrik's response, I've not received any help on this. Am I right
> to assume that this toolset can't be used to work with projects that are
> created outside of WTP? Or does it require much tweaking of obscure
> configuration files? It certainly isn't possible to do this through the
> UI. Or is it?
>
> Thanks in advance for you insight...
If I'm understanding you correctly, it is possible (and fairly easy) to
import a project created outside of Eclipse, but I don't think it's
possible (or at least not reasonable) to use both IDE's with the same
source directories. Once you import into Eclipse/WTP, you need to work
in there. When I did this, I left the original source folders on disk
untouched until I had everything working in Eclipse.
To run/debug in Eclipse on Tomcat, you need an installation of Tomcat on
your machine which you then set up as a server in Eclipse.
If that's not what you are asking, then please clarify exactly what you
are trying to do.
--
Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).
|
|
|
Re: Need guidance - WTP vs. existing projects [message #137985 is a reply to message #137843] |
Fri, 09 September 2005 21:44 |
Eclipse User |
|
|
|
Originally posted by: luxmatic.hotmail.com
> If I'm understanding you correctly, it is possible (and fairly easy) to
> import a project created outside of Eclipse, but I don't think it's
> possible (or at least not reasonable) to use both IDE's with the same
> source directories.
I could have a semantic problem here - why are you saying 'both IDEs'. I
(likely wrongly) consider Eclipse to be the IDE, and WTP to be an
extension to this IDE. Likewise, I think of Java, SVN, etc, to be
extensions to the IDE.
> Once you import into Eclipse/WTP, you need to work
> in there.
Is import the right term? I created a new Java project, pointed the
project to the 1st root project directory, and it nicely (and completely)
set everything up. It didn't change the checked-out directory structure,
which subsequently means I can easily update/commit changes to it. Import
is a completely different menu item from the UI point-of-view - or is it?
For this project then, how do I import it into Eclipse/WTP? Via packaging
it as a war (as suggested earlier)? That just doesn't feel right. (Heck,
I may be stumbling on countless semantic issues here and not even coming
close to asking the right sort of questions...)
>When I did this, I left the original source folders on disk
> untouched until I had everything working in Eclipse.
> To run/debug in Eclipse on Tomcat, you need an installation of Tomcat on
> your machine which you then set up as a server in Eclipse.
That's really my goal here - WTP or not - I want to run/debug this open
source project under Tomcat within Eclipse. Was able to set up a Tomcat
server within Eclipse, but then have to tackle the issue of running this
project within it.
> If that's not what you are asking, then please clarify exactly what you
> are trying to do.
Thanks much for listening!
Cheers,
David
|
|
|
Re: Need guidance - WTP vs. existing projects [message #138021 is a reply to message #137985] |
Sat, 10 September 2005 01:17 |
Eclipse User |
|
|
|
Originally posted by: ns_dckerber.verizon.net
In article <b48604b684b191d64fe00b1bbd78feeb$1@www.eclipse.org>,
luxmatic@hotmail.com says...
>
> > If I'm understanding you correctly, it is possible (and fairly easy) to
> > import a project created outside of Eclipse, but I don't think it's
> > possible (or at least not reasonable) to use both IDE's with the same
> > source directories.
>
> I could have a semantic problem here - why are you saying 'both IDEs'. I
> (likely wrongly) consider Eclipse to be the IDE, and WTP to be an
> extension to this IDE. Likewise, I think of Java, SVN, etc, to be
> extensions to the IDE.
How did you create the project outside of eclipse? Whatever you used to
do that is what I mean by "the other IDE". If all you have is a bunch
of .java files you created with a text editor, then the import will be
no problem.
> > Once you import into Eclipse/WTP, you need to work
> > in there.
>
> Is import the right term? I created a new Java project, pointed the
> project to the 1st root project directory, and it nicely (and completely)
> set everything up. It didn't change the checked-out directory structure,
> which subsequently means I can easily update/commit changes to it. Import
> is a completely different menu item from the UI point-of-view - or is it?
Yes, it is. Import is for pulling an already-existing java
program/project into an Eclipse workspace, so you can work on it in
eclipse instead of in whatever you used to create it previously. If you
got eclipse to recognize the project by just pointing it at an already-
existing java folder arrangment, then I guess you made "import"ing
unnecessary.
>
> For this project then, how do I import it into Eclipse/WTP? Via packaging
> it as a war (as suggested earlier)? That just doesn't feel right. (Heck,
> I may be stumbling on countless semantic issues here and not even coming
> close to asking the right sort of questions...)
Once you have it showing up in the project explorer on the left side of
Eclipse, it's already there, and you don't need to import it. Creating
a .war is "Export"ing it. You don't need to package it as a war unless
you are going to move it to a different server, completely outside of
Eclipse, such as a production server (as opposed to your development
installation of tomcat).
>
> >When I did this, I left the original source folders on disk
> > untouched until I had everything working in Eclipse.
>
> > To run/debug in Eclipse on Tomcat, you need an installation of Tomcat on
> > your machine which you then set up as a server in Eclipse.
>
> That's really my goal here - WTP or not - I want to run/debug this open
> source project under Tomcat within Eclipse. Was able to set up a Tomcat
> server within Eclipse, but then have to tackle the issue of running this
> project within it.
You need to set up a "server" in your eclipse workspace. Go to "New |
Other | Server | Server" and let the wizard walk you through it. Then
you start the server with your project on it from the menus, or the
shortcut button.
>
> > If that's not what you are asking, then please clarify exactly what you
> > are trying to do.
>
> Thanks much for listening!
Hope this helped!!
>
> Cheers,
> David
Great name, BTW!
|
|
|
Re: Need guidance - WTP vs. existing projects [message #138277 is a reply to message #137147] |
Sat, 10 September 2005 09:09 |
Keith Lynch Messages: 3 Registered: July 2009 |
Junior Member |
|
|
This is an awful problem in WTP. I have several projects internally in
my company which I would like to work on in eclipse however we're forced
to use proprietary software as the only other solution is to hack away
at the .wtpmodule/.project files. I hope that for myself, the other
people like yourselves, and the success of the WTP that this issue will
get the attention it deserves.
I suppose the most annoying part is that one knows it's possible, the
functionality is there, but you just can't access it through the
interface. Adding a web project aspect to a current java project or even
a simple project is just not possible out of the box.
Grrrr :(
Doug Erickson wrote:
> Amen, brother! I agree 100%. Sorry I can't offer any guidance myself,
> but hopefully if there are enough people to whom this matters, and they
> make themselves known, we can find an answer.
>
> D. Brady wrote:
>
>>
>> I've a simple goal - grabbing an open source servlet-based project
>> (Xwiki in this case, but my question is general in nature) and
>> editing/running/debugging the project within Eclipse. It appears that
>> WTP is the way to go here - it certainly seems capable of doing this.
>>
>> I'm comfortable enough with Eclipse to create a new Java project based
>> on this source, it compiles fine, etc. I'm actually impressed with
>> how simple this aspect was to set up.
>>
>> On the other hand, *running/debugging* this project under Eclipse/WTP
>> does not appear to be simple. I can't figure it out - the path to
>> follow is not obvious. How does one make this work via WTP? Is there
>> some fundamental thing I'm missing on the use of Eclipse/WTP that is
>> making this difficult?
>>
>> I've come to the conclusion that my way of thinking just isn't
>> compatible with this toolset, so I'm hoping I can get some guidance.
>>
>> Using Eclipse 3.1, and WTP 0.7.
>>
>>
|
|
|
Re: Need guidance - WTP vs. existing projects [message #138364 is a reply to message #138277] |
Mon, 12 September 2005 22:20 |
Eclipse User |
|
|
|
Originally posted by: luxmatic.hotmail.com
Keith Lynch wrote:
> This is an awful problem in WTP. I have several projects internally in
> my company which I would like to work on in eclipse however we're forced
> to use proprietary software as the only other solution is to hack away
> at the .wtpmodule/.project files. I hope that for myself, the other
> people like yourselves, and the success of the WTP that this issue will
> get the attention it deserves.
Do the developers of WTP acknowledge this (for me, brutal) shortcoming?
I'd love to know that they were aware of it and planned on doing something
about it.
Anyway... Is there anything around that describes hacking
wtpmodule/.project files? I did stumble on that while searching for an
answer, but the info was incredibly fragmented.
> I suppose the most annoying part is that one knows it's possible, the
> functionality is there, but you just can't access it through the
> interface. Adding a web project aspect to a current java project or even
> a simple project is just not possible out of the box.
> Grrrr :(
|
|
|
Re: Need guidance - WTP vs. existing projects [message #138375 is a reply to message #138364] |
Tue, 13 September 2005 04:33 |
David Williams Messages: 722 Registered: July 2009 |
Senior Member |
|
|
On Mon, 12 Sep 2005 18:20:28 -0400, D. Brady <luxmatic@hotmail.com> wrot=
e:
>
> Do the developers of WTP acknowledge this (for me, brutal) shortcoming=
?
> I'd love to know that they were aware of it and planned on doing somet=
hing
> about it.
>
Just to acknowledge the frustration, yes, "the developers of WTP" do
acknowledge issues and have recently posted
http://www.eclipse.org/webtools/jst/components/j2ee/proposal s/WTPFlexibl=
eProjectProposals.html
Well ... to be honest, I'm not sure exactly what you and others have to =
"hack" in wtpmodules
and .project files, exactly, so be sure to open bugs/feature requests pe=
rhaps detailing
what you'd like to accomplish and what's preventing it -- if not address=
ed in proposal document.
My current best guess is not all your problems will be solved in the 1.0=
(Dec) time frame, but
hopefully progress will be made, and your continued feedback and 'use ca=
ses' will help
establish priorities.
Thanks,
|
|
|
Re: Need guidance - WTP vs. existing projects [message #138538 is a reply to message #138375] |
Tue, 13 September 2005 16:18 |
Eclipse User |
|
|
|
Originally posted by: luxmatic.hotmail.com
> Just to acknowledge the frustration, yes, "the developers of WTP" do
> acknowledge issues and have recently posted
>
http://www.eclipse.org/webtools/jst/components/j2ee/proposal s/WTPFlexibleProjectProposals.html
Thanks.
> Well ... to be honest, I'm not sure exactly what you and others have to
"hack" in wtpmodules
> and .project files, exactly, so be sure to open bugs/feature requests
perhaps detailing
> what you'd like to accomplish and what's preventing it -- if not addressed
in proposal document.
I'm afraid if I suggested something it would be too vague. My specific
need, right at this moment, is to make changes/run/debug Xwiki via
Eclipse. I'd like the project setup to be nearly as simple as 'Create new
project based on existing source'. (Key word there is 'nearly' - these
sort of projects are more complex that a simple Java project.) And, if
that can't work, expose a UI that allows one to describe where various
resources are located. Finally, the organization of the project in the
filestem can't be tampered with as it needs to be updated/committed
against a remote repository.
Would 'checking out Xwiki, work with the project in Eclipse' be enough to
define at least one use case for your proposal?
As for editing .wtpmodule files - I'm clueless.
> My current best guess is not all your problems will be solved in the 1.0
(Dec) time frame, but
> hopefully progress will be made, and your continued feedback and 'use cases'
will help
> establish priorities.
Thanks for looking at this!
|
|
| |
Re: Need guidance - WTP vs. existing projects [message #139104 is a reply to message #138021] |
Thu, 15 September 2005 20:06 |
Eclipse User |
|
|
|
Originally posted by: luxmatic.hotmail.com
David wrote:
> You need to set up a "server" in your eclipse workspace. Go to "New |
> Other | Server | Server" and let the wizard walk you through it. Then
> you start the server with your project on it from the menus, or the
> shortcut button.
I've tried this earlier, and this was one of the reasons I finally came
over to this group to ask for help. It walks me through a dialog to
choose a Tomcat instance - no problem here. Next dialog shows an empty
list called 'Available Projects'. No clue on how to run this project
under the server I just set up.
One thing I'd love for someone to try - download the Xwiki project, and
try to do the following, and document the steps taken:
1) Setup a project for it in Eclipse
2) Preserve the existing project directory structure so changes made could
be synchronized with a repository.
3) Run/debug the project within Eclipse under Tomcat. I wouldn't expect
it to run great without the additional setup required (e.g. database), but
that's ok - just getting it starting up broken is enough for me.
I'm calling out Xwiki here because I'm using it in my current production
cycle, but it could be any servlet-based project not originally created in
Eclipse/WTP.
>>
>> Cheers,
>> David
> Great name, BTW!
Completely agree!!
|
|
|
Re: Need guidance - WTP vs. existing projects [message #140361 is a reply to message #139104] |
Fri, 23 September 2005 13:34 |
Eclipse User |
|
|
|
Originally posted by: patrick.roumanoff.gmail.com
luxmatic@hotmail.com (D. Brady) wrote:
>1) Setup a project for it in Eclipse
>2) Preserve the existing project directory structure so changes made could
>be synchronized with a repository.
>3) Run/debug the project within Eclipse under Tomcat. I wouldn't expect
>it to run great without the additional setup required (e.g. database), but
>that's ok - just getting it starting up broken is enough for me.
That's quite easy to do, once you know what to look for.
I have written a little howto on how to adapt a project to WTP.
Here is my setup for xWiki:
1) download a Xwiki source tarball (or get the source from a cvs
checkout)2) in Eclipse, define a new Java Project and select the folder where you
put the xWiki src as the project root, call your project xWiki3) eclipse imports your project, define your classpath, and import all
the libraries from the lib directory.4) go to the resource perspective and edit the .project file to read:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-= -=-=-=-=-=
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>xWiki</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name> org.eclipse.wst.common.modulecore.ComponentStructuralBuilder </name> <arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name> org.eclipse.wst.common.modulecore.ComponentStructuralBuilder DependencyResolver </name> <arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.modulecore.DependencyGraphBuilder </name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature >
</natures>
</projectDescription>
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-= -=-=-=-=-=
5) create a file named .wtpmodules which read:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-= -=-=-=-=-=
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId">
<wb-module deploy-name="xWiki">
<module-type module-type-id="jst.web">
<version>2.3</version>
<property name="context-root" value="xWiki"/>
<property name="java-output-path" value="/bin/"/>
</module-type>
<wb-resource source-path="src/main/java"
deploy-path="/WEB-INF/classes"/> <wb-resource source-path="src/main/web" deploy-path="/"/>
<dependent-module deploy-path="/WEB-INF/lib"
handle="module:/classpath/lib/lib/xmlrpc-1.2.jar"/> .......... [ copy the lib from .classpath and replace
{<classpathentry kind="lib" path="} by
{<dependent-module deploy-path="/WEB-INF/lib"
handle="module:/classpath/lib/} I dont' copy the 118 lines here, because they are all
the same, more over there is probably some not needed jars to run the web app in the lib folder]
</wb-module>
</project-modules>
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-= -=-=-=-=-=
6) The only missing bit is the web.xml file which has to be in the
WEB-INF folderfor xWiki, there is two of those in src/main, pick one of them and copy
it to src/main/webapp/WEB-INF
7) setup xWiki as you would normally do (edit your xWiki.cfg file qnd/or
setup your database)
8) you are now ready to start your webapp in Eclipse: right click on the
project and select "Run As..."->"Run On Server"as you would do for a standard dynamic project.
Hope this is clear enough.
please see http://roumanoff.blogspot.com/ for a longer explanation.
cheers,
Patrick Roumanoff
http://roumanoff.com/
|
|
|
Re: Need guidance - WTP vs. existing projects [message #140372 is a reply to message #140361] |
Fri, 23 September 2005 15:10 |
Eclipse User |
|
|
|
Originally posted by: luxmatic.hotmail.com
Thanks much for this description! I'll give it a shot.
For the team behind the WTP - what can be done to expose this
functionality to the end user outside of tweaking various configuration
files? I think that there is an expectation that a project like this can
be setup with WTP - you can see it in some of the responses in this
thread. Perhaps someone could write a FAQ entry about this scenario?
That'd be great and would more than suffice while the implementation
details are worked out.
Cheers,
David
|
|
| |
Goto Forum:
Current Time: Sat Apr 20 00:13:09 GMT 2024
Powered by FUDForum. Page generated in 0.05421 seconds
|