Scene: I pass File -> Project Structure -> Modules and Libraries have added an external Jar that runs normally in the project, but the following error occurred when packaging with Maven’s package

Solution: Configure the Jar to a pom.xml file and you can package it properly
Steps:
1. Open the Terminal execution (Terminal window at the bottom of the IDEA interface)

Solution: Configure the Jar to a pom.xml file and you can package it properly
Steps:
1. Open the Terminal execution (Terminal window at the bottom of the IDEA interface)
mvn install:install-file -DgroupId=com.external -DartifactId=http-sdk -Dversion=1.2.6-SNAPSHOT -Dpackaging=jar -Dfile=C:\Users\Administrator\Desktop\BOOT-INF\lib\http.jar
2. Add the following dependencies to the pom.xml file
<dependency>
<groupId>com.souche</groupId>
<artifactId>msgcenter-sdk</artifactId>
<version>1.2.6-SNAPSHOT</version>
</dependency>
The -dgrouPID corresponds to the groupid-dartifactid in the POM and the artifactitid-Dversion corresponds to the version-dpackaging import package which is a TYPE of JAR and that’s the jar-DFile where you put the JAR that you downloaded from the POM
Once you run the command, you can see the corresponding JAR in the local Maven repository
And then re-execute
Compile and package MVN Clean Package (install)
Or choose the right side of the IDEA interface, select the Maven status bar and click package packaging
The required configuration in the POM.xml file
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
Read More:
- Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile)
- Failed to execute goal com.spotify:docker-maven-plugin:1.0.0:build Exception caught: basedir src/mai
- Maven compilation error: package does not exist jar package does not exist
- Error resolving version for plugin ‘org.apache.maven.plugins:maven-compiler-plugin’ from the repo…
- Failed to execute goal
- MVN error: @ param not found
- Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test (default-test)
- Maven skip unit test- maven.test.skip And skipstests
- Maven skip unit test
- javac Task Error source release 1.7 requires target release
- Error parsing lifecycle processing instructions
- Springboot integrated with mybatis
- The import Maven project appears http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException Solutions
- Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0
- About the steps to create Maven’s (WEB) dependency using in idea
- About JMH running ERROR: transport error 202: connect failed: Connection refused ERROR
- How to Fix Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile
- 解决Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile
- About jmh running error: transport error 202: Connect failed: connection reused error solution
- Error in Maven packaging web project: webxml attribute is required (or pre existing WEB-INF)/ web.xml if executing in update)