介绍
本文档旨在设置 Maven 提交者设置,即${user.home}/.m2/settings.xml.
启用 Apache 服务器
Maven 使用多个服务器配置在 Apache 服务器上部署快照和发布。你需要告诉 Maven 你的 Apache 用户名是什么。
强烈建议对您的密码使用 Maven 的密码加密功能。
<settings>
...
<servers>
<!-- To publish a snapshot of some part of Maven -->
<server>
<id>apache.snapshots.https</id>
<username> <!-- YOUR APACHE LDAP USERNAME --> </username>
<password> <!-- YOUR APACHE LDAP PASSWORD --> </password>
</server>
<!-- To stage a release of some part of Maven -->
<server>
<id>apache.releases.https</id>
<username> <!-- YOUR APACHE LDAP USERNAME --> </username>
<password> <!-- YOUR APACHE LDAP PASSWORD --> </password>
</server>
...
</servers>
</settings>启用发送通知电子邮件
为了能够发送 Maven 发布公告,您需要在配置文件中添加几个属性apache-release。
<settings>
...
<profiles>
<profile>
<id>apache-release</id>
<properties>
<apache.availid> <!-- YOUR APACHE LDAP USERNAME --> </apache.availid>
<smtp.host> <!-- YOUR SMTP SERVER --> </smtp.host>
</properties>
</profile>
...
</profiles>
</settings>


