Skip to content

Commit

Permalink
Don't use maven batch mode locally
Browse files Browse the repository at this point in the history
Since some versions the batch mode parameter disables colored output.
Therefore it should only be used on CI systems nowadays. Instead use
"-ntp" to suppress all the download messages.
  • Loading branch information
Bananeweizen authored and HannesWell committed Jan 16, 2023
1 parent 9dda6b9 commit 7943365
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Build m2e-core
uses: GabrielBB/xvfb-action@v1
with:
run: mvn clean verify -Pits -Dtycho.p2.baselineMode=failCommon
run: mvn clean verify -Pits -Dtycho.p2.baselineMode=failCommon --batch-mode
- name: Upload Test Results
uses: actions/upload-artifact@v3
with:
Expand Down
5 changes: 4 additions & 1 deletion .mvn/maven.config
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
-B -V -e -U
--show-version
--errors
--update-snapshots
--no-transfer-progress
-Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true
-Dtycho.resolver.classic=false
10 changes: 5 additions & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ pipeline {
stage('initialize PGP') {
when {
anyOf{
branch 'master';
branch pattern: 'm2e-[0-9]+\\.[0-9]+\\.x', comparator: "REGEXP"
branch 'master';
branch pattern: 'm2e-[0-9]+\\.[0-9]+\\.x', comparator: "REGEXP"
}
}
steps {
Expand All @@ -31,7 +31,7 @@ pipeline {
sh '''
for fpr in $(gpg --list-keys --with-colons | awk -F: \'/fpr:/ {print $10}\' | sort -u)
do
echo -e "5\ny\n" | gpg --batch --command-fd 0 --expert --edit-key ${fpr} trust
echo -e "5\ny\n" | gpg --batch --command-fd 0 --expert --edit-key ${fpr} trust
done
'''
}
Expand All @@ -42,13 +42,13 @@ pipeline {
withCredentials([string(credentialsId: 'gpg-passphrase', variable: 'KEYRING_PASSPHRASE')]) {
wrap([$class: 'Xvnc', useXauthority: true]) {
sh '''
mavenArgs="clean verify -Dtycho.p2.baselineMode=failCommon"
mavenArgs="clean verify -Dtycho.p2.baselineMode=failCommon --batch-mode"
if [[ ${BRANCH_NAME} == master ]] || [[ ${BRANCH_NAME} =~ m2e-[0-9]+\\.[0-9]+\\.x ]]; then
mvn ${mavenArgs} -Peclipse-sign,its -Dgpg.passphrase="${KEYRING_PASSPHRASE}" -Dgpg.keyname="011C526F29B2CE79"
else
# Clear KEYRING_PASSPHRASE environment variable
export KEYRING_PASSPHRASE='EMPTY'
mvn ${mavenArgs} -Pits
mvn ${mavenArgs} -Pits
fi
'''
}}
Expand Down

0 comments on commit 7943365

Please sign in to comment.