This repository has been archived by the owner on Jun 12, 2018. It is now read-only.
forked from easymock/easymock
-
Notifications
You must be signed in to change notification settings - Fork 26
/
build.txt
175 lines (144 loc) · 7.65 KB
/
build.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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
I'm using:
- Eclipse 4.2.2 (Juno Service Release 2)
- Maven 3.1.1
- m2e with the following connectors:
- buildhelper (for build-helper-maven-plugin)
- Tycho Project Configurator bridges tycho based projects and PDE (for maven-bundle-plugin)
- mavenarchiver basic support
- IntelliJ 12.1.4 (in replacement to Eclipse)
--------------------------------------------------------------------------------------
To build EasyMock with Maven
--------------------------------------------------------------------------------------
There are three different levels of build.
1. Build without any active profile
It is a basic compilation of the application.
- "mvn install"
2. Full build
This build will check code coverage with Clover (must be 100%) and
validate that the license headers are correctly set.
You need to add a section to your settings.xml in order to make it works
<profile>
<id>easymock</id>
<properties>
<maven.clover.licenseLocation>${user.home}/clover.license</maven.clover.licenseLocation>
</properties>
</profile
To tell clover where to find its license
Then launch with
- "mvn install -PfullBuild"
3. Deploy build
This is the build to launch to deploy to the surefire repository. It assembles the application and add
the gpg checksum. You will usually launch it on top of the full build.
The command line will ask you to give the passphrase for the gpg private key.
- "mvn install -PdeployBuild"
4. Continuous integration
A continuous integration is provided by Cloudbees. You will find the following builds:
- https://henri.ci.cloudbees.com/job/easymock-commit/ : Build launch on commit
--------------------------------------------------------------------------------------
To compile EasyMock in Eclipse
--------------------------------------------------------------------------------------
- Install m2e
- Import the EasyMock Maven parent project to your Eclipse workspace
--------------------------------------------------------------------------------------
To update the versions
--------------------------------------------------------------------------------------
- "mvn versions:set -DnewVersion=X.Y -Pandroid"
- "mvn versions:commit -Pandroid" if everything is ok, "mvn versions:revert -Pandroid" otherwise
--------------------------------------------------------------------------------------
Configure to deploy to the Sonatype maven repository
--------------------------------------------------------------------------------------
- You will first need to add something like this to your settings.xml
<servers>
<server>
<id>sonatype-nexus-snapshots</id>
<username>sonatypeuser</username>
<password>sonatypepassword</password>
</server>
<server>
<id>sonatype-nexus-staging</id>
<username>sonatypeuser</username>
<password>sonatypepassword</password>
</server>
</servers>
- Then follow the instructions from the site below to create your key to sign the deployed items
https://www.sonatype.com/people/2010/01/how-to-generate-pgp-signatures-with-maven/
--------------------------------------------------------------------------------------
To generate the aggregated clover report
--------------------------------------------------------------------------------------
- After a fullBuild, at the EasyMock parent project level
- Type 'mvn verify clover2:aggregate -PfullBuild'
- Then 'mvn -N clover2:clover'
--------------------------------------------------------------------------------------
To build the maven site (with findbugs, checkstyle, jdepends and JavaNCSS reports)
--------------------------------------------------------------------------------------
- You will to give enough memory to maven with 'set MAVEN_OPTS=-Xmx512m' (or setting it as environment variable)
- Then type 'mvn site'
--------------------------------------------------------------------------------------
To check dependencies and plugins versions
--------------------------------------------------------------------------------------
- mvn versions:display-dependency-updates versions:display-plugin-updates
--------------------------------------------------------------------------------------
To download the sources associated to our dependencies
--------------------------------------------------------------------------------------
- mvn dependency:resolve -Dclassifier=sources
--------------------------------------------------------------------------------------
To update the license
--------------------------------------------------------------------------------------
- mvn validate license:format
--------------------------------------------------------------------------------------
Android
--------------------------------------------------------------------------------------
- Install the Android SDK
- Configure a device (real or simulated)
- Activate the debug mode if it's a real device
- mvn install -Pandroid
--------------------------------------------------------------------------------------
To bundle EasyMock and deploy
--------------------------------------------------------------------------------------
- Update "easymock/ReleaseNotes.txt"
- Add a little speech on the features
- Retrieve the release notes in the textual format (https://jira.codehaus.org/browse/EASYMOCK#selectedTab=com.atlassian.jira.plugin.system.project%3Aroadmap-panel)
- In local:
mvn versions:set -DnewVersion=x.y -Pandroid
mvn versions:commit -Pandroid
git commit -am "Move to version x.y"
mvn -T 8.0C clean deploy -PfullBuild,deployBuild -Dgpg.passphrase=xxxx
- Close the deployment at Sonatype Nexus UI (https://oss.sonatype.org/index.html#stagingRepositories)
More details on the deployment rules here: https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide
- Add the staging repository url found in Nexus to easymock-test-deploy
<repositories>
<repository>
<id>sonatype-nexus-staging</id>
<name>Nexus Release Repository</name>
<url>https://oss.sonatype.org/content/repositories/orgeasymock-213/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
- In local:
mvn -f easymock-test-deploy/pom.xml clean test
./prepare-website.sh x.y "This version contains cool stuff"
git commit -am "Documentation for version x.y"
git tag -a easymock-x.y -m "EasyMock x.y"
git push --tags
- Release the repository. It will be synced with Maven Central Repository
- Go to the File Manager on the EasyMock SF project (https://sourceforge.net/projects/easymock/files/?source=navbar)
- In EasyMock, create a folder named "x.y"
- Upload "easymock/target/easymock-x.y-bundle.zip" and "easymock/ReleaseNotes.txt" in the newly created directory
- Show the detailled information and rename it to remove the "-bundle" at the end
- Show the detailled information and rename it to readme.txt
- Repeat these step for EasyMock Class Extension
- Launch easymock-site on Cloudbees
- Release the Jira version (https://jira.codehaus.org/plugins/servlet/project-config/EASYMOCK/versions)
- Announce to [email protected], twitter, blog
--------------------------------------------------------------------------------------
Start next version
--------------------------------------------------------------------------------------
In local:
- mvn versions:set -DnewVersion=X.Z-SNAPSHOT -Pandroid
- mvn versions:commit -Pandroid
- Create next version in Jira (https://jira.codehaus.org/plugins/servlet/project-config/EASYMOCK/versions)