网站快速被收录,能否设置网站做局域网,qq手机网页版在线登录,有哪些开发网站公司mvn install:install-file将本地一个中央仓库没有的jar包#xff0c;推到本地仓库----所有依赖不上仓库不能用!
前提#xff1a;maven等环境配置Ok
目标#xff1a;把中央仓库没有的#xff0c;部门内部 自研开发的jar#xff0c;推到私服或者本地服务器#xff0c;给相…mvn install:install-file将本地一个中央仓库没有的jar包推到本地仓库----所有依赖不上仓库不能用!
前提maven等环境配置Ok
目标把中央仓库没有的部门内部 自研开发的jar推到私服或者本地服务器给相关项目组使用
因为一般工程模块自己mvn install就会推到仓库但是别人给你个jar包咋整有源码 一般mvn install就会上本地仓库没有源码只有jar包
1.在需要推的jar的位置执行以下命令(注意空格和中杠) :mvn install:install-file -DfileE:\test\daofree.jar -DgroupIdcom.njjn -DartifactIddaofree -Dversion1.0 -Dpackagingjar 2.BUILD SUCCESS后去仓库查看已经生成了目标文件。可以发现仓库里的jar包名称也已经按照命令参数发生了变化。
安装第三方jar包到本地仓库
----进入jar包所在目录运行 mvn install:install-file -DgroupIdcom.alibaba -DartifactIdfastjson -Dversion1.1.37 -Dfilefastjson-1.1.37.jar -Dpackagingjar ----打开cmd直接运行 mvn install:install-file -DgroupIdcom.alibaba -DartifactIdfastjson -Dversion1.1.37 -Dpackagingjar -DfileE:\test\安装第三方jar包\fastjson-1.1.37.jar
安装第三方jar包到私服nexus
–在settings配置文件中添加登录私服第三方登录信息 server idthirdparty/id usernameadmin/username passwordadmin123/password /server
----进入jar包所在目录运行 mvn deploy:deploy-file -DgroupIdcom.alibaba -DartifactIdfastjson -Dversion1.1.37 -Dpackagingjar -Dfilefastjson-1.1.37.jar -Durlhttp://localhost:8081/nexus/content/repositories/thirdparty/ -DrepositoryIdthirdparty
----打开cmd直接运行 mvn deploy:deploy-file -DgroupIdcom.alibaba -DartifactIdfastjson -Dversion1.1.37 -Dpackagingjar -DfileE:\test\fastjson-1.1.37.jar -Durlhttp://localhost:8081/nexus/content/repositories/thirdparty/ -DrepositoryIdthirdparty