Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jakarta libs upgrade #76

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/gradle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17
- name: Build
run: ./gradlew check
128 changes: 68 additions & 60 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
buildscript {
ext {
springBootVersion = '2.7.7'
springBootVersion = '3.1.2'
}
repositories {
mavenLocal()
Expand All @@ -22,13 +22,13 @@ plugins {
id 'jacoco'
id 'pmd'
id 'com.github.ben-manes.versions' version '0.20.0'
id "info.solidsoft.pitest" version '1.3.0'
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
id "info.solidsoft.pitest" version '1.7.4'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'org.owasp.dependencycheck' version '8.0.1'
id 'org.sonarqube' version '2.8'
id "org.flywaydb.flyway" version "6.2.0"
id 'org.sonarqube' version '4.2.1.3168'
id "org.flywaydb.flyway" version "8.5.2"
id 'maven-publish'
id 'uk.gov.hmcts.java' version '0.12.0'
id 'uk.gov.hmcts.java' version '0.12.39'
}

apply plugin: 'java-library'
Expand All @@ -39,18 +39,18 @@ apply plugin: 'org.springframework.boot'

def versions = [
lombok : '1.18.22',
gradlePitest : '1.3.0',
pitest : '1.4.2',
gradlePitest : '1.5.1',
pitest : '1.7.4',
reformLogging : '5.1.9',
serenity : '2.0.23',
serenity : '2.2.12',
sonarPitest : '0.5',
springBoot : '2.7.7',
springBoot : '3.1.1',
springHystrix : '2.1.1.RELEASE',
springfoxSwagger : '2.9.2',
camel : '3.8.0',
jackson : '2.13.1',
springVersion : '5.3.20',
log4j : '2.17.1'
camel : '4.0.0-RC2',
jackson : '2.13.2',
springVersion : '6.0.11',
log4j : '2.20.0'
]


Expand Down Expand Up @@ -108,11 +108,11 @@ java {
}

compileJava {
options.compilerArgs << '-parameters' << '-Xlint:deprecation' << "-Xlint:unchecked" << "-Werror"
options.compilerArgs << '-parameters' << '-Xlint:deprecation' << "-Xlint:unchecked"
}

compileTestJava {
options.compilerArgs << '-Xlint:deprecation' << "-Xlint:unchecked" << "-Werror"
options.compilerArgs << '-Xlint:deprecation' << "-Xlint:unchecked"
}

sourceSets {
Expand Down Expand Up @@ -158,14 +158,18 @@ idea {

// Fix for CVE-2021-21295 & need to be removed with new Azure blob version
configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'io.netty') {
details.useVersion "4.1.77.Final"
}
if (details.requested.group == 'com.ibm.icu') {
details.useVersion "66.1"
}
}
// resolutionStrategy.eachDependency { details ->
// if (details.requested.group == 'io.netty') {
// details.useVersion "4.1.77.Final"
// }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please delete commented code

// if (details.requested.group == 'com.ibm.icu') {
// details.useVersion "66.1"
// }
// }

exclude group: 'org.apache.groovy', module: 'groovy'
exclude group: 'org.apache.groovy', module: 'groovy-xml'
exclude group: 'org.apache.groovy', module: 'groovy-json'
}

configurations {
Expand Down Expand Up @@ -239,8 +243,8 @@ pitest {
]
threads = 10
enableDefaultIncrementalAnalysis = true
historyInputLocation = ['build/reports/pitest/fastermutationtesting']
historyOutputLocation = ['build/reports/pitest/fastermutationtestingoutput']
historyInputLocation = 'build/reports/pitest/fastermutationtesting'
historyOutputLocation = 'build/reports/pitest/fastermutationtestingoutput'
outputFormats = ['XML', 'HTML']
timestampedReports = true
mutationThreshold = 90
Expand Down Expand Up @@ -278,7 +282,6 @@ repositories {
}

dependencies {
api group: 'javax.validation', name: 'validation-api', version: '2.0.1.Final'
implementation (group: 'org.springframework.boot', name: 'spring-boot-starter-json', version: versions.springBoot) {
exclude group: 'org.glassfish', module: 'jakarta.el'
}
Expand Down Expand Up @@ -308,16 +311,17 @@ dependencies {
implementation group: 'org.springframework', name: 'spring-webmvc', version: versions.springVersion

implementation group: 'com.github.ben-manes.caffeine', name: 'caffeine', version: '3.0.4'
implementation (group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.13.2.1') {
force = true
}
implementation (group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: versions.jackson) {
force = true
}
implementation (group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.15.2')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't we use 2.13.2 ( version: versions.jackson))

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

local dependency check scan flags jackson-databind 2.13.2 as vulnerable to CVE-2020-36518, CVE-2022-42003, CVE-2022-42004

implementation (group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: versions.jackson)
implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: versions.jackson
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: versions.jackson
implementation group: 'com.fasterxml.jackson', name: 'jackson-bom', version: '2.13.2.20220324', ext: 'pom'

implementation (group: 'commons-fileupload', name: 'commons-fileupload') {
version {
strictly '1.5'
}
}
implementation group: 'io.github.openfeign.form', name: 'feign-form', version: '3.8.0'
implementation (group: 'io.github.openfeign.form', name: 'feign-form-spring', version: '3.8.0') {
exclude group: 'commons-io', module: 'commons-io'
Expand All @@ -332,58 +336,64 @@ dependencies {
exclude group: 'org.apache.tomcat.embed', module: 'tomcat-embed-core'
exclude group: 'org.apache.tomcat.embed', module: 'tomcat-embed-websocket'
}
implementation ('com.github.hmcts:service-auth-provider-java-client:4.0.3') {
implementation ('com.github.hmcts:service-auth-provider-java-client:5.1.0') {
exclude group: 'org.springframework.cloud', module: 'spring-cloud-openfeign-core'
}
implementation group: 'org.springframework.security', name: 'spring-security-crypto', version: '5.7.1'
implementation group: 'org.springframework.security', name: 'spring-security-crypto', version: '5.8.5'
implementation 'net.logstash.logback:logstash-logback-encoder:6.4'

implementation group: 'com.microsoft.azure', name: 'azure-storage-blob', version: '11.0.0'
implementation group: 'com.azure', name: 'azure-storage-blob', version: '12.18.0'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

latest is 12.23.0, better to use latest version, if it is compatable



implementation group: 'org.springframework.security', name: 'spring-security-core', version: '5.7.5'
implementation group: 'org.springframework.security', name: 'spring-security-core', version: '5.8.5'
implementation group: 'org.bouncycastle', name: 'bcpkix-jdk18on', version: '1.72'

implementation group: 'org.flywaydb', name: 'flyway-core', version: '5.2.4'
implementation group: 'org.postgresql', name: 'postgresql', version: '42.3.3'
implementation group: 'org.postgresql', name: 'postgresql', version: '42.3.8'

implementation group: 'com.google.guava', name: 'guava', version: '30.1-jre'
implementation group: 'com.google.guava', name: 'guava', version: '32.0.0-jre'

implementation group: 'org.apache.commons', name: 'commons-vfs2', version: '2.4.1'
implementation group: 'com.jcraft', name: 'jsch', version: '0.1.55'

implementation 'commons-io:commons-io:2.8.0'

implementation group: 'javax.validation', name: 'validation-api', version: '2.0.1.Final'

api group: 'org.apache.camel.springboot', name: 'camel-spring-boot-starter', version:versions.camel
implementation group: 'org.apache.camel', name: 'camel-csv', version: versions.camel
implementation group: 'org.apache.camel', name: 'camel-sql', version: versions.camel
api group: 'org.apache.camel', name: 'camel-spring-batch', version: versions.camel


api group: 'org.apache.camel.springboot', name: 'camel-azure-starter', version:versions.camel
api group: 'org.apache.camel.springboot', name: 'camel-azure-storage-blob-starter', version:versions.camel
// api group: 'org.apache.camel.springboot', name: 'camel-azure-storage-queue-starter', version:versions.camel
api group: 'org.apache.camel.springboot', name: 'camel-bindy-starter', version:versions.camel
implementation group: 'org.apache.camel.springboot', name: 'camel-jdbc-starter', version:versions.camel
implementation group: 'org.apache.camel', name: 'camel-bean-validator', version: versions.camel
implementation group: 'org.apache.camel.springboot', name: 'camel-spring-boot-starter', version: versions.camel

implementation group: 'org.apache.camel', name: 'camel-core', version: versions.camel
implementation group: 'org.apache.camel', name: 'spi-annotations', version: '3.4.1'
implementation group: 'org.apache.camel', name: 'spi-annotations', version: versions.camel

implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: versions.log4j
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: versions.log4j
implementation group: 'org.apache.logging.log4j', name: 'log4j', version: versions.log4j
implementation group: 'org.apache.logging.log4j', name: 'log4j-to-slf4j', version: versions.log4j

implementation group: 'ch.qos.logback', name: 'logback-core', version: '1.2.10'
implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.10'
implementation group: 'ch.qos.logback', name: 'logback-core', version: '1.4.7'
implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.4.7'

implementation group: 'org.springframework.cloud', name: 'spring-cloud-config-server', version: '3.1.5'
implementation group: 'org.springframework.cloud', name: 'spring-cloud-config-server', version: '4.0.0'

implementation group: 'com.opencsv', name: 'opencsv', version: '3.7'
api group: 'commons-lang', name: 'commons-lang', version: '2.6'
api group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0'
implementation 'com.sendgrid:sendgrid-java:4.7.2'

implementation group: 'jakarta.el', name: 'jakarta.el-api', version: '5.0.0'
implementation group: 'org.glassfish.expressly', name: 'expressly', version: '5.0.0'

compileOnly group: 'org.projectlombok', name: 'lombok', version: versions.lombok
annotationProcessor group: 'org.projectlombok', name: 'lombok', version: versions.lombok
testCompileOnly group: 'org.projectlombok', name: 'lombok', version: versions.lombok
Expand All @@ -395,7 +405,7 @@ dependencies {
smokeTestCompileOnly group: 'org.projectlombok', name: 'lombok', version: versions.lombok
smokeTestAnnotationProcessor group: 'org.projectlombok', name: 'lombok', version: versions.lombok

testImplementation (group: 'io.rest-assured', name: 'rest-assured', version: '4.3.1') {
testImplementation (group: 'io.rest-assured', name: 'rest-assured', version: '4.5.1') {
exclude group: "com.sun.xml.bind", module: "jaxb-osgi"
}
testImplementation("org.hamcrest:hamcrest-junit:2.0.0.0") {
Expand All @@ -415,27 +425,21 @@ dependencies {
testImplementation 'org.codehaus.sonar-plugins:sonar-pitest-plugin:0.5'


testImplementation group: 'org.apache.camel', name: 'camel-test-spring', version: versions.camel
testImplementation group: 'org.apache.camel', name: 'camel-test', version: versions.camel
testImplementation group: 'org.apache.camel', name: 'camel-test-spring-junit5', version: versions.camel
testImplementation group: 'org.apache.camel', name: 'camel-test-junit5', version: versions.camel
testImplementation group: 'org.testcontainers', name: 'postgresql', version: '1.12.5'
testImplementation group: 'org.postgresql', name: 'postgresql', version: '42.3.3'
testImplementation group: 'org.postgresql', name: 'postgresql', version: '42.3.8'

integrationTestImplementation group: 'org.apache.camel', name: 'camel-test-spring', version: versions.camel
integrationTestImplementation group: 'org.apache.camel', name: 'camel-test', version: versions.camel
integrationTestImplementation group: 'org.apache.camel', name: 'camel-test-spring-junit5', version: versions.camel
integrationTestImplementation group: 'org.apache.camel', name: 'camel-test-junit5', version: versions.camel
integrationTestImplementation group: 'org.testcontainers', name: 'postgresql', version: '1.12.5'
integrationTestImplementation group: 'org.postgresql', name: 'postgresql', version: '42.3.3'
integrationTestImplementation group: 'org.postgresql', name: 'postgresql', version: '42.3.8'

testImplementation(group: 'org.yaml', name: 'snakeyaml', version: '1.23') {
force = true
}
testImplementation(group: 'org.yaml', name: 'snakeyaml', version: '1.23')

integrationTestImplementation(group: 'org.yaml', name: 'snakeyaml', version: '1.23') {
force = true
}
integrationTestImplementation(group: 'org.yaml', name: 'snakeyaml', version: '1.23')

functionalTestImplementation(group: 'org.yaml', name: 'snakeyaml', version: '1.23') {
force = true
}
functionalTestImplementation(group: 'org.yaml', name: 'snakeyaml', version: '1.23')

integrationTestImplementation sourceSets.main.runtimeClasspath
integrationTestImplementation sourceSets.test.runtimeClasspath
Expand Down Expand Up @@ -483,6 +487,10 @@ tasks.jar {
// java flag that configures the deployed applications
applicationDefaultJvmArgs = ["-Dfile.encoding=UTF-8"]

tasks.named("bootDistZip").configure { dependsOn("jar")}
tasks.named("bootDistTar").configure { dependsOn("jar")}
tasks.named("bootStartScripts").configure { dependsOn("jar")}

test {
useJUnitPlatform()
}
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Fri Aug 03 13:37:52 BST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
Loading