Search code examples
maventomcatintellij-ideamaven-pluginmaven-bundle-plugin

How to add external folder that contains multiple jars into maven build for web application?


I'm using intellij with tomcat server to deploy my spring mvc application, i have another 3-th party jars (10) that i would like to add them to the war file while packing it with maven, is there a way to tell maven -> Include all these jars in this folder?


Solution

  • There's no option to include every jar in a folder,if you want to include individual jar's from the file system:

    <dependency>
              <groupId>sun.jdk</groupId>
              <artifactId>tools</artifactId>
              <version>1.5.0</version>
              <scope>system</scope>
              <systemPath>${java.home}/../lib/tools.jar</systemPath>
            </dependency>
    

    see: Maven: System Dependencies