Table of contents
1. Description
Recently, when I was doing a back-end interface for map generation isosurfaces, I needed to import a wContour.jar package. After maven packaged it and released it online, I found that the imported Jar package could not be found (class not found). After struggling for a while, I found that it was actually Just configure the plugin in the pom file.
Two, operation
1. Copy the file to the project: You can create a lib folder under the corresponding Moudle module, and copy the jar file into it.
2. In File/Project Structure/Libraries, click Add and select java.
3. Select the corresponding file
4. Select the specified module and add the corresponding library
5. Pom file configuration
<!--groupId、artifactId、version自定义-->
<dependency>
<groupId>wContour</groupId>
<artifactId>wContour</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${
pom.basedir}/lib/wContour.jar</systemPath>
</dependency>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<!--解决本地jar包打不进jar的问题-->
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
</plugins>
</build>