/
INSTALL.txt
161 lines (119 loc) · 5.39 KB
/
INSTALL.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
Copyright (c) 2012-2024, jcabi.com
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met: 1) Redistributions of source code must retain the above
copyright notice, this list of conditions and the following
disclaimer. 2) Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution. 3) Neither the name of the jcabi.com nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
===============================================================================
Prerequisites
-------------
To build the project you need the following:
- JDK 1.6
- Maven (>= 3.0.3)
Continuous Integration Configuration
------------------------------------
Continuous Integration platform has to be configured to run
"mvn deploy" on every commit. Besides that the platform has to
have "settings.xml", "pubring.gpg", and "secring.gpg" files available
near the project source code base. These files are not inside SVN
repository for security reasons. They have to be provided by the CI
platform owner (the project owner, in most cases). "settings.xml"
file has to document connection settings to the sonatype repository
and web deployment platform. For example (this is a complete example
of "setting.xml" file):
<settings>
<profiles>
<profile>
<id>ci</id>
<properties>
<gpg.homedir>../../closures/</gpg.homedir>
<gpg.keyname>...</gpg.keyname>
<gpg.passphrase>....</gpg.passphrase>
</properties>
</profile>
</profiles>
<servers>
<server>
<id>www.jcabi.com</id>
<username>....</username>
<password>....</password>
</server>
<server>
<id>oss.sonatype.org</id>
<username>....</username>
<password>....</password>
</server>
</servers>
</settings>
At the moment the following goal is defined in our CI server:
mvn clean deploy -e -U -Pqulice --settings ../../closures/settings.xml
How to release new version to Maven Central:
---------------------------------
https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide
http://www.sonatype.com/books/nexus-book/reference/staging-sect-managing-plugin.html
https://docs.sonatype.org/display/Repository/How+To+Generate+PGP+Signatures+With+Maven
1. Create a new ticket in GitHub, explaining why you want to release
a new version
2. Create new branch, see https://github.com/yegor256/jcabi/issues/87
for a live example
git checkout -b 87
3. Set the right version:
mvn versions:set
Change <version> manually in PARENT module
Change jcabi.version property in PARENT module
Change parent pom version in main pom.xml
git commit -am '#87: version set to 0.5.4'
4. Update versions:
mvn versions:use-latest-versions
git commit -am '#87: versions automatically updated'
5. Explain this new release in changes/changes.xml release notes,
and in README.md
6. Deploy the product to Sonatype:
rm -rf ~/.m2/repository/com/jcabi
mvn -Pqulice -Psonatype -Pjcabi clean deploy
Make sure that you have this profile in ~/.m2/settings.xml:
<profile>
<id>jcabi</id>
<properties>
<gpg.homedir>/code/gpg/jcabi</gpg.homedir>
<gpg.keyname>...</gpg.keyname>
<gpg.passphrase>...</gpg.passphrase>
</properties>
</profile>
7. Tag the branch
git tag -a jcabi-0.5.4 -m '#87: version 0.1.2 released to Maven Central'
git push origin jcabi-0.5.4
8. Revert version back to SNAPSHOT:
mvn versions:set
change them manually in PARENT module
git commit -am '#87: version back to SNAPSHOT'
9. Merge the branch to 'master':
git checkout master && git merge 87 && git push origin master && git branch -D 87
10. In 4 hours, when the artifact is available in Maven Central,
checkout the tag and deploy the site to Amazon S3:
git checkout jcabi-0.5.4
mvn -Psite clean install site-deploy
11. Announce the release in Google Groups:
https://groups.google.com/forum/?fromgroups#!forum/jcabi
12. Announce the release in Twitter/Facebook/everywhere :)
13. Close the issue as "fixed" in Github
That's it