title: Package JARs in WAR or put on classpath?
body: <p>I have a Spring MVC application which has a public front-end WAR, an admin front-end WAR and a shared services JAR. My two front-end projects rely on various Spring JARs, as does my shared services JAR. The list of Spring JARs that they require are similar but different. Also, the two WAR based apps rely on the shared services JAR.</p>
  
  <p>How would you deploy this set of apps/JARs in terms of bundling JARs or setting classpaths? Would you include all of the appropriate Spring JARs and the service JAR in to both WAR files? Would you put any and all shared JARs on to the classpath? If so, would you put them on the classpath for Tomcat (the app server I'm using) via a command line parameter or would you just add the classpath to the system classpath? Would you approach differ for development and production scenarios?</p>
  
  <p>For reference I'm using Maven which already packages everything in to the WAR files, though I'm not sure if that's the best practise way to do it.</p>
  
  <p><strong>UPDATE:</strong> For reference, I found this page very useful reading: <a href="http://www.mulesoft.com/tomcat-classpath" rel="nofollow">http://www.mulesoft.com/tomcat-classpath</a></p>
  
  <p>Thanks,</p>
  
  <p>James.</p>