How do I add a jar file to the maven project?

Asked 2 years ago, Updated 2 years ago, 139 views

How do I add a jar file that is not yet a Maven repertoire to my project library source folder directly?

maven java repository library

2022-09-21 22:12

1 Answers

Install the JAR file from the Maver repository in this way.

 mvn install:install-file
-Dfile=<path-to-file>
-DgroupId=<group-id>
-DartifactId=<artifact-id>
-Dversion=<version>
-Dpackaging=<packaging>
-DgeneratePom=true

Where: <path-to-file>  the path to the file to load
   <group-id>      the group that the file should be registered under
   <artifact-id>   the artifact name for the file
   <version>       the version of the file
   <packaging>     the packaging of the file e.g. jar


2022-09-21 22:12

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.