NullPointerException 与 The goal you specified requires a project to execute but there is no POM

mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc8 -Dversion=12.2.0.1 -Dpackaging=jar -Dfile=ojdbc8.jar

I want to report this jar into the local maven, but the results keep reporting these two errors:

At the beginning, I searched one question after another, but I couldn’t find it out. Finally, it prompted that there was no pom file. I wondered if I could just enter cmd in the project pom folder, and it worked! , In fact, these two problems are the same, that is, there was a null error at the beginning, I was confused, and I was looking in the wrong direction, I hope I can help everyone! ! !

install: You can compile and package the project itself into the local warehouse

install-file: installation file

-Dfile=D:\ojdbc8.jar : Specify the file location of the package to be printed

-DgroupId=com.oracle : Specify the groupId of the current package as com.oracle

-DartifactId=ojdbc8 : Specify the current artifactfactId as ojdbc8

-Dversion=12.2.0.1 : Specify the version of the current package as 12.2.0.1

-DgeneratePom=true: Whether to generate a pom file

-DgroupId=package name

-DartifactId=Project name

-Dversion=version number

-Dpackaging=jar

-Dfile=jar file path

Guess you like

Origin blog.csdn.net/m0_74141658/article/details/129250293