Maven导入指定的Jar包


1:在项目下面创建libs文件

2:在pom.xml中引入依赖

        <dependency>
            <groupId>com.XXXX</groupId>
            <artifactId>XXXX</artifactId>
            <version>16.8</version>
            <scope>system</scope>
            <systemPath>${project.basedir}/libs/xxx.jar</systemPath>
        </dependency>

 3:打包时,需要增加以下配置,红色字体

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

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.4.3</version>
            </plugin>
        </plugins>
    </build>

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM