nhdlb

正常maven依赖jar包的pom.xml写法如下:

<!-- https://mvnrepository.com/artifact/ojdbc/ojdbc -->
<!-- (参数一):下载到本地的ojdbc-10.2.0.4.0.jar包的真实存放路径 --> <dependency> <groupId>ojdbc</groupId>-----------------(参数二) <artifactId>ojdbc</artifactId>-----------(参数三) <version>10.2.0.4.0</version>------------(参数四) </dependency>

语法:

mvn install:install-file -Dfile=jar包的位置(参数一) -DgroupId=groupId(参数二) -DartifactId=artifactId(参数三) -Dversion=version(参数四) -Dpackaging=jar

注意必须在有pom文件的文件夹内执行才有效(项目内的pom文件目录内也有效)

实例:mvn install:install-file -Dfile="C:\Users\zhaoyue\Desktop\commons\commons-io.jar" -DgroupId=org.apache.commons -DartifactId=commons-io -Dversion=2.6.0 -Dpackaging=jar

 

如果标签多的话,如下:

<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-hdfs</artifactId>
<version>2.2.0</version>
<classifier>tests</classifier>
</dependency>

就加一个-D参数就可以了,如下:
mvn install:install-file -Dfile=hadoop-hdfs-2.2.0-tests.jar -DgroupId=org.apache.hadoop -DartifactId=hadoop-hdfs -Dversion=2.2.0 -Dclassifier=tests -Dpackaging=jar

分类:

技术点:

相关文章:

  • 2021-10-09
  • 2021-11-23
  • 2021-11-05
  • 2021-07-19
  • 2021-12-08
  • 2021-11-04
猜你喜欢
  • 2021-06-22
  • 2021-07-26
  • 2021-04-04
  • 2021-11-27
  • 2021-05-09
相关资源
相似解决方案