Jar的maven配置
<dependency>
<groupId>pentaho-kettle</groupId>
<artifactId>kettle-core</artifactId>
<version>5.0.1-stable</version>
</dependency>
1. 将Jar包安装到本地仓库
命令:
[html] view plain copy
- mvn install:install-file-Dfile=C:\Users\pcdalao\Desktop\Kettle\kettle-core-5.0.1-stable.jar-DgroupId=pentaho-kettle-DartifactId=kettle-core-Dversion=5.0.1-stable-Dpackaging=jar
-- DgroupId和DartifactId构成了该jar包在pom.xml的坐标, 对应依赖的DgroupId和DartifactId
-- Dfile表示需要上传的jar包的绝对路径
-- Dversion 为安装文件的版本信息
-- Dpackaging 为安装文件的种类
2. 上传Jar到私服
命令:
[html] view plain copy
- mvn deploy:deploy-file-DgroupId=pentaho-kettle-DartifactId=kettle-core-Dversion=5.0.1-stable-Dpackaging=jar-Dfile=C:\Users\pcdalao\Desktop\Kettle\kettle-core-5.0.1-stable.jar-Durl=http://localhost:8081/nexus/content/repositories/thirdparty-DrepositoryId=thirdparty
-- DgroupId和DartifactId构成了该jar包在pom.xml的坐标, 对应依赖的DgroupId和DartifactId
-- Dfile表示需要上传的jar包的绝对路径
-- Durl私服上仓库的url精确地址(打开nexus左侧repositories菜单,可以看到该路径)
-- DrepositoryId服务器的表示id,在nexus的configuration可以看到