1. Select the Maven tool in IDEA and click the icon pointed by the arrow
2. Use the mvn installation command mvn install:install-file
例如:mvn install:install-file -DgroupId=com.algo.space -DartifactId=Estimator -Dversion=1.0 -Dpackaging=jar -Dfile=essis-common/libs/SpaceEstimator-1.0-SNAPSHOT.jar
Parameter description:
(1) -DgroupId: Set the package name of the project code (generally use the organization name)
(2) -DartifactId: set the project name or module name
(3) -Dversion: version number
(4) -Dpackaging: What type of file (jar package)
(5) -Dfile: Specify the jar file path and file name (only the file name is required in the same directory), write the relative path when using the IDEA Maven tool, and the project directory is the root directory.
3. Introduce dependencies in the Maven pom file, and fill in the information according to the installation time. like:
<dependency>
<groupId>com.algo.space</groupId>
<artifactId>Estimator</artifactId>
<version>1.0</version>
</dependency>
4. After the above operations, it can be used normally after packaging.
—————————————————
Copyright statement: This article is an original article of CSDN blogger "@小民", following the CC 4.0 BY-SA copyright agreement, please attach the original source link and this statement.
Original link: https://blog.csdn.net/qq_45629145/article/details/130363357