I have an eclipse WTP app using the M2 plugin. I exported it and it runs fine on my machine, but I believe this is because it references my local maven repo.
How can I get it to bundle the jars from the maven repo into the war file ?
Is there a simple way to do this in eclipse with the M2 plugin >? Im afraid that if I muck with the pom.xml, which works so beautifully right now, that I will get sucked into a black hole of maven mysteries….
Your
pom.xmlshould contain:This makes maven bundle all the dependencies* get bundled in
WEB-INF/libof the war.Then you run
mvn:packageand the resultant war is placed in the/targetfolder of your project.*some dependencies with scopes different from the default aren’t included