Skip to content

Commit

Permalink
issue #94: change to Java 11
Browse files Browse the repository at this point in the history
  • Loading branch information
pkiraly committed Apr 10, 2021
1 parent d90db14 commit a188293
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 23 deletions.
36 changes: 28 additions & 8 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,34 @@ on:

jobs:
build:

name: 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: Build with Maven
run: mvn -B package --file pom.xml
- 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@v2
with:
java-version: '11'
distribution: 'adopt'
- name: Build with Maven
run: mvn -B package --file pom.xml
- 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 -DskipGpg=true
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ language: java
dist: trusty

jdk:
- oraclejdk8
- openjdk11

install: mvn clean test -Ptravis
# install: mvn clean test -X
Expand All @@ -24,5 +24,4 @@ after_success:

env:
global:
# - MAVEN_OPTS=-Xmx2g
- JAVA_OPTS=-Xmx2g
26 changes: 19 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
<groupId>de.gwdg.metadataqa</groupId>
<artifactId>metadata-qa-marc</artifactId>
<packaging>jar</packaging>
<version>0.4</version>
<name>Quality assesstment for MARC</name>
<version>0.5-SNAPSHOT</version>
<name>Quality assessment for MARC</name>
<description>
A metadata quality assurance framework. It checks some metrics of
metadata records, such as completeness, uniqueness, problem catalog.
A metadata quality assessment framework for MARC21 records.
It checks some metrics of metadata records, such as completeness,
uniqueness, problem catalog.
</description>
<url>http://pkiraly.github.io</url>
<developers>
Expand Down Expand Up @@ -53,13 +54,24 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<skipSource>true</skipSource>
<skipGpg>true</skipGpg>
<skipCobertura>true</skipCobertura>
<skipStaging>true</skipStaging>
<skipJavadoc>true</skipJavadoc>

<project.timezone>UTC</project.timezone>
<project.language>en</project.language>
<project.region>US</project.region>
<argLine>-Duser.timezone=${project.timezone} -Dfile.encoding=${project.build.sourceEncoding} -Duser.language=${project.language} -Duser.region=${project.region}</argLine>
<skipUnitTests>false</skipUnitTests>

<!-- sonarcloud properties -->
<sonar.projectKey>pkiraly_metadata-qa-marc</sonar.projectKey>
<sonar.organization>pkiraly</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
</properties>

<dependencies>
Expand Down Expand Up @@ -171,7 +183,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.0</version>
<version>3.8.1</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
Expand Down
7 changes: 1 addition & 6 deletions src/test/java/de/gwdg/metadataqa/marc/ValidationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,11 @@
import de.gwdg.metadataqa.marc.definition.tags.tags6xx.Tag630;
import de.gwdg.metadataqa.marc.definition.tags.tags6xx.Tag650;
import de.gwdg.metadataqa.marc.definition.tags.tags84x.Tag880;
import de.gwdg.metadataqa.marc.model.validation.ValidationError;
import de.gwdg.metadataqa.marc.model.validation.ValidationErrorFormat;
import de.gwdg.metadataqa.marc.model.validation.ValidationErrorFormatter;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

import static com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.Text;
// import static com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.Text;
import static org.junit.Assert.*;

/**
Expand Down

0 comments on commit a188293

Please sign in to comment.