Skip to content

Commit

Permalink
Merge pull request #256 from kit-data-manager/development
Browse files Browse the repository at this point in the history
PR for next release
  • Loading branch information
ThomasJejkal committed Apr 2, 2024
2 parents c3be404 + 1ecc63a commit 220c0a3
Show file tree
Hide file tree
Showing 31 changed files with 176 additions and 153 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,18 @@ jobs:

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

# Initialize minimum JDK version
- name: Setup Java JDK
uses: actions/setup-java@v1.4.4
uses: actions/setup-java@v4.2.1
with:
distribution: zulu
java-version: 17

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -60,7 +60,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -74,4 +74,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
10 changes: 5 additions & 5 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
jdk: [ 17, 19 ]
steps:
- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Set up OpenJDK version ...
uses: actions/setup-java@v2
uses: actions/setup-java@v4.2.1
with:
distribution: 'zulu'
java-version: ${{ matrix.jdk }}
Expand All @@ -48,9 +48,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Set up OpenJDK version ...
uses: actions/setup-java@v2
uses: actions/setup-java@v4.2.1
with:
distribution: 'zulu'
java-version: ${{ env.currentBuildVersion }}
Expand All @@ -59,6 +59,6 @@ jobs:
- name: Build with Gradle (JDK ${{ env.currentBuildVersion }})
run: ./gradlew clean check jacocoTestReport
- name: Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v4
with:
files: ./build/reports/jacoco/test/jacocoTestReport.xml #optional
4 changes: 2 additions & 2 deletions .github/workflows/publishRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4.2.1
with:
java-version: 17
distribution: zulu
Expand Down
40 changes: 35 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,47 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Security

### Changed

### Added

### Fixed

### Security

### Deprecated

### Removed

## [1.2.2] - 2024-04-02

### Fixed
* Alignment of metadata and file version in ContentInformationService by @github-actions in https://github.com/kit-data-manager/repo-core/pull/271

### Security
* Update gradle to 8.5
* Bump actions/setup-java to 4.2.1
* Bump actions/checkout to 4
* Bump codecov/codecov-action to 4
* Bump github/codeql-action to 3
* Bump maven-publish-java to 8.6
* Bump jacoco to 0.8.11
* Bump javers-spring-boot-starter-sql to 7.4.2
* Bump springDocVersion to 2.5.0
* Bump convert to 4.0.2
* Bump tika-core to 2.9.1
* Bump dependencycheck to 9.1.0
* Bump commons-text to 1.11.0
* Bump commons-io to 2.16.0
* Bump postgresql to 42.7.2
* Bump h2 to 2.2.224
* Bump jackson-jaxrs-json-provider to 2.17.0
* Bump jackson-module-afterburner to 2.17.0
* Bump jackson-datatype-jsr310 to 2.17.0
* Bump jackson-datatype-joda to 2.17.0
* Bump dependency-management to 1.1.4
* Bump lombok to 8.6
* Bump dozer-core to 7.0.0
* Bump service-base to 1.2.1

## [1.2.1] - 2023-06-27

### Changed
Expand Down Expand Up @@ -247,7 +276,8 @@ Extracted from the 'base-repo' project.
### Removed
- none

[Unreleased]: https://github.com/kit-data-manager/repo-core/compare/v1.2.1...HEAD
[Unreleased]: https://github.com/kit-data-manager/repo-core/compare/v1.2.2...HEAD
[1.2.2]: https://github.com/kit-data-manager/repo-core/compare/v1.2.1...v1.2.2
[1.2.1]: https://github.com/kit-data-manager/repo-core/compare/v1.2.0...v1.2.1
[1.2.0]: https://github.com/kit-data-manager/repo-core/compare/v1.1.2...v1.2.0
[1.1.2]: https://github.com/kit-data-manager/repo-core/compare/v1.1.1...v1.1.2
Expand Down
59 changes: 27 additions & 32 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,35 +14,35 @@
* limitations under the License.
*/
plugins {
id "io.freefair.lombok" version "8.0.1"
id "io.freefair.maven-publish-java" version "8.0.1"
id "io.spring.dependency-management" version "1.1.0"
id "io.freefair.lombok" version "8.6"
id "io.freefair.maven-publish-java" version "8.6"
id "io.spring.dependency-management" version "1.1.4"
//id "com.github.kt3k.coveralls" version "2.8.1"
id "org.owasp.dependencycheck" version "8.3.1"
id "org.asciidoctor.jvm.convert" version "3.3.2"
id "org.owasp.dependencycheck" version "9.1.0"
id "org.asciidoctor.jvm.convert" version "4.0.2"
//id "org.ajoberstar.grgit" version "2.0.1"
id "com.jfrog.bintray" version "1.8.5"
id "java"
id "jacoco"
// plugins for release and publishing to maven repo
id "signing"
id "net.researchgate.release" version "3.0.2"
id "io.github.gradle-nexus.publish-plugin" version "1.3.0"
id "io.github.gradle-nexus.publish-plugin" version "2.0.0-rc-2"
id 'maven-publish'
}

ext {
// versions of dependencies
springBootVersion = '3.1.0'
springDocVersion = '2.1.0'
javersVersion = '7.0.1'
springDocVersion = '2.5.0'
javersVersion = '7.4.2'
}

description = "Core module for data repositories based on metadata model of datacite."
group = 'edu.kit.datamanager'

sourceCompatibility = 1.17
targetCompatibility = 1.17
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

jar {
archiveBaseName = 'repo-core'
Expand Down Expand Up @@ -87,43 +87,37 @@ dependencies {
implementation "org.springdoc:springdoc-openapi-starter-webmvc-api:${springDocVersion}"
// apache
implementation "commons-configuration:commons-configuration:1.10"
implementation "commons-io:commons-io:2.13.0"
implementation "commons-io:commons-io:2.16.0"
implementation "org.apache.commons:commons-collections4:4.4"
// includes commons-lang3
implementation "org.apache.commons:commons-text:1.10.0"
implementation "org.apache.commons:commons-text:1.11.0"
implementation 'org.apache.httpcomponents:httpclient:4.5.14'
implementation "org.apache.tika:tika-core:2.8.0"
implementation "org.apache.tika:tika-core:2.9.1"
// javers
implementation "org.javers:javers-spring-boot-starter-sql:${javersVersion}"
implementation "com.google.code.gson:gson:2.10.1"

// Database
implementation "com.h2database:h2:2.1.214"
implementation "org.postgresql:postgresql:42.6.0"
implementation "com.h2database:h2:2.2.224"
implementation "org.postgresql:postgresql:42.7.2"
// XML
implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.15.2"
implementation "com.fasterxml.jackson.module:jackson-module-afterburner:2.15.2"
implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.17.0"
implementation "com.fasterxml.jackson.module:jackson-module-afterburner:2.17.0"

implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.15.2"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:2.15.2"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.0"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:2.17.0"

//implementation "com.monitorjbl:spring-json-view:1.0.1"

implementation "de.codecentric:spring-boot-admin-starter-client:3.0.4"
// log4j core
implementation "org.apache.logging.log4j:log4j-core"
implementation "ch.qos.logback:logback-classic"
//Java 11 Support
// implementation "javax.xml.bind:jaxb-api:2.3.1"
// implementation "com.sun.xml.bind:jaxb-core:4.0.2"
// implementation "com.sun.xml.bind:jaxb-impl:4.0.2"
// implementation "javax.activation:activation:1.1.1"
// implementation "org.javassist:javassist:3.29.2-GA"

implementation "edu.kit.datamanager:service-base:1.2.0"

implementation "edu.kit.datamanager:service-base:1.2.1"

implementation "com.github.java-json-tools:json-patch:1.13"
implementation "com.github.dozermapper:dozer-core:6.5.2"
implementation "com.github.dozermapper:dozer-core:7.0.0"

testImplementation "junit:junit:4.13.2"
testImplementation "org.springframework:spring-test"
Expand All @@ -135,10 +129,11 @@ dependencies {

//Java 11 Support
testImplementation "org.mockito:mockito-inline:5.2.0"
}

// testImplementation 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.9.2'
// asciidoctor 'org.springframework.restdocs:spring-restdocs-asciidoctor:2.0.4.RELEASE'
// asciidoctor 'com.github.allati.asciidoctor.monotree:asciidoctor-extension-monotree:0.0.1'
def signingTasks = tasks.withType(Sign)
tasks.withType(AbstractPublishToMaven).configureEach{
mustRunAfter(signingTasks)
}

test {
Expand All @@ -161,7 +156,7 @@ test {
}

jacoco {
toolVersion = "0.8.7"
toolVersion = "0.8.11"
}

tasks.withType(Test) {
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
8 changes: 4 additions & 4 deletions src/main/java/edu/kit/datamanager/repo/domain/Agent.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,18 @@
public class Agent {

@Id
@Schema(required = false, accessMode = Schema.AccessMode.READ_ONLY)
@Schema(requiredMode = Schema.RequiredMode.NOT_REQUIRED, accessMode = Schema.AccessMode.READ_ONLY)
@GeneratedValue(strategy = GenerationType.IDENTITY)
@SecureUpdate({"FORBIDDEN"})
@Searchable
private Long id;
@Schema(description = "Family name of the user.", example = "Doe", required = false)
@Schema(description = "Family name of the user.", example = "Doe", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@Field(type = FieldType.Keyword, name = "familyName")
private String familyName;
@Schema(description = "Given name of the user.", example = "John", required = false)
@Schema(description = "Given name of the user.", example = "John", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@Field(type = FieldType.Keyword, name = "givenName")
private String givenName;
@Schema(description = "Affiliation of the user, e.g. home institution.", example = "Karlsruhe Institute of Techology", required = false)
@Schema(description = "Affiliation of the user, e.g. home institution.", example = "Karlsruhe Institute of Techology", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@ElementCollection
@Field(type = FieldType.Text)
private Set<String> affiliations = new HashSet<>();
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/edu/kit/datamanager/repo/domain/Box.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,21 @@
public class Box {

@Id
@Schema(required = false, accessMode = Schema.AccessMode.READ_ONLY)
@Schema(requiredMode = Schema.RequiredMode.NOT_REQUIRED, accessMode = Schema.AccessMode.READ_ONLY)
@GeneratedValue(strategy = GenerationType.IDENTITY)
@SecureUpdate({"FORBIDDEN"})
@Searchable
private Long id;
@Schema(description = "-67.302", example = "-180 <= westLongitude <= 180", required = true)
@Schema(description = "-67.302", example = "-180 <= westLongitude <= 180", requiredMode = Schema.RequiredMode.REQUIRED)
@Field(type = FieldType.Float, name = "westLongitude")
private float westLongitude;
@Schema(description = "-67.302", example = "-180 <= eastLongitude <= 180", required = true)
@Schema(description = "-67.302", example = "-180 <= eastLongitude <= 180", requiredMode = Schema.RequiredMode.REQUIRED)
@Field(type = FieldType.Float, name = "eastLongitude")
private float eastLongitude;
@Schema(description = "31.233", example = "-90 <= southLatitude <= 90", required = true)
@Schema(description = "31.233", example = "-90 <= southLatitude <= 90", requiredMode = Schema.RequiredMode.REQUIRED)
@Field(type = FieldType.Float, name = "southLatitude")
private float southLatitude;
@Schema(description = "31.233", example = "-90 <= northLatitude <= 90", required = true)
@Schema(description = "31.233", example = "-90 <= northLatitude <= 90", requiredMode = Schema.RequiredMode.REQUIRED)
@Field(type = FieldType.Float, name = "northLatitude")
private float northLatitude;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class ContentInformation implements EtagSupport, Serializable {
public static final MediaType CONTENT_INFORMATION_MEDIA_TYPE = MediaType.parseMediaType("application/vnd.datamanager.content-information+json");

@Id
@Schema(required = false, accessMode = Schema.AccessMode.READ_ONLY)
@Schema(requiredMode = Schema.RequiredMode.NOT_REQUIRED, accessMode = Schema.AccessMode.READ_ONLY)
@GeneratedValue(strategy = GenerationType.IDENTITY)
@SecureUpdate({"FORBIDDEN"})
@Searchable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,18 @@ public String getValue() {
}

@Id
@Schema(required = false, accessMode = Schema.AccessMode.READ_ONLY)
@Schema(requiredMode = Schema.RequiredMode.NOT_REQUIRED, accessMode = Schema.AccessMode.READ_ONLY)
@GeneratedValue(strategy = GenerationType.IDENTITY)
@SecureUpdate({"FORBIDDEN"})
@Searchable
private Long id;
@Schema(description = "Contributing user.", implementation = edu.kit.datamanager.repo.domain.Agent.class, required = true)
@Schema(description = "Contributing user.", implementation = edu.kit.datamanager.repo.domain.Agent.class, requiredMode = Schema.RequiredMode.REQUIRED)
@OneToOne(cascade = jakarta.persistence.CascadeType.ALL, orphanRemoval = true)
@Field(type = FieldType.Nested, includeInParent = true)
private Agent user;

//vocab, e.g. Producer, Editor...
@Schema(description = "Controlled vocabulary value describing the contribution type, e.g. Producer.", required = true)
@Schema(description = "Controlled vocabulary value describing the contribution type, e.g. Producer.", requiredMode = Schema.RequiredMode.REQUIRED)
@Enumerated(EnumType.STRING)
@Field(type = FieldType.Keyword, name = "contributionType")
private TYPE contributionType;
Expand Down
Loading

0 comments on commit 220c0a3

Please sign in to comment.