Dear All,

I've spent three days reading two books about Maven, all of the Maven site, and finally searching the web for hours. But unfortunately I seem unable to work out and understand one simple concept and I've reached the end of my tether. Hope somebody can help!

I've successfully moved a small application from using Ant to Maven, using the default Maven folder structure.
And Maven does a lovely job of compiling it.

But what I just can't work out is where do I (the developer) and Tomcat fit into all of this now?

-------------

I have a nice myapp/appSrc/src/main/java folder containing all if my source for the app
and another myapp/appWeb/src/main/webapp folder containing the web files.
And with a parent .pom and two child .poms exactly as recommended on the maven site, maven compiles my source, places it in a .jar file in the repository and into the target WEB-INF/lib folder along with all the dependencies.

But what next? Where do I work?

-------------

In the original Ant setup Ant would compile my source files and place them in the -original- webapp/WEB-INF/lib folder, so that is where Tomcat comes in - picking up the app from the original webapp folder.

But with Maven I can no longer work in the original webapp folder, because now everything gets copied into the target, and that is where I find the .jar file and all its dependencies - in the target folders. So I could set up Tomcat to work in the target folder I suppose and there I start developing. But wait a minute, if I want to change a sentence in a .jsp file, let's say, and see the result, how do I go about that? I can't work in the target folder because everything gets copied from the original folder and it would get written over, but I can't work in Tomcat from the original folder either because the .jar file and its dependencies aren't there.

???

Ok so now I've found all over the web references to the tomcat Maven plug-in which, using the Manager app, deploys and can later redeploy your app to Tomcat. But that doesn't make much sense to me either. Is that the route I have to go down? Because if so, we're saying that for every tiddly little change to a .jsp file while developing I have to run a maven install followed by a redeploy, which doesn't seem to make much sense.

I must be missing something here.


I'd be very grateful for any help to get me moving the right direction again.
Thanks for listening.

--------------
At the moment my Tomcat server is independent of Eclipse, I don't use the internal tomcat possibilities, I see that Maven can run a Tomcat as well. I'd prefer to remain with my independent version if possible as I have four other apps that will eventually have to be moved to Maven as well.

Malcolm









Reply via email to