maven引入本地jar包

将自己的本地jar包放在*/resources/libs/路径下

pom.xml依赖添加
<dependency>
    <groupId>test</groupId>
    <artifactId>test-json</artifactId>
    <version>20121212</version>
    <scope>system</scope>
    <systemPath>${basedir}/src/main/resources/libs/json-20121212.jar</systemPath>
</dependency>
pom.xml配置添加
<build>
    <finalName>brain-service-myuser</finalName>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <configuration>
                <executable>true</executable>
                <includeSystemScope>true</includeSystemScope>
            </configuration>
        </plugin>
    </plugins>
</build>

发表评论

邮箱地址不会被公开。 必填项已用*标注