Skip to content
Permalink
Browse files
RAT-297: Merge remote-tracking branch 'origin/master' into dependabot…
…/maven/org.apache.maven.reporting-maven-reporting-api-3.1.0
  • Loading branch information
ottlinger committed Mar 28, 2022
2 parents c7ddcd1 + 037bf35 commit aaecef57762968e6b428f9680ef495c704867f6e
Showing 8 changed files with 96 additions and 45 deletions.
@@ -0,0 +1,52 @@
# 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: GitHub CI

on:
push:
# branches-ignore:
# - dependabot/**
pull_request:

jobs:
build:

strategy:
matrix:
os: [ubuntu-latest, windows-latest]
# RAT-296: disable JDK10 due to
# Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
java: [8, 11, 12, 13, 14, 15]
fail-fast: false

runs-on: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up JDK
uses: actions/setup-java@v3.0.0
with:
distribution: adopt
java-version: ${{ matrix.java }}
cache: 'maven'

- name: Build with Maven
run: mvn -e -B -V clean package site

@@ -1,31 +1,13 @@
language: minimal

services:
- docker
language: java
dist: trusty
sudo: required

jobs:
include:
- env: DOCKER_IMAGE=maven:3.8.4-jdk-8
# RAT-290: yields strange compiler error
# java.time.DateTimeException: Invalid value for MonthOfYear (valid values 1 - 12): 0
# - env: DOCKER_IMAGE=maven:3.5.4-jdk-9 # There are no newer images with Maven for this JDK
- env: DOCKER_IMAGE=maven:3.6.0-jdk-10 # There are no newer images with Maven for this JDK
- env: DOCKER_IMAGE=maven:3.8.4-jdk-11
- env: DOCKER_IMAGE=maven:3.6.2-jdk-12
- env: DOCKER_IMAGE=maven:3.6.2-jdk-13
- env: DOCKER_IMAGE=maven:3.6.3-jdk-14
- env: DOCKER_IMAGE=maven:3.6.3-openjdk-15
# 20200914: enable after RAT-273 is fixed
# - env: DOCKER_IMAGE=maven:3.6.3-openjdk-16
# - env: DOCKER_IMAGE=maven:3.8.4-openjdk-17

install:
- docker pull "${DOCKER_IMAGE}"

script:
- docker run
--env "_JAVA_OPTIONS=-Djdk.net.URLClassPath.disableClassPathURLCheck=true"
--volume "$PWD":/usr/src/
--workdir /usr/src/
--rm
"${DOCKER_IMAGE}" mvn clean package site -B
include:
- name: "Java 8"
jdk: openjdk8
script: mvn -e -B -V clean package site

- name: "Java 14"
jdk: openjdk14
script: mvn -e -B -V clean package site
@@ -4,6 +4,8 @@ ASF Jenkins: [![ASF Jenkins Build Status](https://ci-builds.apache.org/buildStat

Travis: [![Build Status](https://app.travis-ci.com/apache/creadur-rat.svg?branch=master)](https://app.travis-ci.com/apache/creadur-rat)

GA: [![Github Action master branch status](https://github.com/apache/creadur-rat/actions/workflows/maven.yml/badge.svg?branch=master)](https://github.com/apache/creadur-rat/actions)

Due to a bug in the Travis build infrastructure the builds fail regularly because Travis selects a JDK that fails animal-sniffer-plugin runs as it is not the one specified in the build.

## What is RAT?
@@ -60,7 +60,6 @@ public void read(Reader reader) throws IOException {
lines = -1;
}
if (headers != null) {
final int length = headers.length;
for (final HeaderBean headerBean : headers) {
if (headerBean != null) {
final Pattern headerPattern = headerBean.getHeaderPattern();
@@ -30,13 +30,11 @@

public class HeaderMatcherTest {

private int capacity;
private HeaderMatcher matcher;
private SimpleCharFilter filter;

@Before
public void setUp() throws Exception {
capacity = 20;
filter = new SimpleCharFilter();
matcher = new HeaderMatcher(filter, 20);
}
@@ -30,7 +30,6 @@

public class HeaderMatcherWithBeansTest {

private int capacity;
private HeaderMatcher matcher;
private SimpleCharFilter filter;
private HeaderBean[] beans;
@@ -43,7 +42,6 @@ public void setUp() throws Exception {
new HeaderBean()
};
this.beans = beans;
capacity = 20;
filter = new SimpleCharFilter();
matcher = new HeaderMatcher(filter, 20, beans);
}
36 pom.xml
@@ -20,7 +20,7 @@
<parent>
<groupId>org.apache</groupId>
<artifactId>apache</artifactId>
<version>24</version>
<version>25</version>
</parent>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-project</artifactId>
@@ -46,7 +46,7 @@ agnostic home for software distribution comprehension and audit tools.
<!-- taken from https://maven.apache.org/guides/mini/guide-reproducible-builds.html -->
<project.build.outputTimestamp>10</project.build.outputTimestamp>
<ant.version>1.10.12</ant.version>
<mockito.version>4.3.1</mockito.version>
<mockito.version>4.4.0</mockito.version>
<javaVersion>1.8</javaVersion>
<maven.compiler.source>${javaVersion}</maven.compiler.source>
<maven.compiler.target>${javaVersion}</maven.compiler.target>
@@ -56,7 +56,8 @@ agnostic home for software distribution comprehension and audit tools.
<!-- maven plugin versions -->
<mavenPluginPluginVersion>3.6.4</mavenPluginPluginVersion>
<mavenChangesVersion>2.12.1</mavenChangesVersion>
<mavenJavadocPluginVersion>3.3.1</mavenJavadocPluginVersion>
<mavenJavadocPluginVersion>3.3.2</mavenJavadocPluginVersion>
<mavenPmdPluginVersion>3.16.0</mavenPmdPluginVersion>
<previousRatVersion>0.13</previousRatVersion>
</properties>
<distributionManagement>
@@ -215,7 +216,7 @@ agnostic home for software distribution comprehension and audit tools.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>3.1.1</version>
<version>3.2.0</version>
<reportSets>
<reportSet>
<reports>
@@ -228,7 +229,7 @@ agnostic home for software distribution comprehension and audit tools.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.14.0</version>
<version>${mavenPmdPluginVersion}</version>
<reportSets>
<reportSet>
<reports>
@@ -240,7 +241,7 @@ agnostic home for software distribution comprehension and audit tools.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.1.2</version>
<version>3.2.2</version>
<reportSets>
<reportSet>
<reports>
@@ -292,7 +293,7 @@ agnostic home for software distribution comprehension and audit tools.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.9.0</version>
<version>3.10.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -307,15 +308,15 @@ agnostic home for software distribution comprehension and audit tools.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.15.0</version>
<version>${mavenPmdPluginVersion}</version>
<configuration>
<targetJdk>${javaVersion}</targetJdk>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.10.0</version>
<version>3.11.0</version>
<configuration>
<relativizeDecorationLinks>false</relativizeDecorationLinks>
</configuration>
@@ -446,8 +447,7 @@ agnostic home for software distribution comprehension and audit tools.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<!-- 20220206: updating to 1.21 fails the build as there are undefined references within java.nio-references in RAT -->
<version>1.20</version>
<version>1.21</version>
<executions>
<execution>
<!-- This checks the source code of our project -->
@@ -615,6 +615,20 @@ agnostic home for software distribution comprehension and audit tools.
<url>https://www.apache.org</url>
</organization>
<profiles>
<profile>
<id>maven.compiler.release</id>
<activation>
<jdk>[9,)</jdk>
</activation>
<properties>
<!--
Note that this cannot use our ${javaVersion} property, so it must
be changed manually when we decide to move to a higher version of
Java
-->
<maven.compiler.release>8</maven.compiler.release>
</properties>
</profile>
<profile>
<id>apache-release</id>
<build>
@@ -55,6 +55,12 @@ The <action> type attribute can be add,update,fix,remove.

<body>
<release version="0.14-SNAPSHOT" date="2020-xx-xx" description="Current SNAPSHOT - to be done">
<action issue="RAT-290" type="fix" dev="pottlinger" due-to="Jin Xu">
Update animal-sniffer-maven-plugin from 1.20 to 1.21. Thanks to Jin Xu/Xeno Amess.
</action>
<action issue="RAT-296" type="fix" dev="pottlinger">
Use Github Actions for matrix builds on Windows and ubuntu with JDK 8,11,12,13,14,15. Simplify Travis integration to avoid dockerhub-related build failures.
</action>
<action issue="RAT-274" type="fix" dev="pottlinger">
Update to latest Apache Ant 1.10.12.
</action>

0 comments on commit aaecef5

Please sign in to comment.