-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev-3.0.8' into dev-3.1.0
- Loading branch information
Showing
1 changed file
with
106 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
发布指南 | ||
|
||
源码库地址 | ||
========= | ||
|
||
Git Read-Only: git://github.com/webx/citrus.git | ||
HTTP Read+Write https://github.com/webx/citrus.git | ||
SSH Read+Write [email protected]:webx/citrus.git | ||
|
||
Maven的配置($HOME/.m2/settings.xml) | ||
==================================== | ||
|
||
<?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"> | ||
|
||
<servers> | ||
<server> | ||
<id>sonatype-nexus-snapshots</id> | ||
<username>your-jira-id</username> | ||
<password>your-jira-pwd</password> | ||
</server> | ||
<server> | ||
<id>sonatype-nexus-staging</id> | ||
<username>your-jira-id</username> | ||
<password>your-jira-pwd</password> | ||
</server> | ||
</servers> | ||
|
||
<profiles> | ||
<profile> | ||
<id>sonatype</id> | ||
<repositories> | ||
<repository> | ||
<id>sonatype-nexus-snapshots</id> | ||
<name>Sonatype Snapshots</name> | ||
<snapshots> | ||
<enabled>true</enabled> | ||
<updatePolicy>always</updatePolicy> | ||
<checksumPolicy>fail</checksumPolicy> | ||
</snapshots> | ||
<releases> | ||
<enabled>false</enabled> | ||
<updatePolicy>always</updatePolicy> | ||
<checksumPolicy>fail</checksumPolicy> | ||
</releases> | ||
<url>https://oss.sonatype.org/content/repositories/snapshots/</url> | ||
</repository> | ||
<repository> | ||
<id>sonatype-nexus-staging</id> | ||
<name>Sonatype Staging</name> | ||
<snapshots> | ||
<enabled>false</enabled> | ||
<updatePolicy>always</updatePolicy> | ||
<checksumPolicy>fail</checksumPolicy> | ||
</snapshots> | ||
<releases> | ||
<enabled>true</enabled> | ||
<updatePolicy>always</updatePolicy> | ||
<checksumPolicy>fail</checksumPolicy> | ||
</releases> | ||
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url> | ||
</repository> | ||
</repositories> | ||
</profile> | ||
</profiles> | ||
|
||
</settings> | ||
|
||
Maven库管理 - Staging | ||
===================== | ||
|
||
为了将项目的成果发布到central maven repository中,需要先将项目deploy到staging repository中 | ||
进行测试,然后再将它promote到central maven repository中。此步骤请参考文档: | ||
|
||
Sonatype OSS Maven Repository Usage Guide | ||
https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide | ||
|
||
Sonatype OSS Staging 库管理: https://oss.sonatype.org/ | ||
|
||
发布步骤 | ||
======== | ||
|
||
1. 确保所有源代码提交 | ||
2. checkout要发布的分支,例如:git checkout dev-3.0.8 | ||
3. 编译并测试整个项目:mvn clean install | ||
4. 分别发布parent和dist目录下的项目: | ||
|
||
cd citrus | ||
mvn clean deploy -N -Pdeployment | ||
|
||
cd dist/test | ||
mvn clean deploy -N -Pdeployment | ||
|
||
cd ../../dist/webx | ||
mvn clean deploy -N -Pdeployment | ||
|
||
确保使用deployment profile,以便生成sonatype所需要的数字签名。 | ||
|
||
5. 如果还需要发布其余的分支,切换到该分支,并重作2-4 | ||
6. 在应用中测试staging库,用sonatype profile,例如在应用的目录下执行:mvn jetty:run -Psonatype | ||
7. 在sonatype管理界面中promote项目到central maven repository | ||
8. 对发布版本创建tags | ||
9. 删除已发布的分支 | ||
10. 创建新的开发分支 |