Jar package
The path of the jar package is in the boot-inf/lib directory
Create a jar folder under the Resources folder and paste the jar package in.
Enter POM file to join
<dependency>
<groupId>com.jayZhou</groupId>
<artifactId>aaaa-client-sso</artifactId>
<version>1.0-1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/jar/aaaa-client-sso-1.0-1.0.jar</systemPath>
</dependency>
Groupid, artifactid and version can be written freely
You also need to add it on the last side and type it in when you pack it
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<!--Add-->
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
</plugins>
</build>
So far, the jar package has been successfully introduced
War package
(this method is not attempted)
The jar package is in the WEB-INF/lib directory
You need to add the following to the POM file
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<webResources>
<resource>
<directory>src/main/resources/jar/</directory>
<targetPath>WEB-INF/lib/</targetPath>
<includes>
<include>**/*.jar</include>
</includes>
</resource>
</webResources>
</configuration>
</plugin>
Read More:
- [Solved] Springboot project introduces Font library error: java.awt.fontformatexception: bad table, tag = XXXXXX
- [Solved] Springboot Package jar and Startup Error: It was loaded from the following location
- [Solved] SpringBoot Pack Project: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources
- Springboot Project Error: Failed to execute goal org.apache.maven.plugins
- [Solved] SpringBoot Create Project and Failed to Access localhost:8080 Error
- [Solved] Springboot Project Startup Error: Unable to Identify bootstrap.yml Configuration
- Failed to scan osdt_cert.jar & osdt_core.jar [How to Solve]
- [ERROR] Failed to execute goal on project simple-project: Could not resolve dependencies for project
- [Solved] jar Run Error: no main manifest attribute
- [Solved] docker Start jar package and Set JVM parameter Error
- [Solved] Hadoop Error: Exception in thread “main“ java.io.IOException: Error opening job jar: /usr/local/hadoop-2.
- The MapReduce program generates a jar package and runs with an error classnotfoundexception
- How to Solve Hbase JAVA import Package Error
- [Solved] Springboot Project Start Error: An attempt was made to call the method com.google.common.collect.Multimaps.asMap
- How to Solve IntelliJ IDEA Error: Cannot determine path to ‘tools.jar‘ library for 17 (C:\Program Files\Java\jd…
- [Solved] Maven Package Error: Error assembling JAR
- How to Solve Springboot configurate environment file Error
- [Solved] Android project Compile error: error processing kotlin-stdlib-1.6.0.jar
- [Solved] The war package Error: The reason why the XSD file could not be found
- How to Solve error creating bean with name when springboot starts