做网站运营需要学什么/百度知道客服电话
问题: 使用Idea在对springboot项目进行打war包的时候,项目依赖的外部jar包,不是通过pom.xml依赖引入的jar包,无法打进war包的lib目录中。
1、项目下创建一个lib目录,将外部Jar包复制进去
2、pom.xml引入外部Jar包依赖
<dependency><groupId>aspose-words</groupId><artifactId>aspose-words</artifactId><version>18.10</version><scope>system</scope><systemPath>${basedir}/lib/aspose-words-18.10-jdk16.jar</systemPath>
</dependency>
3、plugins标签中添加如下配置信息
<build><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-dependency-plugin</artifactId><version>2.10</version><executions><execution><id>copy-dependencies</id><phase>compile</phase><goals><goal>copy-dependencies</goal></goals><configuration><outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/lib</outputDirectory><includeScope>system</includeScope></configuration></execution></executions></plugin></plugins>
</build>