1.推送到本地仓库

idea直接install即可

2.推送到公司私库

2.1 使用配置公司仓库地址的setting文件

<?xml version="1.0" encoding="UTF-8"?>

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> <pluginGroups>
<!-- pluginGroup
| Specifies a further group identifier to use for plugin lookup.
<pluginGroup>com.your.plugins</pluginGroup>
--> </pluginGroups> <proxies> </proxies> <servers> <server>
<id>admin</id>
<username>admin</username>
<password>admin123</password>
</server> </servers> <mirrors>
<mirror>
<id>center</id>
<mirrorOf>*</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://192.168.6.1/nexus/content/groups/public</url>
</mirror>
<mirror>
<id>releases</id>
<mirrorOf>*</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://192.168.6.1/nexus/content/groups/releases</url>
</mirror>
<mirror>
<id>thirdparty</id>
<mirrorOf>*</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://192.168.6.1/nexus/content/repositories/thirdparty</url>
</mirror>
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror> </mirrors> <profiles>
<profile>
<id>myprofile</id>
<repositories>
<repository>
<id>central</id>
<url>http://192.168.6.1/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>releases</id>
<url>http://192.168.6.1/nexus/content/groups/releases</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile> <profile>
<!--<id>jdk-1.7</id> <activation> <activeByDefault>true</activeByDefault>
<jdk>1.7</jdk>
</activation>
<properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<maven.compiler.compilerVersion>1.7</maven.compiler.compilerVersion>
</properties> <repositories>
<repository>
<id>jdk16</id>
<name>Repository for JDK 1.6 builds</name>
<url>http://www.myhost.com/maven/jdk16</url>
<layout>default</layout>
<snapshotPolicy>always</snapshotPolicy>
</repository>
</repositories> -->
</profile> </profiles> <activeProfiles>
<activeProfile>myprofile</activeProfile>
</activeProfiles> </settings>
2.2 在pom中添加
<distributionManagement>
<repository>
<id>admin</id>
<name>release</name>
<url>http://192.168.6.1/nexus/content/repositories/thirdparty/</url>
</repository>
<snapshotRepository>
<id>admin</id>
<name>maven-snapshots</name>
<url>http://192.168.6.1/nexus/content/repositories/thirdparty/</url>
</snapshotRepository>
</distributionManagement>

注意 : id 里的admin 与 seting文件中的sever id保持一致 url地址注意更改

2.3 idea 直接 depoly即可

idea 推送jar包到maven私库的更多相关文章

  1. Maven 如何发布 jar 包到 Nexus 私库

    Nexus2可以通过管理界面来上传jar包到私库中,而最新的Nexus3却找不到了上传界面,只能通过以下方式来发布到私库. 发布第三方jar包 这种情况是maven远程仓库没有,本地有的第三方jar包 ...

  2. Maven如何发布jar包到Nexus私库

    Nexus2可以通过管理界面来上传jar包到私库中,而最新的Nexus3却找不到了上传界面,只能通过以下方式来发布到私库. 发布第三方jar包 这种情况是maven远程仓库没有,本地有的第三方jar包 ...

  3. Maven deploy部署jar包到远程私仓

    Maven deploy部署jar包到远程私仓 maven deploy介绍 maven中的仓库分为两种,snapshot快照仓库和release发布仓库.snapshot快照仓库用于保存开发过程中的 ...

  4. maven推送本地包到私服

    前置要求:配置正确的settings.xml maven 推送 本地jar 到私服的命令示例: mvn deploy:deploy-file -DgroupId=com.oracle -Dartifa ...

  5. 使用 Cake 推送 NuGet 包到 AzureDevops 的 Artifacts 上

    前言 大家好,我最近在想如何提交代码的时候自动的打包 NuGet 然后发布到 AzureDevOps 中的 Artifacts,在这个过程中踩了很多坑,也走了很多弯路,所以这次篇文章就是将我探索的结果 ...

  6. 如何发布jar包到maven中央仓库

    自使用maven以来,没少使用maven中央仓库中的各种jar包,方便有效,但是咱们也不能总是只取不予,也应该懂得奉献,当你写好了一个十分好用的jar包,想贡献出去给大家使用的时候,应该怎么做呢?当然 ...

  7. 如何发布自己的 jar 包到 maven 中央仓库(待更新...)

    参考链接 如何发布自己的 jar 包到 maven 中央仓库

  8. 手动添加jar包到maven仓库

    引言: 虽然配置了maven以后可以通过索引的方式自动下载jar包到本地maven仓库,从而使项目中直接使用本地仓库里面的架包, 但是这一招并不是每一次都灵应,也有遇到了失败的时候,当遇到失败的时候, ...

  9. IDEA 热部署 + 下载jar包放到maven中

    IDEA 热部署: 1 :  POM中加入devtools的依赖,就可以实现热部署 <dependency> <groupId>org.springframework.boot ...

随机推荐

  1. 图表可视化seaborn风格和调色盘

    seaborn是基于matplotlib的python数据可视化库,提供更高层次的API封装,包括一些高级图表可视化等工具. 使用seaborn需要先安装改模块pip3 install seaborn ...

  2. Dom运用2

    1.登录系统 <!--输入框创建--> 账号:<input class="ipt" type="text"><br> 密码: ...

  3. Fortify Audit Workbench 笔记索引

    Password Management: Password in Configuration File(明文存储密码) https://www.cnblogs.com/mahongbiao/p/124 ...

  4. MacOS下JDK8的安装与配置

    微信搜索"艺术行者",关注并回复关键词"jdk8"获取安装包和API文档资料! 一.安装环节 1.打开网页 https://www.oracle.com/jav ...

  5. mongodb因为上一次异常关闭导致锁死,连接失败

    之前一直可以用,但是突然在启动node,服务端的时候报错,(下面的错误信息都是复制的网上的报错信息,刚才忘记截图错误信息了,现在已经解决问题) 这是服务端的报错 (node:17453) Unhand ...

  6. PHP array_key_exists() 函数

    实例 检查键名 "Volvo" 是否存在于数组中: <?php $a=array("Volvo"=>"XC90","B ...

  7. Python 字典(Dictionary) len()方法

    Python 字典(Dictionary) len()方法 描述 Python 字典(Dictionary) len() 函数计算字典元素个数,即键的总数.高佣联盟 www.cgewang.com 语 ...

  8. linux下使用vscode和makefile搭建C++开发环境

    最近在linux上跑一些开源库做学习用, 顺手就搭了一下vscode的c++开发环境, 这里分享一下vscode进行C++开发的基本环境结构. 1. 首先是编辑器, vscode直接官网下载的, 后期 ...

  9. OKHttp 官方文档【二】

    OkHttp 是这几年比较流行的 Http 客户端实现方案,其支持HTTP/2.支持同一Host 连接池复用.支持Http缓存.支持自动重定向 等等,有太多的优点. 一直想找时间了解一下 OkHttp ...

  10. [转] Java Agent使用详解

    以下文章来源于古时的风筝 ,作者古时的风筝 我们平时写 Java Agent 的机会确实不多,也可以说几乎用不着.但其实我们一直在用它,而且接触的机会非常多.下面这些技术都使用了 Java Agent ...