Maven Questions: Webapp best practices and local repositories
I can't seem to subscribe to the Maven User Mailing List for the life of me, so I'll ask my questions here, and hopefully get some answers. The first question is regarding local repositories. Ideally, I'd like to put this on a network drive, so all developers can get to it by mapping a drive or something. When I try to use a network drive, I get the following error (WinXP, Maven CVS pull from yesterday):
Artifact '\\server\share\repository\velocity\jars\velocity-1.4-dev.jar' not found to add to classpath java.lang.ClassNotFoundException: velocity at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
The reason I'd like to use a network share (over an FTP server or HTTP server) is because then we can easily add the .jar files to the classpath in Eclipse or JBuilder. If Maven downloads the files to each user's local hard driver - then we can use an FTP server. Another option is to use the default (~/.maven/repository), but then each developer has to copy javamail and our custom jars onto their hard drive.
My second question is regarding webapp best practices with Maven. The Maven Tomcat Plugin seems nice, but it mangles my server.xml file. I'd like a solution similar to the way I've done it with Ant. I use a context.xml file and place this in $CATALINA_HOME/webapps and then I "deploy" the expanded war into Tomcat. Tomcat detects when any files change under WEB-INF/ and reloads the app. Works great. A better solution would be to point the docBase to target/webappName. So I guess what I'm saying is - should I just create a context.xml file and make my own custom "setup-tomcat" task (which does an ant:copy)? Then use war:webapp to refresh the app's files from source? How are you experts doing it?
Posted by Vincent Massol on August 23, 2003 at 04:30 PM MDT #
Yeah, sharing the repo would be bad. In addition to your comment about adding the files to the classpath, the Eclipse Plugin does just that. Based on what you setup in Eclipse as your maven_repo, it will build your .classpath and .project files for you.
Personally I've never used the Tomcat Plugin or done anything but drop my built war into my container. I'll probably need to start investigating stuff soon for Cactus tests.
Posted by Warner Onstine on August 25, 2003 at 04:22 PM MDT #
Posted by Manju chauhan on May 14, 2008 at 08:38 AM MDT #