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:
- Maven compilation error: package does not exist jar package does not exist
- Does the version of idea2020.1 import mybayis jar package or report an error? Error: (4,28) Java: package org.apache.ibatis.io does not exist
- How to select the jar package version for Maven package when the jar package versions referenced by multiple modules are inconsistent
- Idea error: (4, 28) Java: package com.alibaba.fastjson does not exist
- What to do when idea Maven package appears could not find artifact xxxxx!
- Idea error: (4, 46) Java: package org.springframework.boot . autoconfigure does not exist problem solving
- Java project cannot import entity class package and service package, controller layer reports error, fix project setup is OK
- Idea project prompt: symbol not found or package does not have a solution
- How to turn your project into a jar package in idea
- Solution of error report in springboot Maven package websocket
- package xxx does not exist cannot find symbol
- Mybatis idea environment integration jar package
- Julia install and use the extension package package (ERROR: UndefVarError: Pkg not defined)
- Update project manually_ Solution of too large jar package in springboot
- The jar package download of Maven project appears (could not transfer artifact. Org mybatis:mybatis )
- Error: package android.support.annotation Does not exist
- Installing R’s “mvtnorm” package in Windows system: solving the problem of the R package “mvtnorm” is not installed
- Failed to import package with error: couldn’t decompress package
- package R does not exist
- Maven’s jar package conflict; Maven’s introduction