intellij 引入本地库并war打包
一、引入本地库
1、File -> Project Structure -> Libraries,点击+,新增本地lib库。
2、File -> Project Structure -> Modules -> Dependencies,新增Library,选择第一步创建的lib库。
二、将本地库war打包
pom.xml文件中增加如下内容:
<build> <finalName>mdfind</finalName> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.3</version> <configuration> <failOnMissingWebXml>false</failOnMissingWebXml> <warName>${project.artifactId}</warName> <webResources> <resource> <directory>lib/</directory> <targetPath>WEB-INF/lib</targetPath> <includes> <include>**/*.jar</include> </includes> </resource> </webResources> </configuration> </plugin> </plugins> </build>