From d7ec434f25dfd20fc045cdc549719c25ae1be4e5 Mon Sep 17 00:00:00 2001 From: Raido Kaju Date: Fri, 19 Apr 2024 16:08:18 +0300 Subject: [PATCH 1/7] chore: update .gitignore rules --- .gitignore | 3 +++ xroad-catalog-collector/.gitignore | 5 +++++ xroad-catalog-lister/.gitignore | 5 +++++ xroad-catalog-persistence/.gitignore | 7 ++++++- 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 7befaee1..6b301244 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,6 @@ xroad-catalog-collector/packages/xroad-catalog-collector/redhat/SRPMS/ xroad-catalog-persistence/classes/ .gradle/ out/ +.sdkmanrc +.settings/* +.project diff --git a/xroad-catalog-collector/.gitignore b/xroad-catalog-collector/.gitignore index bd529f64..776426cd 100644 --- a/xroad-catalog-collector/.gitignore +++ b/xroad-catalog-collector/.gitignore @@ -3,3 +3,8 @@ *.class target/ .gradle +.settings/* +bin/* +.project +.classpath +.factorypath diff --git a/xroad-catalog-lister/.gitignore b/xroad-catalog-lister/.gitignore index 3c7afcc2..7adb4a57 100644 --- a/xroad-catalog-lister/.gitignore +++ b/xroad-catalog-lister/.gitignore @@ -1,2 +1,7 @@ xroad-catalog-lister.iml .gradle/ +.settings/* +bin/* +.project +.classpath +.factorypath diff --git a/xroad-catalog-persistence/.gitignore b/xroad-catalog-persistence/.gitignore index 79cc143e..9158e40d 100644 --- a/xroad-catalog-persistence/.gitignore +++ b/xroad-catalog-persistence/.gitignore @@ -2,4 +2,9 @@ settings.gradle xroad-catalog-persistence.ipr xroad-catalog-persistence.iws -xroad-catalog-persistence.iml \ No newline at end of file +xroad-catalog-persistence.iml +.settings/* +bin/* +.project +.classpath +.factorypath From c2394ca453075591bf22ca9684f705356548735d Mon Sep 17 00:00:00 2001 From: Raido Kaju Date: Mon, 29 Apr 2024 10:50:47 +0300 Subject: [PATCH 2/7] feat: upgrade actions, add RPM builds and dependency reporting --- .github/workflows/run_tests.yaml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run_tests.yaml b/.github/workflows/run_tests.yaml index f7cbc715..01538000 100644 --- a/.github/workflows/run_tests.yaml +++ b/.github/workflows/run_tests.yaml @@ -17,23 +17,30 @@ on: - 'xroad-catalog-lister/src/**' - 'xroad-catalog-persistence/src/**' - '.github/**' +permissions: + contents: write # Required for https://github.com/gradle/actions/tree/main/setup-gradle#github-dependency-graph-support + pull-requests: write # https://github.com/gradle/actions/tree/main/setup-gradle#adding-job-summary-as-a-pull-request-comment + actions: read # Required for https://github.com/dorny/test-reporter + checks: write # Required for https://github.com/dorny/test-reporter jobs: Test: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: 'true' - name: Set up JDK 11 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: '11' distribution: 'temurin' - name: Set up Gradle - uses: gradle/gradle-build-action@v2 + uses: gradle/actions/setup-gradle@v3 with: cache-read-only: ${{ github.ref != 'refs/heads/develop' }} gradle-home-cache-cleanup: true + dependency-graph: generate-and-submit + add-job-summary-as-pr-comment: always - name: Run tests run: ./gradlew test - name: Test report @@ -47,3 +54,11 @@ jobs: reporter: java-junit list-suites: 'failed' list-tests: 'failed' + - name: Build collector RPM package builder + run: docker build -t collector-rpm xroad-catalog-collector/packages/xroad-catalog-collector/docker + - name: Run collector RPM package builder + run: docker run -v $PWD:/workspace collector-rpm + - name: Build lister RPM package builder + run: docker build -t lister-rpm xroad-catalog-lister/packages/xroad-catalog-lister/docker + - name: Run lister RPM package builder + run: docker run -v $PWD:/workspace lister-rpm From 88048c08742c5be3afa0cf38afc7360a0c6fc808 Mon Sep 17 00:00:00 2001 From: Raido Kaju Date: Mon, 29 Apr 2024 10:58:56 +0300 Subject: [PATCH 3/7] chore: build packages in addition to testing --- .github/workflows/run_tests.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_tests.yaml b/.github/workflows/run_tests.yaml index 01538000..913dcc9b 100644 --- a/.github/workflows/run_tests.yaml +++ b/.github/workflows/run_tests.yaml @@ -23,7 +23,7 @@ permissions: actions: read # Required for https://github.com/dorny/test-reporter checks: write # Required for https://github.com/dorny/test-reporter jobs: - Test: + BuildAndTest: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 @@ -42,7 +42,7 @@ jobs: dependency-graph: generate-and-submit add-job-summary-as-pr-comment: always - name: Run tests - run: ./gradlew test + run: ./gradlew build test - name: Test report env: NODE_OPTIONS: '--max-old-space-size=6144' From f31121b811d3788ac23c2917e2df6be6a66991e0 Mon Sep 17 00:00:00 2001 From: Raido Kaju Date: Mon, 29 Apr 2024 11:09:26 +0300 Subject: [PATCH 4/7] chore: bump sonar plugin version --- gradle.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 4254cdbd..b7ee973d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -24,5 +24,5 @@ cxfCoreVersion=4.0.0 jakartaServletVersion=6.0.0 mockitoInlineVersion=4.6.1 hierynomusLicenseVersion=0.16.1 -sonarQubeVersion=3.0 -owaspVersion=3.0.2 \ No newline at end of file +sonarQubeVersion=5.0.0.4638 +owaspVersion=3.0.2 From dba9c7a3ae325ff676cefa0569c30ef446739d85 Mon Sep 17 00:00:00 2001 From: Raido Kaju Date: Mon, 29 Apr 2024 15:54:19 +0300 Subject: [PATCH 5/7] feat: conver to using Gradle version library for dependabot compatibility --- build.gradle | 5 +- gradle/libs.versions.toml | 67 ++++++++++++++++++++++++++ xroad-catalog-collector/build.gradle | 57 +++++++++++----------- xroad-catalog-lister/build.gradle | 34 ++++++------- xroad-catalog-persistence/build.gradle | 21 ++++---- 5 files changed, 127 insertions(+), 57 deletions(-) create mode 100644 gradle/libs.versions.toml diff --git a/build.gradle b/build.gradle index 7d54c92c..76431d02 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,6 @@ plugins { - id "com.github.hierynomus.license" version "${hierynomusLicenseVersion}" - id "org.owasp.dependencycheck" version "${owaspVersion}" - id "org.sonarqube" version "${sonarQubeVersion}" + alias (libs.plugins.hierynomus.license) // id "com.github.hierynomus.license" version "${hierynomusLicenseVersion}" + alias (libs.plugins.sonarqube) // id "org.sonarqube" version "${sonarQubeVersion}" id 'idea' id 'jacoco' } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 00000000..4d1e7bcb --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,67 @@ +[versions] +akka = "2.6.21" +commonsBeanUtils = "1.9.4" +commonsCsv = "1.9.0" +cxf = "3.5.0" +cxfCore = "4.0.0" +guava = "31.1-jre" +h2Database = "2.1.214" +hierynomusLicense = "0.16.1" +httpClient = "4.5.13" +jackson = "2.14.1" +jakarta = "2.1.1" +javaxAnnotation = "1.3.2" +javaxJaxb = "2.3.0" +jaxb = "4.0.0" +json = "20220924" +lombok = "1.18.24" +mockitoInline = "4.6.1" +owasp = "3.0.2" +postgreSql = "42.5.1" +sonarqube = "5.0.0.4638" +springBoot = "2.7.5" +springDoc = "1.6.13" +wsdl4j = "1.6.3" +xjc = "2.1.7" + +[libraries] +akka-actor = { module = "com.typesafe.akka:akka-actor_3", version.ref = "akka" } +akka-slf4j = { module = "com.typesafe.akka:akka-slf4j_3", version.ref = "akka" } +akka-testkit = { module = "com.typesafe.akka:akka-testkit_3", version.ref = "akka" } +commons-bean-utils = { module = "commons-beanutils:commons-beanutils", version.ref = "commonsBeanUtils" } +commons-csv = { module = "org.apache.commons:commons-csv", version.ref = "commonsCsv" } +cxf-transport = { module = "org.apache.cxf:cxf-rt-transports-http", version.ref = "cxf" } +cxf-core = { module = "org.apache.cxf:cxf-core", version.ref = "cxfCore" } +cxf-jaxws = { module = "org.apache.cxf:cxf-rt-frontend-jaxws", version.ref = "cxfCore" } +guava = { module = "com.google.guava:guava", version.ref = "guava" } +h2-database = { module = "com.h2database:h2", version.ref = "h2Database" } +http-client = { module = "org.apache.httpcomponents:httpclient", version.ref = "httpClient" } +jackson = { module = "com.fasterxml.jackson.core:jackson-databind", version.ref = "jackson" } +jakarta = { module = "javax.ws.rs:javax.ws.rs-api", version.ref = "jakarta" } +javax-annotation = { module = "javax.annotation:javax.annotation-api", version.ref = "javaxAnnotation" } +javax-jaxb = { module = "javax.xml.bind:jaxb-api", version.ref = "javaxJaxb" } +jaxb-maven = { module = "com.sun.xml.ws:jaxws-maven-plugin", version.ref = "jaxb" } +jaxb-rt = { module = "com.sun.xml.ws:jaxws-rt", version.ref = "jaxb" } +jaxb-tools = { module = "com.sun.xml.ws:jaxws-tools", version.ref = "jaxb" } +jaxb-ws-api = { module = "jakarta.xml.ws:jakarta.xml.ws-api", version.ref = "jaxb" } +json = { module = "org.json:json", version.ref = "json" } +lombok = { module = "org.projectlombok:lombok", version.ref = "lombok" } +mockito-inline = { module = "org.mockito:mockito-inline", version.ref = "mockitoInline" } +postgresql = { module = "org.postgresql:postgresql", version.ref = "postgreSql" } +spring-boot-jpa = { module = "org.springframework.boot:spring-boot-starter-data-jpa", version.ref = "springBoot" } +spring-boot-test = { module = "org.springframework.boot:spring-boot-starter-test", version.ref = "springBoot" } +spring-boot-ws = { module = "org.springframework.boot:spring-boot-starter-web-services", version.ref = "springBoot" } +spring-doc = { module = "org.springdoc:springdoc-openapi-ui", version.ref = "springDoc" } +wsdl4j = { module = "wsdl4j:wsdl4j", version.ref = "wsdl4j" } +xjc = { module = "com.sun.xml.bind:jaxb-xjc", version.ref = "xjc" } + +[bundles] +akka = [ "akka-actor", "akka-slf4j" ] # Don't include akka-testkit in this since it is not used in implementation +cxf = [ "cxf-transport", "cxf-core", "cxf-jaxws" ] +jaxb = [ "jaxb-rt", "jaxb-tools", "jaxb-ws-api" ] # Don't include jaxb-maven in this since it is not used in implementation + +[plugins] +hierynomus-license = { id = "com.github.hierynomus.license", version.ref = "hierynomusLicense" } +owasp = { id = "org.owasp.dependencycheck", version.ref = "owasp" } +sonarqube = { id = "org.sonarqube", version.ref = "sonarqube" } +spring-boot = { id = "org.springframework.boot", version.ref = "springBoot" } diff --git a/xroad-catalog-collector/build.gradle b/xroad-catalog-collector/build.gradle index 2714b9bb..e303acc2 100644 --- a/xroad-catalog-collector/build.gradle +++ b/xroad-catalog-collector/build.gradle @@ -1,5 +1,5 @@ plugins { - id "org.springframework.boot" version "${springBootVersion}" + alias (libs.plugins.spring.boot) // id "org.springframework.boot" version "${springBootVersion}" id 'java' id 'eclipse' id 'idea' @@ -69,33 +69,36 @@ task wsImport { dependencies { implementation project(':xroad-catalog-persistence') - implementation ("javax.annotation:javax.annotation-api:${javaxAnnotationVersion}") - implementation ("javax.xml.bind:jaxb-api:${javaxJaxbVersion}") - implementation("com.google.guava:guava:${guavaVersion}") - implementation("org.apache.httpcomponents:httpclient:${httpClientVersion}") - implementation("org.json:json:${jsonVersion}") - implementation("org.springframework.boot:spring-boot-starter-web-services:${springBootVersion}") - implementation("com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}") - implementation("com.typesafe.akka:akka-actor_3:${akkaVersion}") - implementation("com.typesafe.akka:akka-slf4j_3:${akkaVersion}") - implementation("org.apache.cxf:cxf-rt-frontend-jaxws:${cxfCoreVersion}") - implementation("org.apache.cxf:cxf-rt-transports-http:${cxfVersion}") - implementation("org.apache.cxf:cxf-core:${cxfCoreVersion}") - implementation("org.projectlombok:lombok:${lombokVersion}") - annotationProcessor("org.projectlombok:lombok:${lombokVersion}") - wsimport("com.sun.xml.ws:jaxws-maven-plugin:${jaxbVersion}") - implementation("jakarta.xml.ws:jakarta.xml.ws-api:${jaxbVersion}") - implementation("com.sun.xml.ws:jaxws-rt:${jaxbVersion}") - implementation("com.sun.xml.ws:jaxws-tools:${jaxbVersion}") - testImplementation("org.springframework.boot:spring-boot-starter-test:${springBootVersion}") { - exclude group: 'org.mockito', module :'mockito-core' + implementation (libs.javax.annotation) // implementation ("javax.annotation:javax.annotation-api:${javaxAnnotationVersion}") + implementation (libs.javax.jaxb) // implementation ("javax.xml.bind:jaxb-api:${javaxJaxbVersion}") + implementation (libs.guava) // implementation("com.google.guava:guava:${guavaVersion}") + implementation (libs.http.client) // implementation("org.apache.httpcomponents:httpclient:${httpClientVersion}") + implementation (libs.json) // implementation("org.json:json:${jsonVersion}") + implementation (libs.spring.boot.ws) // implementation("org.springframework.boot:spring-boot-starter-web-services:${springBootVersion}") + implementation (libs.jackson) // implementation("com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}") + implementation (libs.bundles.akka) // implementation("com.typesafe.akka:akka-actor_3:${akkaVersion}") + // implementation("com.typesafe.akka:akka-slf4j_3:${akkaVersion}") + implementation (libs.bundles.cxf) // implementation("org.apache.cxf:cxf-rt-frontend-jaxws:${cxfCoreVersion}") + // implementation("org.apache.cxf:cxf-rt-transports-http:${cxfVersion}") + // implementation("org.apache.cxf:cxf-core:${cxfCoreVersion}") + implementation (libs.lombok) // implementation("org.projectlombok:lombok:${lombokVersion}") + annotationProcessor (libs.lombok) // annotationProcessor("org.projectlombok:lombok:${lombokVersion}") + wsimport (libs.jaxb.maven) // wsimport("com.sun.xml.ws:jaxws-maven-plugin:${jaxbVersion}") + implementation (libs.bundles.jaxb) // implementation("jakarta.xml.ws:jakarta.xml.ws-api:${jaxbVersion}") + // implementation("com.sun.xml.ws:jaxws-rt:${jaxbVersion}") + // implementation("com.sun.xml.ws:jaxws-tools:${jaxbVersion}") + testImplementation (libs.spring.boot.test) { + exclude group: 'org.mockito', module :'mockito-core' } - testImplementation("org.mockito:mockito-inline:${mockitoInlineVersion}") - testImplementation("com.typesafe.akka:akka-testkit_3:${akkaVersion}") - testImplementation("org.projectlombok:lombok:${lombokVersion}") - testAnnotationProcessor("org.projectlombok:lombok:${lombokVersion}") - testImplementation("javax.annotation:javax.annotation-api:${javaxAnnotationVersion}") - testImplementation("javax.xml.bind:jaxb-api:${javaxJaxbVersion}") + /*testImplementation("org.springframework.boot:spring-boot-starter-test:${springBootVersion}") { + exclude group: 'org.mockito', module :'mockito-core' + }*/ + testImplementation (libs.mockito.inline) // testImplementation("org.mockito:mockito-inline:${mockitoInlineVersion}") + testImplementation (libs.akka.testkit) // testImplementation("com.typesafe.akka:akka-testkit_3:${akkaVersion}") + testImplementation (libs.lombok) // testImplementation("org.projectlombok:lombok:${lombokVersion}") + testAnnotationProcessor (libs.lombok) // testAnnotationProcessor("org.projectlombok:lombok:${lombokVersion}") + testImplementation (libs.javax.annotation) // testImplementation("javax.annotation:javax.annotation-api:${javaxAnnotationVersion}") + testImplementation (libs.javax.jaxb) // testImplementation("javax.xml.bind:jaxb-api:${javaxJaxbVersion}") } compileJava.dependsOn wsImport diff --git a/xroad-catalog-lister/build.gradle b/xroad-catalog-lister/build.gradle index f09d043c..8be88a4d 100644 --- a/xroad-catalog-lister/build.gradle +++ b/xroad-catalog-lister/build.gradle @@ -1,5 +1,5 @@ plugins { - id "org.springframework.boot" version "${springBootVersion}" + alias (libs.plugins.spring.boot) // id "org.springframework.boot" version "${springBootVersion}" id 'java' id 'eclipse' id 'idea' @@ -71,23 +71,23 @@ jar { dependencies { implementation project(':xroad-catalog-persistence') - - implementation("javax.ws.rs:javax.ws.rs-api:${jakartaVersion}") - implementation("org.springdoc:springdoc-openapi-ui:${springDocVersion}") - implementation ("org.apache.commons:commons-csv:${commonsCsvVersion}") - implementation("org.springframework.boot:spring-boot-starter-web-services:${springBootVersion}") - implementation("org.springframework.boot:spring-boot-starter-data-jpa:${springBootVersion}") - implementation("com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}") - implementation("wsdl4j:wsdl4j:${wsdl4jVersion}") implementation(files(genJaxb.classesDir).builtBy(genJaxb)) - implementation("commons-beanutils:commons-beanutils:${commonsBeanUtilsVersion}") - implementation("com.google.guava:guava:${guavaVersion}") - jaxb("com.sun.xml.bind:jaxb-xjc:${XjcVersion}") - implementation("org.projectlombok:lombok:${lombokVersion}") - annotationProcessor("org.projectlombok:lombok:${lombokVersion}") - testImplementation("org.springframework.boot:spring-boot-starter-test:${springBootVersion}") - testImplementation("org.projectlombok:lombok:${lombokVersion}") - testAnnotationProcessor("org.projectlombok:lombok:${lombokVersion}") + + implementation (libs.jakarta) // implementation("javax.ws.rs:javax.ws.rs-api:${jakartaVersion}") + implementation (libs.spring.doc) // implementation("org.springdoc:springdoc-openapi-ui:${springDocVersion}") + implementation (libs.commons.csv) // implementation ("org.apache.commons:commons-csv:${commonsCsvVersion}") + implementation (libs.spring.boot.ws) // implementation("org.springframework.boot:spring-boot-starter-web-services:${springBootVersion}") + implementation (libs.spring.boot.jpa) // implementation("org.springframework.boot:spring-boot-starter-data-jpa:${springBootVersion}") + implementation (libs.jackson) // implementation("com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}") + implementation (libs.wsdl4j) // implementation("wsdl4j:wsdl4j:${wsdl4jVersion}") + implementation (libs.commons.bean.utils) // implementation("commons-beanutils:commons-beanutils:${commonsBeanUtilsVersion}") + implementation (libs.guava) // implementation("com.google.guava:guava:${guavaVersion}") + jaxb (libs.xjc) // jaxb("com.sun.xml.bind:jaxb-xjc:${XjcVersion}") + implementation (libs.lombok) // implementation("org.projectlombok:lombok:${lombokVersion}") + annotationProcessor (libs.lombok) // annotationProcessor("org.projectlombok:lombok:${lombokVersion}") + testImplementation (libs.spring.boot.test) // testImplementation("org.springframework.boot:spring-boot-starter-test:${springBootVersion}") + testImplementation (libs.lombok) // testImplementation("org.projectlombok:lombok:${lombokVersion}") + testAnnotationProcessor (libs.lombok) // testAnnotationProcessor("org.projectlombok:lombok:${lombokVersion}") } test { diff --git a/xroad-catalog-persistence/build.gradle b/xroad-catalog-persistence/build.gradle index 949d73b1..55cdcd05 100644 --- a/xroad-catalog-persistence/build.gradle +++ b/xroad-catalog-persistence/build.gradle @@ -1,5 +1,5 @@ plugins { - id "org.springframework.boot" version "${springBootVersion}" + alias (libs.plugins.spring.boot) // id "org.springframework.boot" version "${springBootVersion}" id 'java' id 'eclipse' id 'idea' @@ -15,15 +15,16 @@ repositories { } dependencies { - implementation("org.springframework.boot:spring-boot-starter-data-jpa:${springBootVersion}") - implementation("com.h2database:h2:${h2DatabaseVersion}") - implementation("org.postgresql:postgresql:${postgreSqlVersion}") - implementation("com.google.guava:guava:${guavaVersion}") - implementation("org.projectlombok:lombok:${lombokVersion}") - annotationProcessor("org.projectlombok:lombok:${lombokVersion}") - testImplementation("org.springframework.boot:spring-boot-starter-test:${springBootVersion}") - testImplementation("org.projectlombok:lombok:${lombokVersion}") - testAnnotationProcessor("org.projectlombok:lombok:${lombokVersion}") + implementation (libs.spring.boot.jpa) // implementation("org.springframework.boot:spring-boot-starter-data-jpa:${springBootVersion}") + implementation (libs.h2.database) // implementation("com.h2database:h2:${h2DatabaseVersion}") + implementation (libs.postgresql) // implementation("org.postgresql:postgresql:${postgreSqlVersion}") + implementation (libs.guava) // implementation("com.google.guava:guava:${guavaVersion}") + implementation (libs.lombok) // implementation("org.projectlombok:lombok:${lombokVersion}") + implementation (libs.lombok) // implementation("org.projectlombok:lombok:${lombokVersion}") + annotationProcessor (libs.lombok) // annotationProcessor("org.projectlombok:lombok:${lombokVersion}") + testImplementation (libs.spring.boot.test) // testImplementation("org.springframework.boot:spring-boot-starter-test:${springBootVersion}") + testImplementation (libs.lombok) // testImplementation("org.projectlombok:lombok:${lombokVersion}") + testAnnotationProcessor (libs.lombok) // testAnnotationProcessor("org.projectlombok:lombok:${lombokVersion}") } From 200c86fe4d70ba74228df3e7fba2683d907f8828 Mon Sep 17 00:00:00 2001 From: Raido Kaju Date: Mon, 6 May 2024 15:13:42 +0300 Subject: [PATCH 6/7] chore: fix version catalog issues and add dependabot configuration --- .github/dependabot.yml | 22 +++++++++++ build.gradle | 4 +- gradle/libs.versions.toml | 1 - xroad-catalog-collector/build.gradle | 51 ++++++++++++-------------- xroad-catalog-lister/build.gradle | 32 ++++++++-------- xroad-catalog-persistence/build.gradle | 22 +++++------ 6 files changed, 74 insertions(+), 58 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..49829bd9 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,22 @@ +version: 2 +updates: + - package-ecosystem: "gradle" + directory: "/" + schedule: + interval: "weekly" + groups: + java-minor-patch: + applies-to: version-updates + update-types: + - "minor" + - "patch" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + groups: + actions-minor-patch: + applies-to: version-updates + update-types: + - "minor" + - "patch" diff --git a/build.gradle b/build.gradle index 76431d02..3069550a 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ plugins { - alias (libs.plugins.hierynomus.license) // id "com.github.hierynomus.license" version "${hierynomusLicenseVersion}" - alias (libs.plugins.sonarqube) // id "org.sonarqube" version "${sonarQubeVersion}" + alias (libs.plugins.hierynomus.license) + alias (libs.plugins.sonarqube) id 'idea' id 'jacoco' } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 4d1e7bcb..4f61c963 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -57,7 +57,6 @@ xjc = { module = "com.sun.xml.bind:jaxb-xjc", version.ref = "xjc" } [bundles] akka = [ "akka-actor", "akka-slf4j" ] # Don't include akka-testkit in this since it is not used in implementation -cxf = [ "cxf-transport", "cxf-core", "cxf-jaxws" ] jaxb = [ "jaxb-rt", "jaxb-tools", "jaxb-ws-api" ] # Don't include jaxb-maven in this since it is not used in implementation [plugins] diff --git a/xroad-catalog-collector/build.gradle b/xroad-catalog-collector/build.gradle index e303acc2..bbcde3eb 100644 --- a/xroad-catalog-collector/build.gradle +++ b/xroad-catalog-collector/build.gradle @@ -1,5 +1,5 @@ plugins { - alias (libs.plugins.spring.boot) // id "org.springframework.boot" version "${springBootVersion}" + alias (libs.plugins.spring.boot) id 'java' id 'eclipse' id 'idea' @@ -69,36 +69,31 @@ task wsImport { dependencies { implementation project(':xroad-catalog-persistence') - implementation (libs.javax.annotation) // implementation ("javax.annotation:javax.annotation-api:${javaxAnnotationVersion}") - implementation (libs.javax.jaxb) // implementation ("javax.xml.bind:jaxb-api:${javaxJaxbVersion}") - implementation (libs.guava) // implementation("com.google.guava:guava:${guavaVersion}") - implementation (libs.http.client) // implementation("org.apache.httpcomponents:httpclient:${httpClientVersion}") - implementation (libs.json) // implementation("org.json:json:${jsonVersion}") - implementation (libs.spring.boot.ws) // implementation("org.springframework.boot:spring-boot-starter-web-services:${springBootVersion}") - implementation (libs.jackson) // implementation("com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}") - implementation (libs.bundles.akka) // implementation("com.typesafe.akka:akka-actor_3:${akkaVersion}") - // implementation("com.typesafe.akka:akka-slf4j_3:${akkaVersion}") - implementation (libs.bundles.cxf) // implementation("org.apache.cxf:cxf-rt-frontend-jaxws:${cxfCoreVersion}") - // implementation("org.apache.cxf:cxf-rt-transports-http:${cxfVersion}") - // implementation("org.apache.cxf:cxf-core:${cxfCoreVersion}") - implementation (libs.lombok) // implementation("org.projectlombok:lombok:${lombokVersion}") - annotationProcessor (libs.lombok) // annotationProcessor("org.projectlombok:lombok:${lombokVersion}") - wsimport (libs.jaxb.maven) // wsimport("com.sun.xml.ws:jaxws-maven-plugin:${jaxbVersion}") - implementation (libs.bundles.jaxb) // implementation("jakarta.xml.ws:jakarta.xml.ws-api:${jaxbVersion}") - // implementation("com.sun.xml.ws:jaxws-rt:${jaxbVersion}") - // implementation("com.sun.xml.ws:jaxws-tools:${jaxbVersion}") + implementation (libs.javax.annotation) + implementation (libs.javax.jaxb) + implementation (libs.guava) + implementation (libs.http.client) + implementation (libs.json) + implementation (libs.spring.boot.ws) + implementation (libs.jackson) + implementation (libs.bundles.akka) + // Note that bundle seems to break something with CXF and being able top find api bindings, so using separate dependencies here + implementation (libs.cxf.jaxws) + implementation (libs.cxf.transport) + implementation (libs.cxf.core) + implementation (libs.lombok) + annotationProcessor (libs.lombok) + wsimport (libs.jaxb.maven) + implementation (libs.bundles.jaxb) testImplementation (libs.spring.boot.test) { exclude group: 'org.mockito', module :'mockito-core' } - /*testImplementation("org.springframework.boot:spring-boot-starter-test:${springBootVersion}") { - exclude group: 'org.mockito', module :'mockito-core' - }*/ - testImplementation (libs.mockito.inline) // testImplementation("org.mockito:mockito-inline:${mockitoInlineVersion}") - testImplementation (libs.akka.testkit) // testImplementation("com.typesafe.akka:akka-testkit_3:${akkaVersion}") - testImplementation (libs.lombok) // testImplementation("org.projectlombok:lombok:${lombokVersion}") - testAnnotationProcessor (libs.lombok) // testAnnotationProcessor("org.projectlombok:lombok:${lombokVersion}") - testImplementation (libs.javax.annotation) // testImplementation("javax.annotation:javax.annotation-api:${javaxAnnotationVersion}") - testImplementation (libs.javax.jaxb) // testImplementation("javax.xml.bind:jaxb-api:${javaxJaxbVersion}") + testImplementation (libs.mockito.inline) + testImplementation (libs.akka.testkit) + testImplementation (libs.lombok) + testAnnotationProcessor (libs.lombok) + testImplementation (libs.javax.annotation) + testImplementation (libs.javax.jaxb) } compileJava.dependsOn wsImport diff --git a/xroad-catalog-lister/build.gradle b/xroad-catalog-lister/build.gradle index 8be88a4d..18406a38 100644 --- a/xroad-catalog-lister/build.gradle +++ b/xroad-catalog-lister/build.gradle @@ -1,5 +1,5 @@ plugins { - alias (libs.plugins.spring.boot) // id "org.springframework.boot" version "${springBootVersion}" + alias (libs.plugins.spring.boot) id 'java' id 'eclipse' id 'idea' @@ -73,21 +73,21 @@ dependencies { implementation project(':xroad-catalog-persistence') implementation(files(genJaxb.classesDir).builtBy(genJaxb)) - implementation (libs.jakarta) // implementation("javax.ws.rs:javax.ws.rs-api:${jakartaVersion}") - implementation (libs.spring.doc) // implementation("org.springdoc:springdoc-openapi-ui:${springDocVersion}") - implementation (libs.commons.csv) // implementation ("org.apache.commons:commons-csv:${commonsCsvVersion}") - implementation (libs.spring.boot.ws) // implementation("org.springframework.boot:spring-boot-starter-web-services:${springBootVersion}") - implementation (libs.spring.boot.jpa) // implementation("org.springframework.boot:spring-boot-starter-data-jpa:${springBootVersion}") - implementation (libs.jackson) // implementation("com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}") - implementation (libs.wsdl4j) // implementation("wsdl4j:wsdl4j:${wsdl4jVersion}") - implementation (libs.commons.bean.utils) // implementation("commons-beanutils:commons-beanutils:${commonsBeanUtilsVersion}") - implementation (libs.guava) // implementation("com.google.guava:guava:${guavaVersion}") - jaxb (libs.xjc) // jaxb("com.sun.xml.bind:jaxb-xjc:${XjcVersion}") - implementation (libs.lombok) // implementation("org.projectlombok:lombok:${lombokVersion}") - annotationProcessor (libs.lombok) // annotationProcessor("org.projectlombok:lombok:${lombokVersion}") - testImplementation (libs.spring.boot.test) // testImplementation("org.springframework.boot:spring-boot-starter-test:${springBootVersion}") - testImplementation (libs.lombok) // testImplementation("org.projectlombok:lombok:${lombokVersion}") - testAnnotationProcessor (libs.lombok) // testAnnotationProcessor("org.projectlombok:lombok:${lombokVersion}") + implementation (libs.jakarta) + implementation (libs.spring.doc) + implementation (libs.commons.csv) + implementation (libs.spring.boot.ws) + implementation (libs.spring.boot.jpa) + implementation (libs.jackson) + implementation (libs.wsdl4j) + implementation (libs.commons.bean.utils) + implementation (libs.guava) + jaxb (libs.xjc) + implementation (libs.lombok) + annotationProcessor (libs.lombok) + testImplementation (libs.spring.boot.test) + testImplementation (libs.lombok) + testAnnotationProcessor (libs.lombok) } test { diff --git a/xroad-catalog-persistence/build.gradle b/xroad-catalog-persistence/build.gradle index 55cdcd05..59fc645c 100644 --- a/xroad-catalog-persistence/build.gradle +++ b/xroad-catalog-persistence/build.gradle @@ -1,5 +1,5 @@ plugins { - alias (libs.plugins.spring.boot) // id "org.springframework.boot" version "${springBootVersion}" + alias (libs.plugins.spring.boot) id 'java' id 'eclipse' id 'idea' @@ -15,16 +15,16 @@ repositories { } dependencies { - implementation (libs.spring.boot.jpa) // implementation("org.springframework.boot:spring-boot-starter-data-jpa:${springBootVersion}") - implementation (libs.h2.database) // implementation("com.h2database:h2:${h2DatabaseVersion}") - implementation (libs.postgresql) // implementation("org.postgresql:postgresql:${postgreSqlVersion}") - implementation (libs.guava) // implementation("com.google.guava:guava:${guavaVersion}") - implementation (libs.lombok) // implementation("org.projectlombok:lombok:${lombokVersion}") - implementation (libs.lombok) // implementation("org.projectlombok:lombok:${lombokVersion}") - annotationProcessor (libs.lombok) // annotationProcessor("org.projectlombok:lombok:${lombokVersion}") - testImplementation (libs.spring.boot.test) // testImplementation("org.springframework.boot:spring-boot-starter-test:${springBootVersion}") - testImplementation (libs.lombok) // testImplementation("org.projectlombok:lombok:${lombokVersion}") - testAnnotationProcessor (libs.lombok) // testAnnotationProcessor("org.projectlombok:lombok:${lombokVersion}") + implementation (libs.spring.boot.jpa) + implementation (libs.h2.database) + implementation (libs.postgresql) + implementation (libs.guava) + implementation (libs.lombok) + implementation (libs.lombok) + annotationProcessor (libs.lombok) + testImplementation (libs.spring.boot.test) + testImplementation (libs.lombok) + testAnnotationProcessor (libs.lombok) } From 5a687d7e5080d871c3523c5f74a6a10ad05e0902 Mon Sep 17 00:00:00 2001 From: Raido Kaju Date: Mon, 6 May 2024 15:22:01 +0300 Subject: [PATCH 7/7] chore: cleanup old version version configuration --- gradle.properties | 27 --------------------------- gradle/libs.versions.toml | 2 -- 2 files changed, 29 deletions(-) diff --git a/gradle.properties b/gradle.properties index b7ee973d..b3c7a033 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,28 +1 @@ org.gradle.jvmargs=-Xmx2048M -springBootVersion=2.7.5 -h2DatabaseVersion=2.1.214 -postgreSqlVersion=42.5.1 -guavaVersion=31.1-jre -lombokVersion=1.18.24 -jacksonVersion=2.14.1 -jakartaVersion=2.1.1 -springDocVersion=1.6.13 -commonsCsvVersion=1.9.0 -wsdl4jVersion=1.6.3 -commonsBeanUtilsVersion=1.9.4 -jaxbVersion=4.0.0 -javaxJaxbVersion=2.3.0 -javaxAnnotationVersion=1.3.2 -XjcVersion=2.1.7 -httpClientVersion=4.5.13 -jsonVersion=20220924 -akkaVersion=2.6.21 -logbackVersion=1.4.5 -jaxWsVersion=4.0.0 -cxfVersion=3.5.0 -cxfCoreVersion=4.0.0 -jakartaServletVersion=6.0.0 -mockitoInlineVersion=4.6.1 -hierynomusLicenseVersion=0.16.1 -sonarQubeVersion=5.0.0.4638 -owaspVersion=3.0.2 diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 4f61c963..c6ba68c4 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -16,7 +16,6 @@ jaxb = "4.0.0" json = "20220924" lombok = "1.18.24" mockitoInline = "4.6.1" -owasp = "3.0.2" postgreSql = "42.5.1" sonarqube = "5.0.0.4638" springBoot = "2.7.5" @@ -61,6 +60,5 @@ jaxb = [ "jaxb-rt", "jaxb-tools", "jaxb-ws-api" ] # Don't include jaxb-maven in [plugins] hierynomus-license = { id = "com.github.hierynomus.license", version.ref = "hierynomusLicense" } -owasp = { id = "org.owasp.dependencycheck", version.ref = "owasp" } sonarqube = { id = "org.sonarqube", version.ref = "sonarqube" } spring-boot = { id = "org.springframework.boot", version.ref = "springBoot" }