Skip to content

Commit

Permalink
Merge branch 'dev-3.0.8' into dev-3.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Zhou committed Jun 22, 2012
2 parents c63ed9c + 860b5ed commit 44eaaf1
Showing 1 changed file with 106 additions and 0 deletions.
106 changes: 106 additions & 0 deletions DEPLOY.txt
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. 创建新的开发分支

0 comments on commit 44eaaf1

Please sign in to comment.