Projet

Général

Profil

MAY Plugin Release Process » Historique » Version 2

Anonyme, 23/10/2014 10:59

1 1 Anonyme
h1. MAY Plugin Release Process
2 2 Anonyme
3
{{>toc}}
4
5
MAY is an Eclipse plugin, it is thus distributed using an Eclipse update site, but parts of it are also available through Maven Central for [[MAY Maven Standalone Setup|standalone use without Eclipse]].
6
7
h2. General Overview
8
9
h3. Phases
10
11
Releasing MAY implies different phases:
12
# Preparing for the release
13
# Tagging the release on Mercurial
14
# Deploying the release on Maven Central
15
# Deploying the release in the update site
16
# Preparing the next development cycle
17
18
All of this is of course fairly automatised using Maven, Tycho for the integrating Eclipse aspects with Maven and some Bash scripts.
19
20
h3. Modules
21
22
MAY is decomposed in 5 different software modules (which are to 5 Maven projects and some of them Eclipse artefacts):
23
* fr.irit.smac.may.speadl.parent: it contains general Maven instructions shared by the other modules.
24
* fr.irit.smac.may.speadl: it contains the code for the Eclipse plugin, without the UI aspects, and it is also the Maven artefact needed for [[MAY Maven Standalone Setup|standalone use without Eclipse]].
25
* fr.irit.smac.may.speadl.ui: it contains the UI code for the Eclipse plugin.
26
* fr.irit.smac.may.speadl.feature: it is an installable unit from the update site that combines the two previous Eclipse plugins.
27
* fr.irit.smac.may.speadl.updatesite: it contains everything needed for generating and deploying the update site containing the previous feature.
28
29
Only the first two are deployed to Maven Central.
30
The plugins and the features will end up in the update site.
31
32
h3. Syntactical Version Numbering
33
34
The Eclipse plugins follow the OSGI version numbering and it is stored in the *MANIFEST.MF* file of each project.
35
The Maven artefact follows the Maven version numbering and it is stored in the *pom.xml* file of each project.
36
All are using the 3 digits "SemVer":http://semver.org/ system (Major.Minor.Patch).
37
38
For the plugins, this is followed by a qualifier (Major.Minor.Patch.qualifier) that is replaced with the compilation time and date.
39
For the Maven artefacts, for non-release (development versions), this is followed  by the SNAPSHOT element (Major.Minor.Patch-SNAPSHOT) that is replaced with the compilation time and date.
40
41
So the plugins always have the qualifier while the Maven artefacts have the SNAPSHOT information only for development.
42
43
h3. Semantic Version Numbering
44
45
The MAJOR number changes when the syntax is incompatible with the previous one.
46
The MINOR number changes when the generated code is incompatible with the previous one.
47
The PATCH number changes for the rest.
48
49
h3. Example
50
51
For the sake of this guide, we will consider that we are releasing a new version numbered 3.4.0 (and thus we were developing 3.4.0-SNAPSHOT).
52
53
h2. Preparing for the Release
54
55
First, everything must be committed to Mercurial before doing the version update (this can be verified with @hg status@ before).
56
57
We just finished developing the 3.4.0-SNAPSHOT version and want to release the new 3.4.0 version.
58
We must update the POM files to reflect that, but do not touch the MANIFEST files:
59
<pre>
60
$ cd fr.irit.smac.may.speadl.parent
61
$ mvn -Dtycho.mode=maven versions:set -DnewVersion=3.4.0
62
</pre>
63
64
This is done from the parent directory and will impact all the modules.
65
The @-Dtycho.mode=maven@ part of the line tells Maven not to try to resolve Eclipse aspects that takes time and are useless here.
66
67
Now our Maven artefacts are versioned 3.4.0 while the plugins are versioned 3.4.0.qualifier.
68
69
h2. Tagging the Release
70
71
Now we commit these changes and tag them in Mercurial:
72
<pre>
73
$ hg commit -m "prepare for 3.4.0 release"
74
$ hg tag v3.4.0
75
</pre>
76
77
The commit must only change the POM files, nothing else (this can be verified with @hg status@ before).
78
79
h2. Deploying the Release on Maven Central
80
81
Then, the release has to be deployed to Maven Central:
82
<pre>
83
$ mvn -P release clean deploy
84
</pre>
85
86
The @-P release@ argument of the line is important so that the deployed artefacts have a source and javadoc associated artefact and are signed as needed by Maven Central.
87
See "this page":http://central.sonatype.org/pages/requirements.html for more information on these matters.