From bb3381b701735b3686732c449dd938fefed0443c Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Sun, 28 Jan 2024 12:25:43 +0100 Subject: [PATCH 1/2] Drop travis badge Signed-off-by: Sven Strickroth --- .travis.yml | 15 -------------- README.md | 2 +- scripts/build_for_travis.sh | 41 ------------------------------------- 3 files changed, 1 insertion(+), 57 deletions(-) delete mode 100644 .travis.yml delete mode 100755 scripts/build_for_travis.sh diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 18ff2b37..00000000 --- a/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -language: java -sudo: false -dist: trusty -jdk: - # It's important to test on all these because of a horrible hack in the POM. -# - openjdk6 - - openjdk7 - - oraclejdk8 - - oraclejdk9 - - oraclejdk11 - -# Test each version with an appropriate Java version and flags to disable -# GPG signing so that we don't have to provision Travis with private keys. -install: true -script: "$TRAVIS_BUILD_DIR/scripts/build_for_travis.sh" diff --git a/README.md b/README.md index ec9591d6..c0aed5fa 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # OWASP Java HTML Sanitizer -[](https://travis-ci.org/OWASP/java-html-sanitizer) [![Coverage Status](https://coveralls.io/repos/github/OWASP/java-html-sanitizer/badge.svg?branch=main)](https://coveralls.io/github/OWASP/java-html-sanitizer?branch=main) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/2602/badge)](https://bestpractices.coreinfrastructure.org/projects/2602) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.googlecode.owasp-java-html-sanitizer/owasp-java-html-sanitizer/badge.png?style=plastic)](https://search.maven.org/artifact/com.googlecode.owasp-java-html-sanitizer/owasp-java-html-sanitizer) +[![Coverage Status](https://coveralls.io/repos/github/OWASP/java-html-sanitizer/badge.svg?branch=main)](https://coveralls.io/github/OWASP/java-html-sanitizer?branch=main) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/2602/badge)](https://bestpractices.coreinfrastructure.org/projects/2602) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.googlecode.owasp-java-html-sanitizer/owasp-java-html-sanitizer/badge.png?style=plastic)](https://search.maven.org/artifact/com.googlecode.owasp-java-html-sanitizer/owasp-java-html-sanitizer) A fast and easy to configure HTML Sanitizer written in Java which lets diff --git a/scripts/build_for_travis.sh b/scripts/build_for_travis.sh deleted file mode 100755 index 5400a2f5..00000000 --- a/scripts/build_for_travis.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -set -e - -# Invoked from .travis.yml to verify the build. - -# Pass -Dgpg.skip to suppress signing instead of trying to provision -# Travis's containers with keys. -COMMON_FLAGS="-Dgpg.skip=true -B -V" - -IS_LEGACY="" -if echo $TRAVIS_JDK_VERSION | egrep -q '(jdk|jre)[67]($|[^0-9])'; then - IS_LEGACY=1 - # The main library only uses jdk6 compatible dependencies, - # but Guava 21.0 is compatibility with jdk 7. - COMMON_FLAGS="$COMMON_FLAGS -Dguava.version=20.0" -fi -if echo $TRAVIS_JDK_VERSION | egrep -q '(jdk|jre)([678]|11)($|[^0-9])'; then - # Older versions of javadoc barf on -Xdoclint flags used - # to configure the maven-javadoc-plugin. - # JDK8 javadoc barfs on the flag "-html5] - # JDK11 barfs too. https://bugs.openjdk.java.net/browse/JDK-8212233 - # JDK9 is okay. Yay! - COMMON_FLAGS="$COMMON_FLAGS -Dmaven.javadoc.skip=true" -fi - -echo "*** TRAVIS_JDK_VERSION=$TRAVIS_JDK_VERSION COMMON_FLAGS=($COMMON_FLAGS) IS_LEGACY=$IS_LEGACY" - -mvn install -DskipTests=true $COMMON_FLAGS - - -if [ -n "$IS_LEGACY" ]; then - # Don't bother building ancillary JARs and reports. - exec mvn verify -Dmaven.javadoc.skip=true $COMMON_FLAGS -else - # Build the whole kit-n-kaboodle. - mvn -f aggregate/pom.xml source:jar javadoc:jar verify $COMMON_FLAGS \ - && mvn -Dguava.version=27.1-jre -f aggregate/pom.xml clean source:jar javadoc:jar verify $COMMON_FLAGS \ - && mvn jacoco:report coveralls:report \ - && mvn org.sonatype.ossindex.maven:ossindex-maven-plugin:audit -f aggregate $COMMON_FLAGS -fi From e75b2ea83860dc645c849e98b47c10500fa88580 Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Fri, 2 Feb 2024 10:09:14 +0100 Subject: [PATCH 2/2] Add badge for GitHub CI workflow Signed-off-by: Sven Strickroth --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c0aed5fa..3d4a21d8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # OWASP Java HTML Sanitizer -[![Coverage Status](https://coveralls.io/repos/github/OWASP/java-html-sanitizer/badge.svg?branch=main)](https://coveralls.io/github/OWASP/java-html-sanitizer?branch=main) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/2602/badge)](https://bestpractices.coreinfrastructure.org/projects/2602) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.googlecode.owasp-java-html-sanitizer/owasp-java-html-sanitizer/badge.png?style=plastic)](https://search.maven.org/artifact/com.googlecode.owasp-java-html-sanitizer/owasp-java-html-sanitizer) +[![Java CI with Maven](https://github.com/OWASP/java-html-sanitizer/actions/workflows/maven.yml/badge.svg)](https://github.com/OWASP/java-html-sanitizer/actions/workflows/maven.yml) [![Coverage Status](https://coveralls.io/repos/github/OWASP/java-html-sanitizer/badge.svg?branch=main)](https://coveralls.io/github/OWASP/java-html-sanitizer?branch=main) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/2602/badge)](https://bestpractices.coreinfrastructure.org/projects/2602) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.googlecode.owasp-java-html-sanitizer/owasp-java-html-sanitizer/badge.png?style=plastic)](https://search.maven.org/artifact/com.googlecode.owasp-java-html-sanitizer/owasp-java-html-sanitizer) A fast and easy to configure HTML Sanitizer written in Java which lets