You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2021/01/20 09:59:59 UTC

[myfaces] branch 2.3.x updated: added checkstyle to 2.3.x build more relaxed about Readme and *.iml files during rat check fixed checkstyle error

This is an automated email from the ASF dual-hosted git repository.

bommel pushed a commit to branch 2.3.x
in repository https://gitbox.apache.org/repos/asf/myfaces.git


The following commit(s) were added to refs/heads/2.3.x by this push:
     new 663daa1  added checkstyle to 2.3.x build more relaxed about Readme and *.iml files during rat check fixed checkstyle error
     new 2612154  Merge pull request #155 from bohmber/2.3.x-ci-improvements
663daa1 is described below

commit 663daa1854b35b025bff69f530987e4a04b4106d
Author: Bernd Bohmann <bo...@apache.org>
AuthorDate: Wed Jan 20 10:38:22 2021 +0100

    added checkstyle to 2.3.x build
    more relaxed about Readme and *.iml files during rat check
    fixed checkstyle error
---
 .github/workflows/myfaces-ci.yml                   | 69 ++++++++++++++++++++++
 .../push/cdi/WebsocketChannelTokenBuilderBean.java |  3 +-
 pom.xml                                            |  3 +
 3 files changed, 74 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/myfaces-ci.yml b/.github/workflows/myfaces-ci.yml
new file mode 100644
index 0000000..043d8fd
--- /dev/null
+++ b/.github/workflows/myfaces-ci.yml
@@ -0,0 +1,69 @@
+#
+# 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
+#
+#   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.
+#
+
+# NOTE https://infra.apache.org/github-actions-secrets.html
+
+name: MyFaces CI
+
+on:
+  push:
+    branches:
+      - master
+      - 3.0.x
+      - 2.3-next
+      - 2.3.x
+  pull_request:
+    branches:
+      - master
+      - 3.0.x
+      - 2.3-next
+      - 2.3.x
+  workflow_dispatch:
+
+jobs:
+  build:
+
+    runs-on: ubuntu-latest
+
+    steps:
+      - uses: actions/checkout@v2
+      - name: Set up JDK 1.8
+        uses: actions/setup-java@v1
+        with:
+          java-version: 1.8
+      - name: Cache Maven packages
+        uses: actions/cache@v2
+        with:
+          path: ~/.m2
+          key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+          restore-keys: ${{ runner.os }}-m2
+      - name: Build with Maven
+        run: |
+          if ! mvn -B clean checkstyle:check org.apache.rat:apache-rat-plugin:check verify -Dformats=XML -f pom.xml; then
+            find . \( -path '*/target/surefire-reports/*.xml' -o -path '*/target/failsafe-reports/*.xml' -o -path '*/target/rat.txt' -o -path '*/target/checkstyle-result.xml' -o -path '*/target/dependency-check-report.xml' \) | zip -q reports.zip -@
+            exit 1
+          fi
+
+      - name:  Reports
+        uses: actions/upload-artifact@v2
+        if: failure()
+        with:
+          name: reports
+          retention-days: 14
+          path: reports.zip
+          if-no-files-found: ignore
\ No newline at end of file
diff --git a/impl/src/main/java/org/apache/myfaces/push/cdi/WebsocketChannelTokenBuilderBean.java b/impl/src/main/java/org/apache/myfaces/push/cdi/WebsocketChannelTokenBuilderBean.java
index a748204..c84702c 100644
--- a/impl/src/main/java/org/apache/myfaces/push/cdi/WebsocketChannelTokenBuilderBean.java
+++ b/impl/src/main/java/org/apache/myfaces/push/cdi/WebsocketChannelTokenBuilderBean.java
@@ -41,7 +41,8 @@ public class WebsocketChannelTokenBuilderBean
 
     private static final String RANDOM_KEY_IN_WEBSOCKET_SESSION_TOKEN_SECURE_RANDOM = "secureRandom";
     private static final String RANDOM_KEY_IN_WEBSOCKET_SESSION_TOKEN_RANDOM = "random";
-    private static final String RANDOM_KEY_IN_WEBSOCKET_SESSION_TOKEN_PARAM_DEFAULT = RANDOM_KEY_IN_WEBSOCKET_SESSION_TOKEN_SECURE_RANDOM;
+    private static final String RANDOM_KEY_IN_WEBSOCKET_SESSION_TOKEN_PARAM_DEFAULT
+            = RANDOM_KEY_IN_WEBSOCKET_SESSION_TOKEN_SECURE_RANDOM;
 
     private CsrfSessionTokenFactory csrfSessionTokenFactory;
     
diff --git a/pom.xml b/pom.xml
index 0831632..4537549 100644
--- a/pom.xml
+++ b/pom.xml
@@ -97,6 +97,9 @@
                 <artifactId>apache-rat-plugin</artifactId>
                 <configuration>
                     <excludes>
+                        <exclude>**/README.md</exclude>
+                        <exclude>**/target/**/*</exclude>
+                        <exclude>**/*.iml</exclude>
                         <!-- This file is created during a release and needs no licensing text -->
                         <exclude>DEPENDENCIES</exclude>
                     </excludes>