Simple hot deploy of JSP to Maven Target Directory

Home Forums MyEclipse IDE Maven for MyEclipse (Maven4MyEclipse) Simple hot deploy of JSP to Maven Target Directory

This topic contains 3 replies, has 2 voices, and was last updated by Profile photo of support-tony support-tony 3 years, 7 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #322098

    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:

    /src/main/resources
    /src/main/webapps
    target/[webroot]

    deployment.

    The external tomcat instance points back to the target foler. For example, my server.xml looks like:

    <Context path=”/tzero”
    docBase=”C:/dev/proj/trunk/tz/tz-webapp/target/tzero”
    reloadable=”true”>
    </Context>

    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
    (see image).

    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?

    Attachments:
    You must be logged in to view attached files.
    #322101
    Profile photo of support-tony
    support-tony
    Keymaster

    Pete,

    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.

    #322212

    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?

    #322218
    Profile photo of support-tony
    support-tony
    Keymaster

    Pete,

    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.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.