Best approach in using maven w/ eclipse

2005-07-22 Thread jk jk
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 would assist me.

After working with Maven goals on Eclipse as opposed
to command prompt, I find it faster to use the command
prompt then executing maven goals in eclipse.  The
only thing with this approach is that you would always
need a command prompt while you're developing rather
just dealing with your IDE.  Do most use the command
prompt to execute maven goals?

When developing and then testing the web app, I find
it easy to use myeclipse to allow me to automatically
deploy my web app in exploded archive in Tomcat.  But
once you adhere to Maven's recommended directory
structure, it doesnt work with Myeclipse.  So I've
resorted to using the Tomcat plugin for Maven (using
the maven tomcat:install or tomcat:reload goals).  But
even then, it sometimes doesnt work.  Does anyone have
the same issue?

Thanks. 

Jade








___
Post your free ad now! http://personals.yahoo.ca

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Best approach in using maven w/ eclipse

2005-07-23 Thread Jorg Heymans

jk jk wrote:

> After working with Maven goals on Eclipse as opposed
> to command prompt, I find it faster to use the command
> prompt then executing maven goals in eclipse.  The
> only thing with this approach is that you would always
> need a command prompt while you're developing rather
> just dealing with your IDE.  Do most use the command
> prompt to execute maven goals?
> 

I do. Initially i used mevenide but at the time (10 months ago) it was
too buggy so i switched to command line maven. Execution is fast when
you use the maven console, and it preserves command history accross
runs. This enables me to execute build targets with a mouse click and 2
keystrokes , fast enough for me ;)

> When developing and then testing the web app, I find
> it easy to use myeclipse to allow me to automatically
> deploy my web app in exploded archive in Tomcat.  But
> once you adhere to Maven's recommended directory
> structure, it doesnt work with Myeclipse.  So I've
> resorted to using the Tomcat plugin for Maven (using
> the maven tomcat:install or tomcat:reload goals).  But
> even then, it sometimes doesnt work.  Does anyone have
> the same issue?

I haven't use MyEclipse, here is my approach for web development.

- make sure the project directory structure has a webapp directory in it
(eg main/src/webapp/WEB-INF/)
- declare all dependencies with the war.bundle property set to true ie
 
 true
 
- run war:inplace, this copies all dependencies to WEB-INF/lib and
copies all classes to WEB-INF/classes.
- mount the main/src/webapp/ directory in jetty
  
/mywebapp
/path/to/main/src/webapp
  

(- as an additional bonus you can run the eclipse target to keep your
eclipse classpath in sync with the project definition)

I'ld be interested to hear how other people use maven and eclipse together.

Regards
Jorg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Best approach in using maven w/ eclipse

2005-07-25 Thread Doug Douglass

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 would assist me.

After working with Maven goals on Eclipse as opposed
to command prompt, I find it faster to use the command
prompt then executing maven goals in eclipse.  The
only thing with this approach is that you would always
need a command prompt while you're developing rather
just dealing with your IDE.  Do most use the command
prompt to execute maven goals?

When developing and then testing the web app, I find
it easy to use myeclipse to allow me to automatically
deploy my web app in exploded archive in Tomcat.  But
once you adhere to Maven's recommended directory
structure, it doesnt work with Myeclipse.  So I've
resorted to using the Tomcat plugin for Maven (using
the maven tomcat:install or tomcat:reload goals).  But
even then, it sometimes doesnt work.  Does anyone have
the same issue?

Thanks. 


Jade
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Best approach in using maven w/ eclipse

2005-07-25 Thread jk jk
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 would assist me.
> >
> >After working with Maven goals on Eclipse as
> opposed
> >to command prompt, I find it faster to use the
> command
> >prompt then executing maven goals in eclipse.  The
> >only thing with this approach is that you would
> always
> >need a command prompt while you're developing
> rather
> >just dealing with your IDE.  Do most use the
> command
> >prompt to execute maven goals?
> >
> >When developing and then testing the web app, I
> find
> >it easy to use myeclipse to allow me to
> automatically
> >deploy my web app in exploded archive in Tomcat. 
> But
> >once you adhere to Maven's recommended directory
> >structure, it doesnt work with Myeclipse.  So I've
> >resorted to using the Tomcat plugin for Maven
> (using
> >the maven tomcat:install or tomcat:reload goals). 
> But
> >even then, it sometimes doesnt work.  Does anyone
> have
> >the same issue?
> >
> >Thanks. 
> >
> >Jade
> >  
> >
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


__
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]



RE: Best approach in using maven w/ eclipse

2005-07-25 Thread A. Shneyderman
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:








































 


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 
> >would assist me.
> >
> >After working with Maven goals on Eclipse as
> opposed
> >to command prompt, I find it faster to use the
> command
> >prompt then executing maven goals in eclipse.  The only thing with 
> >this approach is that you would
> always
> >need a command prompt while you're developing
> rather
> >just dealing with your IDE.  Do most use the
> command
> >prompt to execute maven goals?
> >
> >When developing and then testing the web app, I
> find
> >it easy to use myeclipse to allow me to
> automatically
> >deploy my web app in exploded archive in Tomcat. 
> But
> >once you adhere to Maven's recommended directory str

Re: Best approach in using maven w/ eclipse

2005-07-25 Thread Doug Douglass

Yes, Sysdeo Tomcat plugin.

Web app work flow is similar to what you describe, but we have Tomcat 
and the Tomcat plugin configured to use context configuration files and 
just point the context to the target/ directory of the 
webapp project. Therefore, the work flow is:


1) make a change in Eclipse
2) Start Tomcat, if it isn't already started
3) execute maven war:webapp
4) test/refresh in browser
5) repeat

Most changes are picked up automatically by Tomcat, though some are not 
(e.g., changes to Spring beans configuration), so I may add the clean 
goal as part of the maven command, or just restart Tomcat. Though, as I 
think about it, using a Maven plugin may make more sense as it's 
configuration travels in the POM instead of in the IDE configuration. 
H, I'll have to play with the Maven tomcat plugin.


As for use of multiproject, we don't have all the Maven sub-projects in 
one Eclipse project. We have one Eclipse project per Maven sub-project, 
separating out almost everything but presentation from the webapp 
project. The only downside to this is not being able to have an Eclipse 
project for the Maven parent project. Though, all that's in the parent 
project is project.xml, project.properties, Eclipse java code/style 
templates, and a license/header file (for checkstyle plugin). Each 
sub-project sets the maven.multiproject.type property approrpiately 
(e.g., maven.multiproject.type=war:war for the webapp, 
maven.multiproject.type=jar:jar for most of the others) Perhaps I could 
set maven.multiproject.type=jar:deploy or some such for the other 
projects? Haven't tried.


Can't help you out with EAR projects, we haven't done any. From what 
I've read on this list it appears similar to the multi-project layout 
we've already got.


We try very hard to stick with the Maven mantra "one artifact, one 
project". We've found that only the most trivial project are hindered by 
this, and that it has helps us design more and better reusable packages.


Cheers,
DD

P.S. All of this is with Maven 1.0.2.

jk jk wrote:


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

 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Best approach in using maven w/ eclipse

2005-07-25 Thread Mike Perham
Anyone know if there is a Tomcat Eclipse plugin that allows you to edit
JSP live in the IDE (i.e. hit the page, make a change and refresh the
browser)?  I ask because a co-worker showed me that it is possible in
IDEA.  Repeating your workflow below 100 times as you are authoring and
testing a complex page rapidly grows tiresome.

mike

-Original Message-
From: Doug Douglass [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 25, 2005 3:11 PM
To: Maven Users List
Subject: Re: Best approach in using maven w/ eclipse

Yes, Sysdeo Tomcat plugin.

Web app work flow is similar to what you describe, but we have Tomcat
and the Tomcat plugin configured to use context configuration files and
just point the context to the target/ directory of the
webapp project. Therefore, the work flow is:

1) make a change in Eclipse
2) Start Tomcat, if it isn't already started
3) execute maven war:webapp
4) test/refresh in browser
5) repeat

Most changes are picked up automatically by Tomcat, though some are not
(e.g., changes to Spring beans configuration), so I may add the clean
goal as part of the maven command, or just restart Tomcat. Though, as I
think about it, using a Maven plugin may make more sense as it's
configuration travels in the POM instead of in the IDE configuration. 
H, I'll have to play with the Maven tomcat plugin.

As for use of multiproject, we don't have all the Maven sub-projects in
one Eclipse project. We have one Eclipse project per Maven sub-project,
separating out almost everything but presentation from the webapp
project. The only downside to this is not being able to have an Eclipse
project for the Maven parent project. Though, all that's in the parent
project is project.xml, project.properties, Eclipse java code/style
templates, and a license/header file (for checkstyle plugin). Each
sub-project sets the maven.multiproject.type property approrpiately
(e.g., maven.multiproject.type=war:war for the webapp,
maven.multiproject.type=jar:jar for most of the others) Perhaps I could
set maven.multiproject.type=jar:deploy or some such for the other
projects? Haven't tried.

Can't help you out with EAR projects, we haven't done any. From what
I've read on this list it appears similar to the multi-project layout
we've already got.

We try very hard to stick with the Maven mantra "one artifact, one
project". We've found that only the most trivial project are hindered by
this, and that it has helps us design more and better reusable packages.

Cheers,
DD

P.S. All of this is with Maven 1.0.2.

jk jk wrote:

>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
>
>  
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Best approach in using maven w/ eclipse

2005-07-25 Thread Doug Douglass

Mike,

I think it's possible in any IDE, I don't think you need any special 
plugin. Just configure a Tomcat context to point to your web source 
directory and edit away, presuming your web source directory is a 
complete WAR structure.


IMO though there is a problem and associated risk with this practice. As 
I stated to jk regarding MyEclipse (which works this way be default), 
the problem is the presumption that the web content you are editing "in 
place" does not require any build process (e.g., packaging, filtering, 
pre-compilation, etc). The risk associated with this presumption is that 
there typically (hopefully always) IS a build process, but it is being 
subverted. Yes, the steps jk and I described take, literally, a few 
seconds longer than "edit and refresh", but those steps are the exact 
same ones I use to build and release my product . I have complete 
confidence that what I built and saw during development is the same as 
that in the release. I have only seen the "edit and refresh" process 
work well in trivial webapp projects.


Good Luck
DD

Mike Perham wrote:


Anyone know if there is a Tomcat Eclipse plugin that allows you to edit
JSP live in the IDE (i.e. hit the page, make a change and refresh the
browser)?  I ask because a co-worker showed me that it is possible in
IDEA.  Repeating your workflow below 100 times as you are authoring and
testing a complex page rapidly grows tiresome.

mike

 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Best approach in using maven w/ eclipse

2005-07-25 Thread Patrick Roumanoff
Hi,

I don't know if it's of any interest to you, but I managed to use the
newly released WTP (http://www.eclipse.org/webtools/ )to do just that.

I like WTP a lot as with my setup it seems much faster/stable than myEclipse
for jsp editing.

Moreover the deployement is much closer to a real one because it allows
you to build the dependant jars and use the maven repository, as maven would 
do, 
but within eclipse.

With WTP you get a real build process to a have a working webapp
(copy files across, assemble jar, copy maven dependencies).

WTP also deploys the webapp to the webserver of your choice (tomcat included)

But it doesn't come free, you have to configure this build process in a new
format (.wtpmodules). It's still a bit of a pain to configure, but I think it's 
worth the effort.

What would be nice is to have either the eclipse maven plugin or 
the mevenide eclipse plugin updated to generate/synchronize those .wtpmodules 
for you.

details at http://roumanoff.blogspot.com/

cheers,

Patrick


> -Original Message-
> From: Doug Douglass [mailto:[EMAIL PROTECTED]
> Subject: Re: Best approach in using maven w/ eclipse
> 
> The risk associated with this presumption is that 
> there typically (hopefully always) IS a build process, but it 
> is being subverted. 
> 
> >Anyone know if there is a Tomcat Eclipse plugin that allows  you to edit
> >JSP live in the IDE (i.e. hit the page, make a change and refresh the
> >browser)?  I ask because a co-worker showed me that it is possible in
> >IDEA.  Repeating your workflow below 100 times as you are authoring and
> >testing a complex page rapidly grows tiresome.


NOTICE
This e-mail and any attachments are confidential and may contain copyright 
material of Macquarie Bank or third parties. If you are not the intended 
recipient of this email you should not read, print, re-transmit, store or act 
in reliance on this e-mail or any attachments, and should destroy all copies of 
them. Macquarie Bank does not guarantee the integrity of any emails or any 
attached files. The views or opinions expressed are the author's own and may 
not reflect the views or opinions of Macquarie Bank.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Best approach in using maven w/ eclipse

2005-07-26 Thread jk jk
Thanks.  I am also using Maven 1.0.2.  I havent really
looked at the newer version of Maven and I having been
trying to get Maven 1.0.2 to work for my project. 
Hopefully it isnt too different.

For the tomcat configuration, you've just added a
context in conf/server.xml?  I'll try that tomorrow. 
I think that its a better flow than what I have as I'd
like a reduced develop-deploy-test cycle.  The maven
tomcat plugin is good but "Once you have installed the
application you can see modifications to the app
reflected in the container by calling the
tomcat:reload task." as stated on
http://www.codeczar.com/products/maven-tomcat-plugin/index.html.
 I dont really want to be calling the tomcat:reload
task every single time I make a change to say a jsp.

I agree, I will be creating an artifact for each
project.  I still need to deploy it either as ear or
if needs be as independendent wars.  Also possibly in
the future, I may need to include this wars in other
ears.  So basically,  I have created something like
this in eclipse:

WebProjectA
WebProjectB
WebProjectC
ModelProjectA
EnterpriseProjectA

EnterpriseProjectA will be my enterprise application
that will just have an META-INF/application.xml with
my project.xml.  I've gotten it to work and not sure
if its the proper thing to do.  
My steps:
1) I've modified application.xml to include the
necessary artifacts.  
2) Generated the artifact for each one individually
(which I find a little time consuming but maybe
there's already a plugin that someone can recommend or
maybe script without using the multiproject plugin)
3) Installed all the artifacts into my local maven
repository 
4) Executed the maven ear:ear goal.

Im still working with it, but if anyone has done
something similar, please do discuss.  Thanks.

Jade
--- Doug Douglass <[EMAIL PROTECTED]> wrote:

> Yes, Sysdeo Tomcat plugin.
> 
> Web app work flow is similar to what you describe,
> but we have Tomcat 
> and the Tomcat plugin configured to use context
> configuration files and 
> just point the context to the target/
> directory of the 
> webapp project. Therefore, the work flow is:
> 
> 1) make a change in Eclipse
> 2) Start Tomcat, if it isn't already started
> 3) execute maven war:webapp
> 4) test/refresh in browser
> 5) repeat
> 
> Most changes are picked up automatically by Tomcat,
> though some are not 
> (e.g., changes to Spring beans configuration), so I
> may add the clean 
> goal as part of the maven command, or just restart
> Tomcat. Though, as I 
> think about it, using a Maven plugin may make more
> sense as it's 
> configuration travels in the POM instead of in the
> IDE configuration. 
> H, I'll have to play with the Maven tomcat
> plugin.
> 
> As for use of multiproject, we don't have all the
> Maven sub-projects in 
> one Eclipse project. We have one Eclipse project per
> Maven sub-project, 
> separating out almost everything but presentation
> from the webapp 
> project. The only downside to this is not being able
> to have an Eclipse 
> project for the Maven parent project. Though, all
> that's in the parent 
> project is project.xml, project.properties, Eclipse
> java code/style 
> templates, and a license/header file (for checkstyle
> plugin). Each 
> sub-project sets the maven.multiproject.type
> property approrpiately 
> (e.g., maven.multiproject.type=war:war for the
> webapp, 
> maven.multiproject.type=jar:jar for most of the
> others) Perhaps I could 
> set maven.multiproject.type=jar:deploy or some such
> for the other 
> projects? Haven't tried.
> 
> Can't help you out with EAR projects, we haven't
> done any. From what 
> I've read on this list it appears similar to the
> multi-project layout 
> we've already got.
> 
> We try very hard to stick with the Maven mantra "one
> artifact, one 
> project". We've found that only the most trivial
> project are hindered by 
> this, and that it has helps us design more and
> better reusable packages.
> 
> Cheers,
> DD
> 
> P.S. All of this is with Maven 1.0.2.
> 
> jk jk wrote:
> 
> >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 se

RE: Best approach in using maven w/ eclipse

2005-07-26 Thread jk jk
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:
> 
> 
>   
>   
>src="${maven.build.dir}/${pom.artifactId}.war" 
>
> dest="${tomcat.home}/webapps/${pom.artifactId}" />
> 
>   
>   
>prereqs="app:deploy,app:stop,app:start" />
>   
>   
>  
> username="${tomcat.manager.username}"
> 
>   
> password="${tomcat.manager.password}"
> 
>   
> path="/${pom.artifactId}" />
>   
> 
>   
>  
> username="${tomcat.manager.username}"
> 
>   
> password="${tomcat.manager.password}"
> 
>   
> path="/${pom.artifactId}" />
>   
>   
>   
>  
> username="${tomcat.manager.username}"
> 
>   
> password="${tomcat.manager.password}"
> />
>   
>   
>   
>classname="org.apache.catalina.ant.ListTask">
>   
>path="${tomcat.home}/server/lib/catalina-ant.jar" />
>   
>   
>classname="org.apache.catalina.ant.StopTask">
>   
>path="${tomcat.home}/server/lib/catalina-ant.jar" />
>   
>   
>classname="org.apache.catalina.ant.StartTask">
>   
>path="${tomcat.home}/server/lib/catalina-ant.jar" />
>   
>   
>   
>   
>  
> 
> 
> 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
> >

RE: Best approach in using maven w/ eclipse

2005-07-26 Thread jk jk
Hi Patrick,

WTP does sound pretty good and I might try it out down
the road.  When you were using MyEclipse or maybe this
actually applies to just eclipse, do you need to
execute, maven eclipse goal to generate the MAVEN_REPO
variables in the build path every single time you add
a dependency in your project.xml?  

Also, when I run maven eclipse goal and I refresh my
eclipse project, it removes all my natures/capabilites
(hibernate, struts, etc) for my project which is very
annoying.  I have to add those natures/capabilites to
the project again.  Does this happen to you?
Thanks.

Jade

--- Patrick Roumanoff
<[EMAIL PROTECTED]> wrote:

> Hi,
> 
> I don't know if it's of any interest to you, but I
> managed to use the
> newly released WTP (http://www.eclipse.org/webtools/
> )to do just that.
> 
> I like WTP a lot as with my setup it seems much
> faster/stable than myEclipse
> for jsp editing.
> 
> Moreover the deployement is much closer to a real
> one because it allows
> you to build the dependant jars and use the maven
> repository, as maven would do, 
> but within eclipse.
> 
> With WTP you get a real build process to a have a
> working webapp
> (copy files across, assemble jar, copy maven
> dependencies).
> 
> WTP also deploys the webapp to the webserver of your
> choice (tomcat included)
> 
> But it doesn't come free, you have to configure this
> build process in a new
> format (.wtpmodules). It's still a bit of a pain to
> configure, but I think it's worth the effort.
> 
> What would be nice is to have either the eclipse
> maven plugin or 
> the mevenide eclipse plugin updated to
> generate/synchronize those .wtpmodules for you.
> 
> details at http://roumanoff.blogspot.com/
> 
> cheers,
> 
> Patrick
> 
> 
> > -Original Message-
> > From: Doug Douglass
> [mailto:[EMAIL PROTECTED]
> > Subject: Re: Best approach in using maven w/
> eclipse
> > 
> > The risk associated with this presumption is that 
> > there typically (hopefully always) IS a build
> process, but it 
> > is being subverted. 
> > 
> > >Anyone know if there is a Tomcat Eclipse plugin
> that allows  you to edit
> > >JSP live in the IDE (i.e. hit the page, make a
> change and refresh the
> > >browser)?  I ask because a co-worker showed me
> that it is possible in
> > >IDEA.  Repeating your workflow below 100 times as
> you are authoring and
> > >testing a complex page rapidly grows tiresome.
> 
> 
> NOTICE
> This e-mail and any attachments are confidential and
> may contain copyright material of Macquarie Bank or
> third parties. If you are not the intended recipient
> of this email you should not read, print,
> re-transmit, store or act in reliance on this e-mail
> or any attachments, and should destroy all copies of
> them. Macquarie Bank does not guarantee the
> integrity of any emails or any attached files. The
> views or opinions expressed are the author's own and
> may not reflect the views or opinions of Macquarie
> Bank.
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


__
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]



RE: Best approach in using maven w/ eclipse

2005-07-26 Thread Mike Perham
Have you considered looking at the documentation for the eclipse plugin?
;-)  Google "maven eclipse" and look at the properties.

-Original Message-
From: jk jk [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 26, 2005 3:08 AM
To: Maven Users List
Subject: RE: Best approach in using maven w/ eclipse

Also, when I run maven eclipse goal and I refresh my eclipse project, it
removes all my natures/capabilites (hibernate, struts, etc) for my
project which is very annoying.  I have to add those natures/capabilites
to the project again.  Does this happen to you?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Best approach in using maven w/ eclipse

2005-07-26 Thread Patrick Roumanoff


> -Original Message-
> From: jk jk [mailto:[EMAIL PROTECTED]
> WTP does sound pretty good and I might try it out down
> the road.  When you were using MyEclipse or maybe this
> actually applies to just eclipse, do you need to
> execute, maven eclipse goal to generate the MAVEN_REPO
> variables in the build path every single time you add
> a dependency in your project.xml?  

The MAVEN_REPO variable is an eclipse classpath variable.
I use mevenide to synchronize my project.xml with my .classpath
And yes, I need to syncronize everytime a dependency is added 
(either in .classpath or in project.xml).


> Also, when I run maven eclipse goal and I refresh my
> eclipse project, it removes all my natures/capabilites
> (hibernate, struts, etc) for my project which is very
> annoying.  I have to add those natures/capabilites to
> the project again.  Does this happen to you?

If you are using the eclipse maven plugin you have to regenerate your
eclipse project files every time you modify your project.xml.
To avoid loosing your natures & builders, you can use the
maven.eclipse.projectnatures & maven.eclipse.buildcommands
properties.

But this is a one way process. 

With mevenide it's a two way process and you won't loose your nature as 
only .classpath and project.xml are updated.

cheers,

Patrick


NOTICE
This e-mail and any attachments are confidential and may contain copyright 
material of Macquarie Bank or third parties. If you are not the intended 
recipient of this email you should not read, print, re-transmit, store or act 
in reliance on this e-mail or any attachments, and should destroy all copies of 
them. Macquarie Bank does not guarantee the integrity of any emails or any 
attached files. The views or opinions expressed are the author's own and may 
not reflect the views or opinions of Macquarie Bank.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]