Introduction:
Although MAVEN is configured to automatically download the jar package to the local Maven repository by indexing, this allows the project to use the rack package in the local warehouse directly,
But this trick is not every time Turin should, also have encountered a failure, when encountered failure, we can use the form of command to import the rack package
The local Maven repository, which can then be used directly in the project. Eg: when I use Druid, I can't get directly from Ali's warehouse to Druid-1.0.27-sources.jar,
Druid-1.0.27-javadoc.jar, can only be obtained from the International warehouse later in the import to the local warehouse.
1. Maven command moves the jar package to Maven's local repository
Grammar:
MVN Install:install-file-dfile=jar Package Position (parameter i)-dgroupid=groupid (parameter II)-dartifactid=artifactid (Parameter III)-dversion=version ( Parameter four)-dpackaging=jar
"Program Files" in the middle of the space , so to add double quotation marks, the other three parameters, copied from the above can be.
eg
Install Oracle-connector-java:
MVN Install:install-file-dgroupid=oracle-dartifactid=oracle-connector-java-dversion=11.2.0.1.0-dpackaging=jar- Dfile=f:\ojdbc6-11.2.0.1.0.jar
Installation: Druid-1.0.27-sources.jar
MVN install:install-file-dgroupid=druid-dartifactid=druid-1.0.27-sources-dversion=1.0.27-dpackaging=jar-dfile=e : \druid-1.0.27-sources.jar
If you do not want to use the command, you can directly copy the downloaded jar package to the MAVEN repository, the pro-test is effective, do not know whether there will be sequelae.
Reference URL:
Https://www.cnblogs.com/tangshengwei/p/6341628.html
Manually add a jar package to the MAVEN repository