idea 推送jar包到maven私库
2024-10-20 13:29:04
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即可
最新文章
- SQL Server自动化运维系列——关于数据收集(多服务器数据收集和性能监控)
- LR中线程和进程的区别
- excel 怎么修饰图表
- FZU 1759 欧拉函数 降幂公式
- vim使用02
- 将回车键转tab键
- javaweb-dbcp
- hdu 3518(后缀数组)
- [摘抄] 为什么 Linq 可以高效率查询 SQL ?
- POJ 1276 Cash Machine -- 动态规划(背包问题)
- android 14 进度条和拖动条
- 公司项目笔记-导出excel
- iOS 之播放系统声音
- 3D旋转动画练习 demo
- Asp.Net Core NLog 将日志输出到数据库以及添加LayoutRenderer的支持
- js简单的注册页面
- Attribute2Image --- Conditional Image Generation from Visual Attributes 论文笔记
- ElasticSearch入门 第五篇:使用C#查询文档
- LeetCode 551. Student Attendance Record I (C++)
- MySQL服务器最大连接数的合理设置