MyEclipse: Simple hot deploy of JSP to Maven Target Directory
peteunderwood - Jan 04, 2012 - 10:32 PM
Post subject: Simple hot deploy of JSP to Maven Target Directory
I am involved in a very large code base with over 25 active developers and multiple projects.
Some people use Intelli-J... some eclipse and here I am with MyEclipse.... It seems I can not do the simplest of things.
One basic assumption: other people are not using myEclipse.
That said, I am using (what I am told) is a fairly standard:
The external tomcat instance points back to the target foler. For example, my server.xml looks like:
From the command-line, everything works great (i.e. mvn install or eclipse:eclipse).
From within the IDE hot deployment of classes work, generally (sometimes it just doesn't work).
However, I would like to sync the the jsp files in the src directory with that of the target
Someone told me that a file sync plugin works great.... but then why am I using myEclipse? ;-)
Can someone point out if I am doing anything wrong?
support-tony - Jan 05, 2012 - 07:35 AM
If you're using the server redirect method of deployment, then you will need to rebuild using the "Run As->Maven install" context menu option for the changes to be picked up by the server. If you remove the <Context> element from the server.xml then, after you deploy using MyEclipse, changes will be pushed to the server automatically. Some class changes won't be reloaded, as you've seen.
If you're trying to use both methods of deployment, you probably won't get what you want.
Which version of MyEclipse are you using? MyEclipse 10 has better support for the conventional maven structure that you're using.
peteunderwood - Jan 09, 2012 - 07:48 PM
Post subject: Ok... just upgraded to 10...
I changed nothing else, however.
If I do a maven--> run as, you are assuming that I can launch the Tomcat through a maven plugin... i think we have don this for Jetty, but not Tomcat.
Let me ask another silly question- is there no way to tell the builder to build in two spots? src and target?... No way to automatically copy the src JSP folders from one folder to another?
support-tony - Jan 10, 2012 - 03:45 AM
I'm not sure what you mean by "I changed nothing else". Are you trying to use both methods of deployment (both MyEclipse's builtin support and the server redirect)?
MyEclipse will not use maven to build, deploy or run, automatically. So using MyEclipse for deployment should work. You can, of course run maven goals from the Run As menu, yourself, but they aren't needed for normal development with MyEclipse; the project can be recognised by both MyEclipse and maven. Have you tried just using the MyEclipse deployment support on its own? In this way, Tomcat is supported. If you want to deploy and launch through maven then, of course, you will have to add that Tomcat support yourself.
I'm not sure if this addresses the problem you've got but please try deploying/launching just with MyEclipse and let us know how it goes.
All times are GMT - 6 Hours
Powered by PNphpBB2
© 2003-2004 The PNphpBB GroupCredits