-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRELEASE
134 lines (125 loc) · 5.22 KB
/
RELEASE
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
This document contains notes about how to release this software.
Required Settings
=================
This process expects the following information exists in your Maven settings file:
* Global : $MAVEN_HOME/conf/settings.xml
* Personal: $HOME/.m2/settings.xml
Store your username and password for the Sonatype Open Source Software Nexus server: https://oss.sonatype.org/index.html
<servers>
<server>
<id>sonatype-nexus-snapshots</id>
<username>${username}</username>
<password>${password}</password>
</server>
<server>
<id>sonatype-nexus-staging</id>
<username>${username}</username>
<password>${password}</password>
</server>
</servers>
Store your GNU OpenPGP password in a separate profile:
<profiles>
<profile>
<id>gpg</id>
<properties>
<gpg.passphrase>${gpg.passphrase}</gpg.passphrase>
</properties>
</profile>
</profiles>
Release Process
===============
Might be helpful for multi-module release:
http://onjavahell.blogspot.hk/2009/12/releasing-multi-module-project-using.html
https://dev.c-ware.de/confluence/display/PUBLIC/Releasing+modules+of+a+multi-module+project+with+independent+version+numbers
New instructions for 2019+
===============
* Check JAVA_HOME is set to a version of JDK8.
** Example: export JAVA_HOME=/home/kca/saveme/jdk1.8.0_261
export PATH="$JAVA_HOME/bin:$PATH"
* Below, you might use mvn.bash, instead of mvn, as it will correctly set JAVA_HOME
as JDK 8, instead of (default) JDK 11. Remember: This library is still restricted to JDK 8.
* mvn clean install
** Any compiler errors or failed/skipped tests must be cleaned-up.
** Fix any Javadoc warnings. Re-run as many times as necessary: mvn javadoc:javadoc
* git commit -a
* If necessary, merge branch back to master before release.
** Example:
*** git checkout master
*** git merge --no-ff other-branch-name
**** You will need to enter a commit/merge comment.
* mvn clean deploy
** This will do a SNAPSHOT build and deploy. Be patient; the upload can take five minutes!
** Check the SNAPSHOT build here: https://oss.sonatype.org/content/repositories/snapshots/com/googlecode/kevinarpe-papaya/
* mvn versions:set -DnewVersion=0.0.x
** ... where x is version number. If current pom.xml has 0.0.18-SNAPSHOT, then x=18
* mvn clean deploy -P release
** A password window will appear. Retrieve password from here: $M2_HOME/conf/settings.xml
* Login here: https://oss.sonatype.org/
* Wait about 10-30 mins and this will be updated: https://search.maven.org/search?q=kevinarpe-papaya
* git status
** You will see all pom.xml files updated from the previous command 'mvn versions:set ...'
* find . -name pom.xml | xargs git add
* git commit --message 'Release'
* git tag
** ... show list of existing tags
* git tag kevinarpe-papaya-parent-0.0.x
** ... add tag for version x
* git push --tags
* mvn versions:set -DnewVersion=0.0.y-SNAPSHOT
** ... where y=1+x
* find . -name pom.xml | xargs git add
* git commit --message 'Next version'
* git push
* find . -name pom.xml.versionsBackup | xargs rm --verbose
** ... to cleanup temp files from the previous command 'mvn versions:set ...'
* git status
** ... should be all clean now.
Old instructions before 2019
===============
* mvn clean install
** Any compiler errors or failed/skipped tests must be cleaned-up.
** Fix any Javadoc warnings. Re-run as many times as necessary: mvn javadoc:javadoc
* git commit -a
* If necessary, merge branch back to master before release.
** Example:
*** git checkout master
*** git merge --no-ff other-branch-name
**** You will need to enter a commit/merge comment.
* mvn release:clean
* mvn release:prepare -P gpg
* After, git status will be "dirty". Do not run 'git add'. Ignore and procede to next step.
* git push --tags origin master
* mvn release:perform -P gpg
* After, git status will be "clean".
* https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide#SonatypeOSSMavenRepositoryUsageGuide-8a.ReleaseIt
** Do the Nexus dance to push the staged release.
** https://oss.sonatype.org/
*** Staging Repositories
*** Find (and select) your repo (usually at the bottom)
*** Click button 'Close'
*** Enter witty comment
*** Wait about one minute, then click button 'Refresh'
*** Find (and select) your repo (again)
*** Click button 'Release'
*** Enter witty comment
* TODO: Script the next few steps below, including tagging
* git tag
** Find tag for most recent release
* git checkout $tag_name
* mvn javadoc:aggregate
** New root HTML doc: target/site/apidocs/index.html
** [INFO] --- maven-javadoc-plugin:2.9.1:aggregate (default-cli) @ kevinarpe-papaya-parent ---
[WARNING] Unable to find the resource 'home/kca/saveme2/git/kevinarpe-papaya/src/javadoc/stylesheet.css'. Using default Javadoc resources.
* cd ../kevinarpe-papaya.docs
* rm -Rf ./javadoc/*
* cp -R ../kevinarpe-papaya/target/site/apidocs/* ./javadoc/
* git add . --all
* git commit -a -m 'Release x'
* git tag -d release
* git push --delete origin release
* git tag -a kevinarpe-papaya.docs-0.0.x -m 'Release x'
** Can we figure out the latest tag from kevinarpe-papaya?
* git tag -a release -m 'Release x'
* git push --tags origin master
* Update project homepage with new Maven Central Repo dependency details:
http://code.google.com/p/kevinarpe-papaya/