Skip to content

Commit 513eb04

Browse files
committed
ci: use Maven wrapper
1 parent ca02a1a commit 513eb04

8 files changed

Lines changed: 439 additions & 25 deletions

File tree

.github/workflows/build.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -160,16 +160,10 @@ jobs:
160160
key: ${{ runner.os }}-${{ runner.arch }}-repo-tycho-${{ hashFiles(format('target-platforms/{0}.target', matrix.target-platform)) }}
161161

162162

163-
- name: "Install: Maven"
164-
uses: stCarolas/setup-maven@v5 # https://github.com/stCarolas/setup-maven
165-
with:
166-
maven-version: 3.9.9
167-
168-
169163
- name: "Build with Maven 🔨"
170164
continue-on-error: ${{ matrix.target-platform == 'unstable' }}
171165
run: |
172-
set -eu
166+
set -euo pipefail
173167
174168
MAVEN_OPTS="${MAVEN_OPTS:-}"
175169
if [[ "${{ runner.os }}" == "Windows" ]]; then
@@ -183,14 +177,14 @@ jobs:
183177
echo "MAVEN_OPTS: $MAVEN_OPTS"
184178
185179
if [[ ${ACT:-} == "true" ]]; then # when running locally using nektos/act
186-
maven_args="-Djgit.dirtyWorkingTree=warning"
180+
maven_args="-Djgit.dirtyWorkingTree=warning"
187181
else
188-
maven_args="--no-transfer-progress"
182+
maven_args="--no-transfer-progress"
189183
fi
190184
191185
# prevent "org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed]" on Linux
192186
${{ runner.os == 'Linux' && 'xvfb-run --auto-servernum --server-args="-screen 0 1600x900x24" \' || '' }}
193-
mvn \
187+
./mvnw \
194188
--errors \
195189
--update-snapshots \
196190
--batch-mode \

.github/workflows/licensecheck.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,6 @@ jobs:
8888
key: ${{ runner.os }}-${{ runner.arch }}-repo-tycho-${{ hashFiles('target-platforms/oldest.target') }}
8989

9090

91-
- name: "Install: Maven"
92-
uses: stCarolas/setup-maven@v5 # https://github.com/stCarolas/setup-maven
93-
with:
94-
maven-version: 3.9.9
95-
96-
9791
- name: Dash License check # see https://github.com/eclipse/dash-licenses
9892
run: |
9993
set -eu
@@ -119,7 +113,7 @@ jobs:
119113
dash_iplab_token_arg="-Ddash.iplab.token=$DASH_IPLAB_TOKEN"
120114
fi
121115
122-
(set -x; mvn \
116+
(set -x; ./mvnw \
123117
--errors \
124118
--update-snapshots \
125119
--batch-mode \
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
wrapperVersion=3.3.2
18+
distributionType=only-script
19+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ Latest builds, for testing, can be found at https://download.eclipse.org/tm4e/sn
4444

4545
### 🏗️ Build
4646

47-
Prerequisite: Latest [Apache Maven](https://maven.apache.org/) release or Eclipse [m2e](https://www.eclipse.org/m2e/).
48-
49-
- From the command line: run `mvn clean verify`
50-
- From within Eclipse : right-click on the tm4e root folder > Run As > Maven build
47+
- From the command line run:
48+
- on Windows `mvnw clean verify`
49+
- on Linux `./mvnw clean verify`
50+
- From within Eclipse with [M2E](https://www.eclipse.org/m2e/) installed: right-click on the tm4e root folder > Run As > Maven build
5151

5252
#### Running the CI job locally:
5353

Jenkinsfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ pipeline {
99
}
1010

1111
tools {
12-
maven 'apache-maven-latest' // https://wiki.eclipse.org/Jenkins#Apache_Maven
1312
jdk 'temurin-jdk17-latest'
1413
}
1514

@@ -33,14 +32,14 @@ pipeline {
3332
script {
3433
if (env.BRANCH_NAME == 'main') {
3534
withCredentials([string(credentialsId: 'gpg-passphrase', variable: 'KEYRING_PASSPHRASE')]) {
36-
sh '''mvn clean deploy -B \
35+
sh '''./mvnw clean deploy -B \
3736
-Dmaven.test.failure.ignore=true \
3837
-Dsurefire.rerunFailingTestsCount=3 \
3938
-Psign -Dgpg.passphrase="${KEYRING_PASSPHRASE}"
4039
'''
4140
}
4241
} else {
43-
sh '''mvn clean verify -B \
42+
sh '''./mvnw clean verify -B \
4443
-Dmaven.test.failure.ignore=true \
4544
-Dsurefire.rerunFailingTestsCount=3
4645
'''

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ Here are some projects that use tm4e:
113113
- **License**: TM4E is a community open-source project licensed under the [Eclipse Public License 2.0](LICENSE).
114114
- **Support**: You can ask (and answer!) questions in the [GitHub discussions](https://github.com/eclipse/tm4e/discussions). Report bugs, and request features using [GitHub issues](https://github.com/eclipse/tm4e/issues).
115115
- **Source Code**: This `github.com/eclipse/tm4e` repository is the reference repository to contribute to TM4E
116-
- **Build**: Builds can be performed with a simple `mvn clean verify`
116+
- **Build**: Builds can be performed with a simple `./mvnw clean verify`
117117
- **Continuous testing, integration and deployment** is performed by CI jobs at https://ci.eclipse.org/tm4e/ and https://github.com/eclipse/tm4e/actions
118118
- **Developers mailing-list**: Contributors are also expected to subscribe the [tm4e-dev mailing-list](https://dev.eclipse.org/mailman/listinfo/tm4e-dev).
119119
- **Becoming a committer**: as usual with Eclipse.org projects, anyone who's made significant contributions and who's upheld quality standards alongside good judgement and open-mindedness.

mvnw

Lines changed: 259 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)