I think you should have scope 'provided'. Your use case is what that's for.
Regarding handling your dependencies for production, that's more of a server deployment issue isn't it? What I think you can use is the copy-dependensies mojo of the dependency plugin ( http://maven.apache.org/plugins/maven-dependency-plugin/copy-dependencies-mojo.html). As the dependencies are shared between several applications, I would create a separate project where I do this and the put them in an assembly (zip/tar file). /Anders On Tue, Sep 22, 2009 at 08:07, Kristian Rink <[email protected]> wrote: > Folks; > > maybe a strange use case again, however: We're using maven2 along with > Spring and some other libraries included to build web applications, > deployed > to .war files, usually deployed to contain all the dependent .jars in > WEB-INF/lib. While this is good in most situations, we found that in one > environment, there is a bunch of separated applications mainly using all > the > same .jar files so we would be better off moving them to an application > server shared jar folder and keeping the .war files smaller without > distributing all the same libraries over and over again. > > Question: How to achieve this? My first idea was to make all the > dependencies in the war artifact poms "provided" and copy them over > manually, but, at the very least dealing with transitive dependencies and > exclusions, this has proven not to be funny. Can I somehow make the maven2 > war build, say, copy the .jar files anywhere else but in the > target/<webapp-name> folder to manually copy them over to the application > server? > > Thanks in advance and all the best, > Kristian > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
