Skip to content

Commit 220c0a3

Browse files
authored
Merge pull request #256 from kit-data-manager/development
PR for next release
2 parents c3be404 + 1ecc63a commit 220c0a3

31 files changed

+176
-153
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,18 @@ jobs:
3838

3939
steps:
4040
- name: Checkout repository
41-
uses: actions/checkout@v3
41+
uses: actions/checkout@v4
4242

4343
# Initialize minimum JDK version
4444
- name: Setup Java JDK
45-
uses: actions/setup-java@v1.4.4
45+
uses: actions/setup-java@v4.2.1
4646
with:
4747
distribution: zulu
4848
java-version: 17
4949

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

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

7676
- name: Perform CodeQL Analysis
77-
uses: github/codeql-action/analyze@v2
77+
uses: github/codeql-action/analyze@v3

.github/workflows/gradle.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ jobs:
2222
jdk: [ 17, 19 ]
2323
steps:
2424
- name: Checkout repo
25-
uses: actions/checkout@v2
25+
uses: actions/checkout@v4
2626
- name: Set up OpenJDK version ...
27-
uses: actions/setup-java@v2
27+
uses: actions/setup-java@v4.2.1
2828
with:
2929
distribution: 'zulu'
3030
java-version: ${{ matrix.jdk }}
@@ -48,9 +48,9 @@ jobs:
4848
runs-on: ubuntu-latest
4949
steps:
5050
- name: Checkout repo
51-
uses: actions/checkout@v2
51+
uses: actions/checkout@v4
5252
- name: Set up OpenJDK version ...
53-
uses: actions/setup-java@v2
53+
uses: actions/setup-java@v4.2.1
5454
with:
5555
distribution: 'zulu'
5656
java-version: ${{ env.currentBuildVersion }}
@@ -59,6 +59,6 @@ jobs:
5959
- name: Build with Gradle (JDK ${{ env.currentBuildVersion }})
6060
run: ./gradlew clean check jacocoTestReport
6161
- name: Codecov
62-
uses: codecov/codecov-action@v1
62+
uses: codecov/codecov-action@v4
6363
with:
6464
files: ./build/reports/jacoco/test/jacocoTestReport.xml #optional

.github/workflows/publishRelease.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ jobs:
66
publish:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v3
9+
- uses: actions/checkout@v4
1010
- name: Set up Java
11-
uses: actions/setup-java@v3
11+
uses: actions/setup-java@v4.2.1
1212
with:
1313
java-version: 17
1414
distribution: zulu

CHANGELOG.md

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,47 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9-
### Security
10-
11-
### Changed
12-
139
### Added
1410

1511
### Fixed
1612

13+
### Security
14+
1715
### Deprecated
1816

1917
### Removed
2018

19+
## [1.2.2] - 2024-04-02
20+
21+
### Fixed
22+
* Alignment of metadata and file version in ContentInformationService by @github-actions in https://github.com/kit-data-manager/repo-core/pull/271
23+
24+
### Security
25+
* Update gradle to 8.5
26+
* Bump actions/setup-java to 4.2.1
27+
* Bump actions/checkout to 4
28+
* Bump codecov/codecov-action to 4
29+
* Bump github/codeql-action to 3
30+
* Bump maven-publish-java to 8.6
31+
* Bump jacoco to 0.8.11
32+
* Bump javers-spring-boot-starter-sql to 7.4.2
33+
* Bump springDocVersion to 2.5.0
34+
* Bump convert to 4.0.2
35+
* Bump tika-core to 2.9.1
36+
* Bump dependencycheck to 9.1.0
37+
* Bump commons-text to 1.11.0
38+
* Bump commons-io to 2.16.0
39+
* Bump postgresql to 42.7.2
40+
* Bump h2 to 2.2.224
41+
* Bump jackson-jaxrs-json-provider to 2.17.0
42+
* Bump jackson-module-afterburner to 2.17.0
43+
* Bump jackson-datatype-jsr310 to 2.17.0
44+
* Bump jackson-datatype-joda to 2.17.0
45+
* Bump dependency-management to 1.1.4
46+
* Bump lombok to 8.6
47+
* Bump dozer-core to 7.0.0
48+
* Bump service-base to 1.2.1
49+
2150
## [1.2.1] - 2023-06-27
2251

2352
### Changed
@@ -247,7 +276,8 @@ Extracted from the 'base-repo' project.
247276
### Removed
248277
- none
249278

250-
[Unreleased]: https://github.com/kit-data-manager/repo-core/compare/v1.2.1...HEAD
279+
[Unreleased]: https://github.com/kit-data-manager/repo-core/compare/v1.2.2...HEAD
280+
[1.2.2]: https://github.com/kit-data-manager/repo-core/compare/v1.2.1...v1.2.2
251281
[1.2.1]: https://github.com/kit-data-manager/repo-core/compare/v1.2.0...v1.2.1
252282
[1.2.0]: https://github.com/kit-data-manager/repo-core/compare/v1.1.2...v1.2.0
253283
[1.1.2]: https://github.com/kit-data-manager/repo-core/compare/v1.1.1...v1.1.2

build.gradle

Lines changed: 27 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -14,35 +14,35 @@
1414
* limitations under the License.
1515
*/
1616
plugins {
17-
id "io.freefair.lombok" version "8.0.1"
18-
id "io.freefair.maven-publish-java" version "8.0.1"
19-
id "io.spring.dependency-management" version "1.1.0"
17+
id "io.freefair.lombok" version "8.6"
18+
id "io.freefair.maven-publish-java" version "8.6"
19+
id "io.spring.dependency-management" version "1.1.4"
2020
//id "com.github.kt3k.coveralls" version "2.8.1"
21-
id "org.owasp.dependencycheck" version "8.3.1"
22-
id "org.asciidoctor.jvm.convert" version "3.3.2"
21+
id "org.owasp.dependencycheck" version "9.1.0"
22+
id "org.asciidoctor.jvm.convert" version "4.0.2"
2323
//id "org.ajoberstar.grgit" version "2.0.1"
2424
id "com.jfrog.bintray" version "1.8.5"
2525
id "java"
2626
id "jacoco"
2727
// plugins for release and publishing to maven repo
2828
id "signing"
2929
id "net.researchgate.release" version "3.0.2"
30-
id "io.github.gradle-nexus.publish-plugin" version "1.3.0"
30+
id "io.github.gradle-nexus.publish-plugin" version "2.0.0-rc-2"
3131
id 'maven-publish'
3232
}
3333

3434
ext {
3535
// versions of dependencies
3636
springBootVersion = '3.1.0'
37-
springDocVersion = '2.1.0'
38-
javersVersion = '7.0.1'
37+
springDocVersion = '2.5.0'
38+
javersVersion = '7.4.2'
3939
}
4040

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

44-
sourceCompatibility = 1.17
45-
targetCompatibility = 1.17
44+
sourceCompatibility = JavaVersion.VERSION_17
45+
targetCompatibility = JavaVersion.VERSION_17
4646

4747
jar {
4848
archiveBaseName = 'repo-core'
@@ -87,43 +87,37 @@ dependencies {
8787
implementation "org.springdoc:springdoc-openapi-starter-webmvc-api:${springDocVersion}"
8888
// apache
8989
implementation "commons-configuration:commons-configuration:1.10"
90-
implementation "commons-io:commons-io:2.13.0"
90+
implementation "commons-io:commons-io:2.16.0"
9191
implementation "org.apache.commons:commons-collections4:4.4"
9292
// includes commons-lang3
93-
implementation "org.apache.commons:commons-text:1.10.0"
93+
implementation "org.apache.commons:commons-text:1.11.0"
9494
implementation 'org.apache.httpcomponents:httpclient:4.5.14'
95-
implementation "org.apache.tika:tika-core:2.8.0"
95+
implementation "org.apache.tika:tika-core:2.9.1"
9696
// javers
9797
implementation "org.javers:javers-spring-boot-starter-sql:${javersVersion}"
9898
implementation "com.google.code.gson:gson:2.10.1"
9999

100100
// Database
101-
implementation "com.h2database:h2:2.1.214"
102-
implementation "org.postgresql:postgresql:42.6.0"
101+
implementation "com.h2database:h2:2.2.224"
102+
implementation "org.postgresql:postgresql:42.7.2"
103103
// XML
104-
implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.15.2"
105-
implementation "com.fasterxml.jackson.module:jackson-module-afterburner:2.15.2"
104+
implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.17.0"
105+
implementation "com.fasterxml.jackson.module:jackson-module-afterburner:2.17.0"
106106

107-
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.15.2"
108-
implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:2.15.2"
107+
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.0"
108+
implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:2.17.0"
109109

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

112112
implementation "de.codecentric:spring-boot-admin-starter-client:3.0.4"
113113
// log4j core
114114
implementation "org.apache.logging.log4j:log4j-core"
115115
implementation "ch.qos.logback:logback-classic"
116-
//Java 11 Support
117-
// implementation "javax.xml.bind:jaxb-api:2.3.1"
118-
// implementation "com.sun.xml.bind:jaxb-core:4.0.2"
119-
// implementation "com.sun.xml.bind:jaxb-impl:4.0.2"
120-
// implementation "javax.activation:activation:1.1.1"
121-
// implementation "org.javassist:javassist:3.29.2-GA"
122-
123-
implementation "edu.kit.datamanager:service-base:1.2.0"
116+
117+
implementation "edu.kit.datamanager:service-base:1.2.1"
124118

125119
implementation "com.github.java-json-tools:json-patch:1.13"
126-
implementation "com.github.dozermapper:dozer-core:6.5.2"
120+
implementation "com.github.dozermapper:dozer-core:7.0.0"
127121

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

136130
//Java 11 Support
137131
testImplementation "org.mockito:mockito-inline:5.2.0"
132+
}
138133

139-
// testImplementation 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.9.2'
140-
// asciidoctor 'org.springframework.restdocs:spring-restdocs-asciidoctor:2.0.4.RELEASE'
141-
// asciidoctor 'com.github.allati.asciidoctor.monotree:asciidoctor-extension-monotree:0.0.1'
134+
def signingTasks = tasks.withType(Sign)
135+
tasks.withType(AbstractPublishToMaven).configureEach{
136+
mustRunAfter(signingTasks)
142137
}
143138

144139
test {
@@ -161,7 +156,7 @@ test {
161156
}
162157

163158
jacoco {
164-
toolVersion = "0.8.7"
159+
toolVersion = "0.8.11"
165160
}
166161

167162
tasks.withType(Test) {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
44
networkTimeout=10000
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

src/main/java/edu/kit/datamanager/repo/domain/Agent.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,18 @@
4242
public class Agent {
4343

4444
@Id
45-
@Schema(required = false, accessMode = Schema.AccessMode.READ_ONLY)
45+
@Schema(requiredMode = Schema.RequiredMode.NOT_REQUIRED, accessMode = Schema.AccessMode.READ_ONLY)
4646
@GeneratedValue(strategy = GenerationType.IDENTITY)
4747
@SecureUpdate({"FORBIDDEN"})
4848
@Searchable
4949
private Long id;
50-
@Schema(description = "Family name of the user.", example = "Doe", required = false)
50+
@Schema(description = "Family name of the user.", example = "Doe", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
5151
@Field(type = FieldType.Keyword, name = "familyName")
5252
private String familyName;
53-
@Schema(description = "Given name of the user.", example = "John", required = false)
53+
@Schema(description = "Given name of the user.", example = "John", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
5454
@Field(type = FieldType.Keyword, name = "givenName")
5555
private String givenName;
56-
@Schema(description = "Affiliation of the user, e.g. home institution.", example = "Karlsruhe Institute of Techology", required = false)
56+
@Schema(description = "Affiliation of the user, e.g. home institution.", example = "Karlsruhe Institute of Techology", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
5757
@ElementCollection
5858
@Field(type = FieldType.Text)
5959
private Set<String> affiliations = new HashSet<>();

src/main/java/edu/kit/datamanager/repo/domain/Box.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,21 @@
3636
public class Box {
3737

3838
@Id
39-
@Schema(required = false, accessMode = Schema.AccessMode.READ_ONLY)
39+
@Schema(requiredMode = Schema.RequiredMode.NOT_REQUIRED, accessMode = Schema.AccessMode.READ_ONLY)
4040
@GeneratedValue(strategy = GenerationType.IDENTITY)
4141
@SecureUpdate({"FORBIDDEN"})
4242
@Searchable
4343
private Long id;
44-
@Schema(description = "-67.302", example = "-180 <= westLongitude <= 180", required = true)
44+
@Schema(description = "-67.302", example = "-180 <= westLongitude <= 180", requiredMode = Schema.RequiredMode.REQUIRED)
4545
@Field(type = FieldType.Float, name = "westLongitude")
4646
private float westLongitude;
47-
@Schema(description = "-67.302", example = "-180 <= eastLongitude <= 180", required = true)
47+
@Schema(description = "-67.302", example = "-180 <= eastLongitude <= 180", requiredMode = Schema.RequiredMode.REQUIRED)
4848
@Field(type = FieldType.Float, name = "eastLongitude")
4949
private float eastLongitude;
50-
@Schema(description = "31.233", example = "-90 <= southLatitude <= 90", required = true)
50+
@Schema(description = "31.233", example = "-90 <= southLatitude <= 90", requiredMode = Schema.RequiredMode.REQUIRED)
5151
@Field(type = FieldType.Float, name = "southLatitude")
5252
private float southLatitude;
53-
@Schema(description = "31.233", example = "-90 <= northLatitude <= 90", required = true)
53+
@Schema(description = "31.233", example = "-90 <= northLatitude <= 90", requiredMode = Schema.RequiredMode.REQUIRED)
5454
@Field(type = FieldType.Float, name = "northLatitude")
5555
private float northLatitude;
5656

src/main/java/edu/kit/datamanager/repo/domain/ContentInformation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public class ContentInformation implements EtagSupport, Serializable {
6161
public static final MediaType CONTENT_INFORMATION_MEDIA_TYPE = MediaType.parseMediaType("application/vnd.datamanager.content-information+json");
6262

6363
@Id
64-
@Schema(required = false, accessMode = Schema.AccessMode.READ_ONLY)
64+
@Schema(requiredMode = Schema.RequiredMode.NOT_REQUIRED, accessMode = Schema.AccessMode.READ_ONLY)
6565
@GeneratedValue(strategy = GenerationType.IDENTITY)
6666
@SecureUpdate({"FORBIDDEN"})
6767
@Searchable

src/main/java/edu/kit/datamanager/repo/domain/Contributor.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,18 +77,18 @@ public String getValue() {
7777
}
7878

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

9090
//vocab, e.g. Producer, Editor...
91-
@Schema(description = "Controlled vocabulary value describing the contribution type, e.g. Producer.", required = true)
91+
@Schema(description = "Controlled vocabulary value describing the contribution type, e.g. Producer.", requiredMode = Schema.RequiredMode.REQUIRED)
9292
@Enumerated(EnumType.STRING)
9393
@Field(type = FieldType.Keyword, name = "contributionType")
9494
private TYPE contributionType;

0 commit comments

Comments
 (0)