maven项目导入jar包

2020-04-08

1.在resources目录下创建lib文件夹,将jar包赋值进来

2.在pom中引入

	<dependency>
            <groupId>local-sdk1</groupId>
            <artifactId>test1</artifactId>
            <version>0.0.1-SNAPSHOT</version>
            <scope>system</scope>
	<!--jar包在项目中的路径-->
            <systemPath>${project.basedir}/src/main/resources/lib/gexin-rp-fastjson-1.0.0.4.jar</systemPath>
        </dependency>

3.编译时添加配置

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
		<!--该配置用于打包到jar包-->
                <configuration>
                    <includeSystemScope>true</includeSystemScope>
                </configuration>
            </plugin>
        </plugins>
    </build>

标题:maven项目导入jar包
作者:张范
地址:http://misterzhang.top/articles/2020/04/08/1586338767917.html