spring-boot打包,引入外部jar包问题

引入本地jar包:

<dependency>
<groupId>com.jagregory.shiro.freemarker</groupId>
<artifactId>shiro-freemarker-tags</artifactId>
<version>0.1</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/shiro-freemarker-tags-0.1.jar</systemPath>
</dependency>


将本地的jar包,在package的时候加入到工程中

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>

<resources>
<resource>
<directory>src/main/resources/lib</directory>
<targetPath>BOOT-INF/lib/</targetPath>
<includes>
<include>**/*.jar</include>
</includes>
</resource>
</resources>
</build>
posted @ 2018-05-10 16:06  0xcafedaddy  阅读(2019)  评论(0编辑  收藏  举报