mvn deploy:deploy-file -DgroupId=com.example -DartifactId=demo -Dversion=1.0 -Dpackaging=jar -DrepositoryId=nexus -Dfile=C:\Users\Administrator\Desktop\demo.jar -Durl=http://192.168.59.2:8081/repository/maven-releases/ -DgeneratePom=false
比如:mvn deploy:deploy-file -DgroupId=com.ccb -DartifactId=servlet -Dversion=1.0 -Dpackaging=jar -DrepositoryId=nexus -Dfile=C:\Users\Administrator\Desktop\VerifyAuth.jar -Durl=http://192.168.59.2:8081/repository/maven-releases/ -DgeneratePom=false
这里的nexus对应mvn配置文件里的setting.xml里的
<servers> <!-- server | Specifies the authentication information to use when connecting to a particular server, identified by | a unique name within the system (referred to by the 'id' attribute below). | | NOTE: You should either specify username/password OR privateKey/passphrase, since these pairings are | used together. | <server> <id>deploymentRepo</id> <username>repouser</username> <password>repopwd</password> </server> --> <!-- Another sample, using keys to authenticate. <server> <id>siteServer</id> <privateKey>/path/to/private/key</privateKey> <passphrase>optional; leave empty if not used.</passphrase> </server> --> <server> <id>nexus</id> <username>admin</username> <password>123456</password> </server> </servers>
实在不行可以pom.xml里用compile插件,引入jar包 <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <encoding>UTF-8</encoding> <compilerArguments> <extdirs>src/main/lib</extdirs> </compilerArguments> </configuration> </plugin>
如果要指定settings.xml
mvn -s D:\app\apache-maven-3.2.3\conf\settings.xml deploy:deploy-file -DgroupId=com.abc.pay -DartifactId=client -Dversion=3.1.1 -Dpackaging=jar -Dfile=C:\Users\dongsw\Desktop\client-3.1.1.jar -Durl=http://192.168.59.240:8081/repository/maven-releases/ -DrepositoryId=releases
示例
mvn -s C:\Users\Administrator\.m2\settings.xml deploy:deploy-file -DgroupId=com.websocket.goeasy -Durl=http://maven.sxb.lol/repository/maven-releases/ -DartifactId=goeasy-sdk -Dversion=1.0.0 -Dpackaging=jar -Dfile=C:\Users\Administrator\Desktop\goeasy-sdk-0.3.5.jar -DrepositoryId=releases -X
注意-DrepositoryId=release跟server的id一致
相关推荐
maven3.0maven3.0maven3.0maven3.0maven3.0maven3.0maven3.0maven3.0maven3.0maven3.0
maven servlet 3.0 eclipse config video
apache-maven-3.0,java1.6版本使用 。
apache-maven-3.0 安装包和源文件 apache-maven-3.0 安装包和源文件 apache-maven-3.0 安装包和源文件 apache-maven-3.0 安装包和源文件
maven打包 maven打jar包详细步骤
go语言写的一个工具,用于批量上传本地仓库的jar到nexus私库。目前只有exe没有生成linux脚本。文件夹中有使用说明。 .\mvnDeployTool.exe -r C:\\Users\\yyc\\.m2\\repository\\org\\apache\\maven -s D:\devEnv\...
maven 打jar包,source包,并上传到本地maven库
maven-core-3.0.jar
开发人员的福音,MAVEN私服,nexus截止到目前最新版,提供共完善jar包依赖使用功能
Maven Nexus 私服搭建 从零开始,资源下载、安装指导、开发配置说明
maven-settings-3.0.jar
maven上传jar包到nexus私有库 由于是nexus菜鸟,不知道要上传哪些包,所以全部本地上传,一个一个的写太麻烦,于是写了个批量生成maven脚本的py脚本,使用说明见py文件内部说明
当前pom.xml中详细的记录了将maven项目打成可运行jar包的完整代码,使用maven的插件maven-assembly-plugin,同时将所有依赖打到jar包中,亲测可用。
本篇文章主要介绍了Maven引入本地Jar包并打包进War包中的方法,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧
比较常用的Jar包,maven比较常用的Jar包不用从中央仓库下载。节省时间
ImpalaJDBC驱动包,用于Impala数据库连接,Maven配置所需的jar包
maven工程下qrcode jar包下载失败,提供两个qrcode.jar QRCode_swetake-3.0.0.jar 包,cmd命令行安装方法,maven手动添加jar包 qrcode.jar QRCode_swetake-3.0.0.jar
JSONObject对象相关的jar包依赖,一共有6个;还有maven环境下管理的jar包
借此项目,可将下载的maven的jar包按指定格式修改后,maven批量导入第三方jar包至maven本地库,实现快速的maven自动导入maven本地库(建议需要导入的jar包较多时使用)