![maven install jar locally maven install jar locally](https://talendbestpractices.files.wordpress.com/2019/12/image-31.png)
Netbeans will auto refresh the project and it will no red error anymore... Yeay the jar successfully installed :D, and for the final step u can add the dependency in the pom.xml in netbeans project. Installing F:\xx\xx\xx\jcprov-1.0.jar to C:\xx\xx\.m2\repository\safenet\jcprov\jcprov\1.0\jcprov-1.0.jar maven-install-plugin:2.3.1:install-file (default-cli) standalone-po Xx\jcprov-1.0.jar -DgroupId=safenet.jcprov -DartifactId=jcprov -Dversion=1.0 -D Note : notice that “-DgroupId”, “-DartifactId” and “-Dversion” value must exact the same as in pom.xmlĬ:\Users\xxx>mvn install:install-file -Dfile=F:\xx\xx\ Mvn install:install-file -Dfile=F:\xx\xx\xx\jcprov-1.0.jar -DgroupId=safenet.jcprov -DartifactId=jcprov -Dversion=1.0 -Dpackaging=jar Open cmd, and install the jar file using maven, Make sure that u have set up your java environment variable Note: split it between the path application using semicolon ( ) You can simply open command console in the maven path, or you can set up configure the maven in system variable, just add in the PATH variable in the system environment Right click in your missing jar in project explorer and browse your missing jarįirst we just using maven that already in netbeans installation package, the maven netbeans library is located in :Į:\Program Files\NetBeans 7.3\java\maven\bin
Usually this is easily accomplished via mvn install:install-file -Dfile#MAVEN INSTALL JAR LOCALLY DRIVER#
There is 2 way to add your jar to maven project in netbeans, first add it manually using maven command in console/cmd or the easier way, right click in your missing jar ? I find myself once again in the situation that I have to install the Oracle JDBC driver into my local Maven repository. So if we want to add jar that not supported maven, we must install the jar to our maven local repo.
![maven install jar locally maven install jar locally](https://img-blog.csdnimg.cn/1b2c2bbb8dd74dc0b4e321e37a23f9a0.png)
Yeah its really troublesome if u wanna add jars that are not supported maven in netbeans, the default dependencies in netbeans is to search in maven repo.