From 21b22038be5df48be2ce2ecfb521cac6b6d75a70 Mon Sep 17 00:00:00 2001
From: AlbiK47 <94121351+AlbiK47@users.noreply.github.com>
Date: Thu, 11 Nov 2021 17:47:57 +0100
Subject: [PATCH 1/5] Update pom.xml
---
pom.xml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/pom.xml b/pom.xml
index 976d7b048c..1678521100 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,6 +33,9 @@
UTF-8
1.8
1.8
+
+ albik47
+ https://sonarcloud.io
text
org.apache.commons.text
From d3e3b6a678170201907b86a710f01f2344774c95 Mon Sep 17 00:00:00 2001
From: AlbiK47 <94121351+AlbiK47@users.noreply.github.com>
Date: Thu, 11 Nov 2021 17:51:00 +0100
Subject: [PATCH 2/5] Create sonarbuild
---
.github/workflows/sonarbuild | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
create mode 100644 .github/workflows/sonarbuild
diff --git a/.github/workflows/sonarbuild b/.github/workflows/sonarbuild
new file mode 100644
index 0000000000..db0907284f
--- /dev/null
+++ b/.github/workflows/sonarbuild
@@ -0,0 +1,36 @@
+name: Build
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+ types: [opened, synchronize, reopened]
+jobs:
+ build:
+ name: Build
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
+ - name: Set up JDK 11
+ uses: actions/setup-java@v1
+ with:
+ java-version: 11
+ - name: Cache SonarCloud packages
+ uses: actions/cache@v1
+ with:
+ path: ~/.sonar/cache
+ key: ${{ runner.os }}-sonar
+ restore-keys: ${{ runner.os }}-sonar
+ - name: Cache Maven packages
+ uses: actions/cache@v1
+ with:
+ path: ~/.m2
+ key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+ restore-keys: ${{ runner.os }}-m2
+ - name: Build and analyze
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
+ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
+ run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=AlbiK47_commons-text
From 8f74f564999b761216592c55d3034a78bab956d9 Mon Sep 17 00:00:00 2001
From: AlbiK47 <94121351+AlbiK47@users.noreply.github.com>
Date: Thu, 11 Nov 2021 17:54:25 +0100
Subject: [PATCH 3/5] Sonar pom.xml
---
pom.xml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/pom.xml b/pom.xml
index 1678521100..02f5e740e3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -78,6 +78,11 @@
Gary Gregory
86fdc7e2a11262cb
+
+
+ albik47
+ https://sonarcloud.io
+
From 17158fd10cd44ee70e0f36e686954716d65ba8ff Mon Sep 17 00:00:00 2001
From: AlbiK47 <94121351+AlbiK47@users.noreply.github.com>
Date: Fri, 19 Nov 2021 15:21:50 +0100
Subject: [PATCH 4/5] Sonar
---
pom.xml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/pom.xml b/pom.xml
index 02f5e740e3..c622d245ea 100644
--- a/pom.xml
+++ b/pom.xml
@@ -34,6 +34,11 @@
1.8
1.8
+
+ albik47
+ https://sonarcloud.io
+
+
albik47
https://sonarcloud.io
From 5b7530130f723e80e4e22c4fb8009f9948b84375 Mon Sep 17 00:00:00 2001
From: AlbiK47 <94121351+AlbiK47@users.noreply.github.com>
Date: Fri, 19 Nov 2021 15:24:41 +0100
Subject: [PATCH 5/5] maven
---
.github/workflows/maven.yml | 70 +++++++++++++++++--------------------
1 file changed, 32 insertions(+), 38 deletions(-)
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index b2b1640740..859edd3460 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -1,42 +1,36 @@
-# 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.
-
-name: Java CI
-
-on: [push, pull_request]
-
+name: Build
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+ types: [opened, synchronize, reopened]
jobs:
build:
-
+ name: Build
runs-on: ubuntu-latest
- continue-on-error: ${{ matrix.experimental }}
- strategy:
- matrix:
- java: [ 8, 11, 17 ]
- experimental: [false]
-# include:
-# - java: 18-ea
-# experimental: true
-
steps:
- - uses: actions/checkout@v2.4.0
- - name: Set up JDK ${{ matrix.java }}
- uses: actions/setup-java@v2
- with:
- distribution: adopt
- java-version: ${{ matrix.java }}
- cache: 'maven'
- - name: Build with Maven
- run: mvn -V apache-rat:check spotbugs:check javadoc:javadoc -Ddoclint=all package --file pom.xml --no-transfer-progress
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
+ - name: Set up JDK 11
+ uses: actions/setup-java@v1
+ with:
+ java-version: 11
+ - name: Cache SonarCloud packages
+ uses: actions/cache@v1
+ with:
+ path: ~/.sonar/cache
+ key: ${{ runner.os }}-sonar
+ restore-keys: ${{ runner.os }}-sonar
+ - name: Cache Maven packages
+ uses: actions/cache@v1
+ with:
+ path: ~/.m2
+ key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+ restore-keys: ${{ runner.os }}-m2
+ - name: Build and analyze
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
+ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
+ run: mvn -B verify -DskipTests -Drat.skip=true org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=AlbiK47_commons-text