When springboot project to introduce third-party jar package through a local third-party jar package can not be packaged into the project

       <dependency>
            <groupId>com.arcsoft.face</groupId>
            <artifactId>arcsoft-sdk-face</artifactId>
            <version>2.2.0.1</version>
            <scope>system</scope>
            <systemPath>${basedir}/lib/arcsoft-sdk-face-2.2.0.1.jar</systemPath>
        </dependency>

My project requires the use of third-party software Rainbow jar, dependency as pom file, is introduced by way of a local, where <systemPath> indicates the location of the third party jar package, the parameter <scope> tag has the following

compile
default scope, represents a dependency can be used in the life cycle. Moreover, these dependencies will be passed to depend on the project. Applies to all stages, it will be published together with the project
provided
similar with the compile, but show the dependency provided by the JDK or a container, such as Servlet AP and a number of Java EE APIs. The scope can only act when compiling and testing, and there is no transitive.
runtime
representation dependency does not act at compile time, but will act in operating and testing, such as JDBC drivers for running and testing phase.
test
represents a dependency role in testing, it does not act at runtime. Only when tests used to compile and run the test code. It will not be published with the project.
system
with the provided similar, but to be provided in the form of external JAR packages in the system, maven will not find it in the repository.

Original content parameters refer to the following
description link: https: //blog.csdn.net/y799924439/article/details/80230365

Problems encountered

If only this is the case, the project is running in the compiler is no problem, but once labeled jar package jar package can not find third-party error introduced will be, we need to add a node in the build pom.xml file includeSystemScope, as shown below, add red frame part can solve this problem.

 

Guess you like

Origin www.cnblogs.com/lwyang/p/12554097.html