Yes, I agree. I think because I will be using Maven
on the command prompt more often, I will use the maven
script you provided. Thanks Alex.
Jade
--- "A. Shneyderman" <[EMAIL PROTECTED]> wrote:
> If you run command line I can not see the need for
> tomcat plugin. Just make
> maven assemble and deploy your application.
>
> The following maven.xml works magic for me:
> <?xml version="1.0"?>
> <project xmlns:ant="jelly:ant">
>
> <goal name="app:deploy" prereqs="war:war">
> <ant:unwar
> src="${maven.build.dir}/${pom.artifactId}.war"
>
> dest="${tomcat.home}/webapps/${pom.artifactId}" />
>
> </goal>
>
> <goal name="app:redeploy"
> prereqs="app:deploy,app:stop,app:start" />
>
> <goal name="app:start" prereqs="app:anttaskdefs">
> <ant:start url="${tomcat.manager.url}"
>
> username="${tomcat.manager.username}"
>
>
> password="${tomcat.manager.password}"
>
>
> path="/${pom.artifactId}" />
> </goal>
>
> <goal name="app:stop" prereqs="app:anttaskdefs">
> <ant:stop url="${tomcat.manager.url}"
>
> username="${tomcat.manager.username}"
>
>
> password="${tomcat.manager.password}"
>
>
> path="/${pom.artifactId}" />
> </goal>
>
> <goal name="app:list" prereqs="app:anttaskdefs">
> <ant:list url="${tomcat.manager.url}"
>
> username="${tomcat.manager.username}"
>
>
> password="${tomcat.manager.password}"
> />
> </goal>
>
> <goal name="app:anttaskdefs">
> <ant:taskdef name="list"
> classname="org.apache.catalina.ant.ListTask">
> <ant:classpath>
> <ant:pathelement
> path="${tomcat.home}/server/lib/catalina-ant.jar" />
> </ant:classpath>
> </ant:taskdef>
> <ant:taskdef name="stop"
> classname="org.apache.catalina.ant.StopTask">
> <ant:classpath>
> <ant:pathelement
> path="${tomcat.home}/server/lib/catalina-ant.jar" />
> </ant:classpath>
> </ant:taskdef>
> <ant:taskdef name="start"
> classname="org.apache.catalina.ant.StartTask">
> <ant:classpath>
> <ant:pathelement
> path="${tomcat.home}/server/lib/catalina-ant.jar" />
> </ant:classpath>
> </ant:taskdef>
> </goal>
>
> </project>
>
>
> You will need to create some maven vars for it to
> work. In your home
> directory setup a build.properties file and include
> the following:
>
> tomcat.home=C:/tc4131
> tomcat.manager.url=http://localhost:8080/manager
> tomcat.manager.username=user
> tomcat.manager.password=secret
> apps.dir=webapps
>
> And yeah enable manager on tomcat if you try to make
> any use of the goals
> above.
>
> By the way the same worked out even with mavenIDE
> that way you do not even
> have to do any CTRL+TAB to switch to maven prompt.
>
> Alex.
>
> -----Original Message-----
> From: jk jk [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 25, 2005 3:21 PM
> To: Maven Users List
> Subject: Re: Best approach in using maven w/ eclipse
>
> Thanks Doug. For the tomcat plugin, Im presumming
> your referring to the
> Sysdeo tomcat plugin. I also have that installed in
> eclipse and use it to
> start & stop tomcat. Can you list down the flow of
> how you would make a
> change in your webapp and deploy it when actively
> developing? For example,
> this is what Im doing.
>
> 1) Make a change in eclipse
> 2) Using the Systedo tomcat plugin in eclipse, start
> tomcat
> 3) Open command prompt, execute maven tomcat:install
> 4) Test out change in browser.
> 5) Make a change in eclipse again if I want to
> 6) In command prompt, execute maven tomcat:reload
> 7) Test out change in browser.
>
> Also, Im trying to setup something similar to what
> you had done with the
> multiproject. But to use multiproject in eclipse, I
> would have to create one
> root project and create 4 subprojects within that
> project. I dont really
> want to do that as I still want to have separate
> projects within eclipse
> which means I will opt not to use multiproject. Can
> someone show me an
> example of an eclipse EAR project that uses maven
> to build the dependencies
> on the projects within eclipse?
>
> Thanks.
>
> Jade
>
>
>
> --- Doug Douglass <[EMAIL PROTECTED]> wrote:
>
> > Jade,
> >
> > We used to use MyEclipse but have let our
> subscriptions lapse on
> > purpose. In general, I think MyEclipse is a decent
> set of features for
> > the $$$, though the XML editor seemed a bit buggy.
> > We have found we can
> > do more with less (maven, mavenide, Tomcat plugin,
> > etc) as you seem to
> > have found. While at first the MyEclipse "way" of
> allowing editting of
> > webapp content (e.g., jsp, etc) in place seems a
> time saver, it
> > presumes there is no build process for any of that
> content.
> > This quickly turned
> > out not to be the case on the project we purchased
> the subscriptions
> > for, which led to a very awkward build/deploy
> process that we,
> > unfortunately, had to expose to our customer.
> Toward the end of that
> > project, I switched to maven for the build
> (multiproject with 4
> > interrelated subprojects) and have never looked
> back.
> >
> > Yes, during development with Eclipse I almost
> always have a command
> > prompt up for running maven goals. It's what I'm
> used to doing
> >
> > I have not used the tomcat plugin for Maven, only
> the one for Eclipse
> > and it seems to work fine.
> >
> > HTH,
> > Doug
> >
> > jk jk wrote:
> >
> > >Hi all,
> > >
> > >Im getting setup to use Maven on a new project
> and would like to know
> > >the best approach in
> > intergrating
> > >Maven with development, specifically using
> Eclipse
> > (w/
> > >MyEclipse plugin). Its usually a preference
> thing, but any feedback
>
=== message truncated ===
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]