文章目录

概要

当我们需要通过maven打包一些小众jar包时,maven仓库是没有的,所以默认也无法打入。

技术细节

只能通过导入本地jar包,并且引入插件声明,才能解决。
编辑pom.xml文件:

<dependency>
    <groupId>cfca-logback</groupId>
    <artifactId>cfca-logback</artifactId>
    <version>4.2.1.0</version>
    <scope>system</scope>
    <systemPath>${project.basedir}/libs/logback-cfca-jdk1.6-4.1.1.0.jar</systemPath>
</dependency>

插件部分:

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <configuration>
                <includeSystemScope>true</includeSystemScope>
            </configuration>
        </plugin>
    </plugins>
</build>

更多推荐