Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release/1.0.1.0'
Browse files Browse the repository at this point in the history
* origin/release/1.0.1.0:
  release 1.0.1.0
  update dependencies
  only build on pull request
  use commit hash instead of version tag for third-party actions
  reset crypto utils to version 3.8.0
  upgrade dependencies
  add reporting and fix reported code improvements where possible
  run workflows only once on pull-request, update actions
  start development cycle 1.0.1.0
  • Loading branch information
wetret committed May 27, 2024
2 parents f55cba6 + 0787815 commit 4ce4d86
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 35 deletions.
30 changes: 16 additions & 14 deletions .github/workflows/maven-build.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Java CI Build with Maven

on: [push, pull_request]
on: [pull_request]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
- name: Build with Maven
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn -B verify -fae --file pom.xml
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
cache: 'maven'
- uses: s4u/maven-settings-action@7802f6aec16c9098b4798ad1f1d8ac75198194bd #3.0.0
with:
servers: |
[ {"id": "github-mii", "username": "${{ github.actor }}", "password": "${{ secrets.GITHUB_TOKEN }}"}]
- name: Build with Maven
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn --batch-mode --fail-at-end clean verify
23 changes: 11 additions & 12 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,31 @@
# This workflow will publish a Java project with Maven
# For more information see: https://docs.github.com/en/free-pro-team@latest/actions/guides/publishing-java-packages-with-maven

name: Java CI Publish with Maven

on:
pull_request:
types: [closed]
branches: [develop]
release:
types: [published]

jobs:
publish:

# Only run if releases are published or pull requests are merged,
# omit running if pull requests are closed without merging
if: github.event.pull_request.merged || github.event.action == 'published'
# Only run if pull requests are merged, omit running if pull requests are closed without merging
if: github.event.pull_request.merged

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
distribution: 'zulu'
java-version: 17
cache: 'maven'
- uses: s4u/maven-settings-action@7802f6aec16c9098b4798ad1f1d8ac75198194bd #3.0.0
with:
servers: |
[ {"id": "github-mii", "username": "${{ github.actor }}", "password": "${{ secrets.GITHUB_TOKEN }}"}]
- name: Publish with Maven
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn -B deploy --file pom.xml
run: mvn --batch-mode --fail-at-end clean deploy
61 changes: 53 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>de.medizininformatik-initiative</groupId>
<artifactId>mii-processes-common</artifactId>
<version>1.0.0.0</version>
<version>1.0.1.0</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -39,7 +39,7 @@
<dependency>
<groupId>dev.dsf</groupId>
<artifactId>dsf-bpe-process-api-v1</artifactId>
<version>1.3.1</version>
<version>1.5.1</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand All @@ -62,13 +62,13 @@
<dependency>
<groupId>org.apache.tika</groupId>
<artifactId>tika-core</artifactId>
<version>2.9.1</version>
<version>2.9.2</version>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.9</version>
<version>2.0.13</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand All @@ -78,7 +78,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<version>3.13.0</version>
<configuration>
<source>${compileSource}</source>
<target>${compileTarget}</target>
Expand All @@ -87,12 +87,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.1</version>
<version>3.2.5</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
<version>3.4.1</version>
<configuration>
<archive>
<manifest>
Expand All @@ -109,7 +109,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.1</version>
<version>3.5.3</version>
<executions>
<execution>
<phase>package</phase>
Expand Down Expand Up @@ -187,6 +187,26 @@
<staticGroups>java,*</staticGroups>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.12.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.5.0</version>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>4.8.5.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.22.0</version>
</plugin>
</plugins>
</build>

Expand All @@ -199,6 +219,9 @@
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/medizininformatik-initiative/mii-processes-common</url>
</repository>
<site>
<id>${project.artifactId}-site</id>
</site>
</distributionManagement>

<profiles>
Expand Down Expand Up @@ -266,4 +289,26 @@
</build>
</profile>
</profiles>

<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<plugins>
<plugin>
<groupId>jp.skypencil.findbugs.slf4j</groupId>
<artifactId>bug-pattern</artifactId>
<version>1.5.0</version>
</plugin>
</plugins>
</configuration>
</plugin>
</plugins>
</reporting>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public Optional<Bundle> readPublicKeyIfExists(String webserviceUrl)
"PublicKey Bundle on DSF FHIR server with baseUrl '{}' contains > 1 entries ({}), using the first",
webserviceUrl, total);

return Optional.of(((Bundle) publicKeyBundle.getEntryFirstRep().getResource()));
return Optional.of((Bundle) publicKeyBundle.getEntryFirstRep().getResource());
}
else
{
Expand Down

0 comments on commit 4ce4d86

Please sign in to comment.