maven deploy + IDEA
使用IDEA部署jar包到maven仓库
在项目的pom里声明要部署的仓库
1
2
3
4
5
6
7
8
9
10
11
12<distributionManagement>
<repository>
<id>libs-releases-local</id>
<name>Release Repository</name>
<url>http://xxxx/libs-releases-local</url>
</repository>
<snapshotRepository>
<id>libs-snapshots-local</id>
<name>Snapshot Repository</name>
<url>http://xxxx/libs-snapshots-local</url>
</snapshotRepository>
</distributionManagement>maven的settings.xml中配置servers:
- 这里的用户名密码是 maven仓库的
- 这里的id要和上面的id相同
1
2
3
4
5
6
7
8
9
10
11
12<servers>
<server>
<id>libs-releases-local</id>
<username>用户名</username>
<password>密码</password>
</server>
<server>
<id>libs-snapshots-local</id>
<username>用户名</username>
<password>密码</password>
</server>
</servers>
在IDEA的maven小窗口:Lifecycle–deploy