You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by kw...@apache.org on 2021/10/07 10:45:26 UTC
[jackrabbit-filevault-package-maven-plugin] branch master updated:
JCRVLT-530 add Jenkinsfile
This is an automated email from the ASF dual-hosted git repository.
kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jackrabbit-filevault-package-maven-plugin.git
The following commit(s) were added to refs/heads/master by this push:
new 5965cd5 JCRVLT-530 add Jenkinsfile
5965cd5 is described below
commit 5965cd53d30d5e2b9de8717ab7b5da3a44671165
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Thu Oct 7 12:45:22 2021 +0200
JCRVLT-530 add Jenkinsfile
fix flaky test on Windows
---
.ratignore | 4 +-
.travis.yml | 86 ----------------------
Jenkinsfile | 23 ++++++
README.md | 2 +-
pom.xml | 4 +-
.../maven/packaging/FormatDocviewXmlMojo.java | 4 +-
.../filevault/maven/packaging/it/FormattingIT.java | 3 +-
7 files changed, 33 insertions(+), 93 deletions(-)
diff --git a/.ratignore b/.ratignore
index e0a39c2..167d10c 100644
--- a/.ratignore
+++ b/.ratignore
@@ -7,4 +7,6 @@ src/test/resources/test-projects/**/.dummy
src/test/resources/test-projects/**/*.lst
src/test/resources/test-projects/**/*.MF
.mvn/**
-.no-defender.sh
\ No newline at end of file
+.no-defender.sh
+.repository/**
+local-snapshots-dir/**
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index cba00fa..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,86 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# use https://github.com/DanySK/Gravis-CI for Maven Builds on Windows
-
-# Java is not yet supported on Windows, so the build would block.
-# You do not need any setup from Travis, use a plain bash build
-language: bash
-# Enable them all, if you need them.
-os:
- - linux
-# - osx
- - windows
-env:
- global:
- # This is a convenience variable for shortening download commands
- - GRAVIS="https://raw.githubusercontent.com/DanySK/Gravis-CI/master/"
- - MAVEN_VERSION="3.6.3"
- # If you use Windows, you may want to disable Windows Defender. It slows down the builds
- # dramatically, also during cache setup. From a Tanzinul Islam's idea: http://bit.ly/348VPYS,
- # This work around disables it before caching
- - NO_WIN_DEFENDER=$(curl "${GRAVIS}.disable-windows-defender.sh" --output .no-defender.sh && source .no-defender.sh)
- matrix:
- # List any JDK you want to build your software with.
- # You can see the list of supported environments by installing Jabba and using ls-remote:
- # https://github.com/shyiko/jabba#usage
- # Partial versions are allowed. They are dynamically resoved by launching jabba ls-remote,
- # filtering for the provided JDK string, then picking the *first* match. This is useful if
- # the intent is to target the latest release of some Java major release, or if the latest
- # available build differs among platforms.
- - JDK="adopt@1.8"
- - JDK="adopt@1.11"
- - JDK="adopt@1.16"
-jobs:
- # for Java11 with linux include only one job which does sonar analysis as well as regular build
- include:
- - os: linux
- env:
- - JDK="adopt@1.11"
- - SONARQUBE_EXECUTION=true
- exclude:
- - os: linux
- env: JDK="adopt@1.11"
-addons:
- sonarcloud:
- organization: "apache"
- token:
- secure: "ftYinXGsk1HWv4lo6Iy/xIVO6ez/LYTF8Wv4VTPPsoJOU39Q78g9XusWqIiBSi3bKimrRD7U1oP5mVUGUafE2/8gaPSEnIHnAmUGdhQTMhtV1Ly97HOZfxj74vAb5gqXkT08GTaU0Juy1kcoLvG6AbxlQJEpqezgP/+yHley8VyFxx8b7y74xTJreZoD/LP1VM/rqXPA0q7199A7SnDteYtXLhHzib+GJ/xfOfwXzova3xIy24cThd15ZrOb18LYWrjs+21S049gQFXRFplKS1+fONz/khLpRrM2KeU+nMn8WWHkgjD7pZzP2hsT8eU7xN2XI3l821Dtbey715oyJhkqJwrt1qb0faPSstWANF74PB9HOeE13h+cUGTp+T0gGgsgXtkbvIQX2wC6I80k73GDwIMYrjjSfaBwtqfLOdHL9qm3fBBoq8f7ZYJjiOCcFgdbKWlo5APa0rIon4kkLzrQPgZtw [...]
-before_install:
- # Download the script
- - curl "${GRAVIS}.install-jdk-travis.sh" --output ~/.install-jdk-travis.sh
- # Download, install, configue the JDK, and export the configuration to the current shell
- - source ~/.install-jdk-travis.sh
- - curl "${GRAVIS}.install-maven.sh" --output ~/.install-maven.sh
- # Download, install, configue the JDK, and export the configuration to the current shell
- - source ~/.install-maven.sh
-# This is your main script
-script:
- - |
- if [ "$SONARQUBE_EXECUTION" == "true" ]; then
- mvn clean verify sonar:sonar -B -Pjacoco-report -Dsonar.projectKey=apache_jackrabbit-filevault-package-maven-plugin
- else
- mvn clean verify -B
- fi
-# If you use Gradle, cleanup the build cache from lock/temporary files
-before_cache:
- #- curl "${GRAVIS}.clean_gradle_cache.sh" --output ~/.clean_gradle_cache.sh
- #- bash ~/.clean_gradle_cache.sh
-cache:
- directories:
- # This avoids re-downloading the JDK every time, but Travis recommends not to do it
- # - $HOME/.jabba/
- # Cache Maven repo
- #- $HOME/.m2
\ No newline at end of file
diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644
index 0000000..d1a684c
--- /dev/null
+++ b/Jenkinsfile
@@ -0,0 +1,23 @@
+#!/usr/bin/env groovy
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+// use the shared library from https://github.com/apache/jackrabbit-filevault-jenkins-lib
+library "filevault@master"
+
+fileVaultMavenStdBuild([11, 8, 17], 11, [ "ubuntu", "Windows"], "ubuntu", "apache_jackrabbit-filevault-package-maven-plugin")
\ No newline at end of file
diff --git a/README.md b/README.md
index 9339f46..62919f9 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
[![ASF Jira](https://img.shields.io/badge/ASF%20JIRA-JCRVLT-orange)](https://issues.apache.org/jira/projects/JCRVLT/summary)
![GitHub](https://img.shields.io/github/license/apache/jackrabbit-filevault-package-maven-plugin)
[![Maven Central](https://img.shields.io/maven-central/v/org.apache.jackrabbit/filevault-package-maven-plugin.svg?label=Maven%20Central)](https://search.maven.org/artifact/org.apache.jackrabbit/filevault-package-maven-plugin)
-[![Build Status](https://travis-ci.com/apache/jackrabbit-filevault-package-maven-plugin.svg?branch=master)](https://travis-ci.com/apache/jackrabbit-filevault-package-maven-plugin)
+[![Build Status](https://ci-builds.apache.org/buildStatus/icon?job=Jackrabbit%2Ffilevault-package-maven-plugin%2Ffmaster)](https://ci-builds.apache.org/job/Jackrabbit/job/filevault-package-maven-plugin/job/master/)
[![SonarCloud Status](https://sonarcloud.io/api/project_badges/measure?project=apache_jackrabbit-filevault-package-maven-plugin&metric=alert_status)](https://sonarcloud.io/dashboard?id=apache_jackrabbit-filevault-package-maven-plugin)
[![SonarCloud Coverage](https://sonarcloud.io/api/project_badges/measure?project=apache_jackrabbit-filevault-package-maven-plugin&metric=coverage)](https://sonarcloud.io/component_measures/metric/coverage/list?id=apache_jackrabbit-filevault-package-maven-plugin)
[![SonarCloud Bugs](https://sonarcloud.io/api/project_badges/measure?project=apache_jackrabbit-filevault-package-maven-plugin&metric=bugs)](https://sonarcloud.io/component_measures/metric/reliability_rating/list?id=apache_jackrabbit-filevault-package-maven-plugin)
diff --git a/pom.xml b/pom.xml
index 50a3d7c..ab72a16 100644
--- a/pom.xml
+++ b/pom.xml
@@ -65,8 +65,8 @@
</scm>
<ciManagement>
- <system>Travis</system>
- <url>https://travis-ci.org/apache/jackrabbit-filevault-package-maven-plugin</url>
+ <system>Jenkins</system>
+ <url>https://ci-builds.apache.org/blue/organizations/jenkins/Jackrabbit%2Ffilevault-package-maven-plugin/activity</url>
</ciManagement>
<!-- parent is available in SNAPSHOT repo of Apache -->
diff --git a/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/FormatDocviewXmlMojo.java b/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/FormatDocviewXmlMojo.java
index 692222e..3ce466c 100644
--- a/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/FormatDocviewXmlMojo.java
+++ b/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/FormatDocviewXmlMojo.java
@@ -147,9 +147,9 @@ public class FormatDocviewXmlMojo extends AbstractMojo {
malformedFiles.add(toCheck);
// emit violations for m2e (https://www.eclipse.org/m2e/documentation/m2e-making-maven-plugins-compat.html)
buildContext.addMessage(toCheck, 0, 0, MSG_MALFORMED_FILE + ". " + MSG_COUNTERMEASURE, BuildContext.SEVERITY_ERROR, null);
- log.error(MSG_MALFORMED_FILE + ":" + toCheck);
+ log.error(MSG_MALFORMED_FILE + ":" + toCheck.getCanonicalPath());
} else {
- log.info("Reformatted file '" + toCheck + "'.");
+ log.info("Reformatted file '" + toCheck.getCanonicalPath() + "'.");
}
} else {
buildContext.removeMessages(toCheck);
diff --git a/src/test/java/org/apache/jackrabbit/filevault/maven/packaging/it/FormattingIT.java b/src/test/java/org/apache/jackrabbit/filevault/maven/packaging/it/FormattingIT.java
index 77240a4..e71ed58 100644
--- a/src/test/java/org/apache/jackrabbit/filevault/maven/packaging/it/FormattingIT.java
+++ b/src/test/java/org/apache/jackrabbit/filevault/maven/packaging/it/FormattingIT.java
@@ -33,7 +33,8 @@ public class FormattingIT {
.build();
for (String formattedFile : formattedFiles) {
- String path = new File(builder.getTestProjectDir(), formattedFile).getAbsolutePath();
+ // use uppercase drive letter on Windows
+ String path = new File(builder.getTestProjectDir(), formattedFile).getCanonicalPath();
builder.verifyExpectedLogLines(path);
}
}