maven项目引入本地jar包

maven项目引入本地jar包并打包成jar包

<dependency>

<groupId>romg360-v2.0</groupId>

  <artifactId>romg360-v2.0</artifactId>

  <version>1.0</version>

  <scope>system</scope>

  <systemPath>${project.basedir}/src/main/resources/lib/romg360-v2.0.jar</systemPath>

</dependency>

</dependencies>

<build>

<finalName>iue</finalName>

<plugins>

<plugin>

<groupId>org.springframework.boot</groupId>

<artifactId>spring-boot-maven-plugin</artifactId>

<configuration>

<fork>true</fork>

<includeSystemScope>true</includeSystemScope>

<mainClass>${start-class}</mainClass>

<resources> 

    <resource> 

        <directory>lib</directory> 

        <targetPath>BOOT-INF/lib/</targetPath> 

        <includes> 

            <include>**/*.jar</include> 

        </includes> 

    </resource>

</resources>

</configuration>

<executions>

<execution>

<goals>

<goal>repackage</goal>

</goals>

</execution>

</executions>

</plugin>

</plugins>

</build>


可参考https://www.jianshu.com/p/2896cba00ce1

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容