forked from yegor256/qulice
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALL.txt
139 lines (104 loc) · 4.91 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
Copyright (c) 2011-2019, Qulice.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 Qulice.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>qulice.s3</id>
<username>....</username>
<password>....</password>
</server>
<server>
<id>sonatype.nexus</id>
<username>....</username>
<password>....</password>
</server>
</servers>
</settings>
At the moment the following two goals are defined in our CI
server:
1) mvn clean deploy -e -Dci --settings ../../closures/settings.xml
How to release new version to Maven Central:
---------------------------------
https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide#SonatypeOSSMavenRepositoryUsageGuide-8.ReleaseIt
http://www.sonatype.com/books/nexus-book/reference/staging-sect-managing-plugin.html
1. Create a new ticket in Trac, explaining why you want to release
a new version (for example see ticket #95)
2. Create new branch
svn cp ^/trunk ^/branches/ticket95 -m 'refs #95 - new branch' && svn sw ^/branches/ticket95
3. Replace <version qulice="yes">...</version> with the next
version you want to use, e.g.:
find . -name "*.xml" -exec sed -i "" 's|\(\<version qulice\=\"yes\"\>\)1\.0\-SNAPSHOT\(\<\/version\>\)|\10.2.2\2|g' {} \;
4. Commit your changes to SVN
svn ci -m 'refs #95 - version up'
5. Deploy code to sonatype
mvn -Dci -Pqulice -Psonatype clean deploy
Make sure that you have this profile in ~/.m2/settings.xml:
<profile>
<id>qulice</id>
<properties>
<gpg.homedir>/code/gpg/qulice</gpg.homedir>
<gpg.keyname>...</gpg.keyname>
<gpg.passphrase>...</gpg.passphrase>
</properties>
</profile>
6. Deploy site to Amazon S3
mvn -Dsite -Pqulice clean install site-deploy
7. Copy your branch to tags:
svn cp ^/branches/ticket95 ^/tags/qulice-0.2.2 -m "refs #95 - qulice-0.2.2 released to Maven Central"
8. Delete the branch or merge it back to trunk (if you did any changes). Don't
forget to revert back version number:
find . -name "*.xml" -exec sed -i "" 's|\(\<version qulice\=\"yes\"\>\)0\.2\.2\(\<\/version\>\)|\11.0-SNAPSHOT\2|g' {} \;
9. Commit changes
svn ci -m 'refs #95 - version back to SNAPSHOT'
10. Merge it back to TRUNK and close the ticket as "fixed"
That's it