Skip to content

Commit

Permalink
RAT-293: Merge changes from master
Browse files Browse the repository at this point in the history
  • Loading branch information
ottlinger committed Feb 10, 2022
2 parents 131e3bc + 6c297c4 commit 76e59a0
Show file tree
Hide file tree
Showing 13 changed files with 128 additions and 77 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -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@v2

- name: Set up JDK
uses: actions/[email protected]
with:
distribution: adopt
java-version: ${{ matrix.java }}
cache: 'maven'

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

37 changes: 11 additions & 26 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,13 @@
language: minimal

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

jobs:
include:
- env: DOCKER_IMAGE=maven:3.6.3-jdk-8
- 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.6.3-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

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: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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
* <li>*copyright 2012 foobar*</li>
* </ul>
* <p>Note also that the copyright owner is appended to the regex pattern, so
* can support additional regex but also requires escaping where needed,<p>
* e.g. use &quot;FooBar \(www\.foobar\.com\)&quot; for matching &quot;FooBar (www.foobar.com)&quot;<p>
* can support additional regex but also requires escaping where needed,<br>
* e.g. use &quot;FooBar \(www\.foobar\.com\)&quot; for matching &quot;FooBar (www.foobar.com)&quot;</p>
*
* @since Rat 0.9
*/
Expand Down
6 changes: 2 additions & 4 deletions apache-rat-core/src/site/apt/index.apt.vm
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,8 @@ Developing Rat

Read the JavaDocs {{{./apidocs/index.html}here}}.

Check out with {{{https://subversion.apache.org}Subversion}}

+------------------------------------------+
svn co https://svn.apache.org/repos/asf/creadur/rat/trunk/
git clone https://gitbox.apache.org/repos/asf/creadur-rat.git
+------------------------------------------+

Build with {{{https://maven.apache.org/} Apache Maven}}
Expand All @@ -69,4 +67,4 @@ svn co https://svn.apache.org/repos/asf/creadur/rat/trunk/
mvn install
+------------------------------------------+

Subscribe to our {{{./mail-lists.html}mailing lists}} for a warm welcome one and all.
Subscribe to our {{{./mail-lists.html}mailing lists}} for a warm welcome one and all.
1 change: 1 addition & 0 deletions apache-rat-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>${mavenVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import org.mockito.junit.MockitoJUnitRunner;

import java.util.HashSet;
import java.util.Set;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import org.junit.rules.TemporaryFolder;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import org.mockito.junit.MockitoJUnitRunner;

import java.io.BufferedWriter;
import java.io.File;
Expand Down
9 changes: 0 additions & 9 deletions apache-rat-tasks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,4 @@
</plugins>
</pluginManagement>
</build>
<!-- Strangely no PMD report appears in this submodule -->
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
</plugin>
</plugins>
</reporting>
</project>
80 changes: 48 additions & 32 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>org.apache</groupId>
<artifactId>apache</artifactId>
<version>23</version>
<version>24</version>
</parent>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-project</artifactId>
Expand All @@ -45,20 +45,28 @@ agnostic home for software distribution comprehension and audit tools.
<properties>
<sonar.organization>apache</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<ant.version>1.10.11</ant.version>
<mockito.version>3.11.2</mockito.version>
<!-- 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>
<javaVersion>1.8</javaVersion>
<maven.compiler.source>${javaVersion}</maven.compiler.source>
<maven.compiler.target>${javaVersion}</maven.compiler.target>
<!-- This is the version of Maven required to use the Rat Maven Plugin -->
<mavenVersion>2.2.1</mavenVersion>
<creadur.jira.id>RAT</creadur.jira.id>
<!-- maven plugin versions -->
<mavenPluginPluginVersion>3.6.2</mavenPluginPluginVersion>
<mavenPluginPluginVersion>3.6.4</mavenPluginPluginVersion>
<mavenChangesVersion>2.12.1</mavenChangesVersion>
<mavenJavadocPluginVersion>3.3.1</mavenJavadocPluginVersion>
<previousRatVersion>0.13</previousRatVersion>
</properties>
<distributionManagement>
<site>
<id>staging</id>
<url>file:bogus</url>
</site>
</distributionManagement>
<dependencyManagement>
<dependencies>
<dependency>
Expand Down Expand Up @@ -222,12 +230,19 @@ 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>3.14.0</version>
<reportSets>
<reportSet>
<reports>
<report>pmd</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.1.1</version>
<version>3.1.2</version>
<reportSets>
<reportSet>
<reports>
Expand Down Expand Up @@ -279,7 +294,7 @@ agnostic home for software distribution comprehension and audit tools.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.9.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -302,7 +317,7 @@ agnostic home for software distribution comprehension and audit tools.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.9.1</version>
<version>3.10.0</version>
<configuration>
<relativizeDecorationLinks>false</relativizeDecorationLinks>
</configuration>
Expand Down Expand Up @@ -341,30 +356,30 @@ agnostic home for software distribution comprehension and audit tools.
</plugin>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.rat</groupId>
<artifactId>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.rat</groupId>
<artifactId>
apache-rat-plugin
</artifactId>
<versionRange>[0.13,)</versionRange>
<goals>
<goal>check</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
<versionRange>[0.13,)</versionRange>
<goals>
<goal>check</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore/>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
Expand All @@ -381,7 +396,7 @@ agnostic home for software distribution comprehension and audit tools.
</goals>
<configuration>
<target>
<copy file="RELEASE_NOTES.txt" todir="${project.build.directory}/site/" failonerror="false" />
<copy file="RELEASE_NOTES.txt" todir="${project.build.directory}/site/" failonerror="false"/>
</target>
</configuration>
</execution>
Expand Down Expand Up @@ -433,6 +448,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>
<executions>
<execution>
Expand Down Expand Up @@ -463,7 +479,7 @@ agnostic home for software distribution comprehension and audit tools.
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh</artifactId>
<!-- Last version that is compatible with Maven 2 -->
<version>3.5.0</version>
<version>3.5.1</version>
</extension>
</extensions>
</build>
Expand Down
6 changes: 6 additions & 0 deletions src/changes/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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-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>
<action issue="RAT-291" type="fix" dev="pottlinger">
Fix links to Travis builds for all creadur projects.
</action>
Expand Down
2 changes: 1 addition & 1 deletion src/site/apt/index.apt.vm
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ java -jar apache-rat-${project.version}.jar --help
Quick start

+------------------------------------------+
svn co https://svn.apache.org/repos/asf/creadur/rat/trunk/
git clone https://gitbox.apache.org/repos/asf/creadur-rat.git
+------------------------------------------+

Read more {{{./source-repository.html}here}}.
Expand Down
2 changes: 1 addition & 1 deletion src/site/apt/site-publish.apt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
~~ limitations under the License.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--------------------
Publishing this site
Publishing this site (deprecated)
--------------------

How to publish the Rat website
Expand Down

0 comments on commit 76e59a0

Please sign in to comment.