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

DFR-3149 Remove properties-volume-spring-boot-starter #373

Open
wants to merge 29 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
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
61 changes: 17 additions & 44 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ buildscript {
}
repositories {
mavenLocal()
mavenCentral()
maven { url "https://jitpack.io" }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
Expand All @@ -23,10 +21,10 @@ plugins {
id 'io.spring.dependency-management' version '1.1.3'
id 'jacoco'
id 'org.owasp.dependencycheck' version '8.4.2'
id 'org.sonarqube' version '3.5.0.2730'
id 'org.sonarqube' version '5.1.0.4882'
id 'org.springframework.boot' version '2.7.17'
id 'info.solidsoft.pitest' version '1.15.0'
id 'uk.gov.hmcts.java' version '0.12.47'
id 'uk.gov.hmcts.java' version '0.12.63'
}

apply plugin: 'checkstyle'
Expand Down Expand Up @@ -54,11 +52,11 @@ java {
}

bootJar {
archiveFileName = 'div-case-formatter-service.jar'
manifest {
attributes 'Implementation-Title': project.name,
'Implementation-Version': project.version
}
archiveFileName = 'div-case-formatter-service.jar'
}

processTestResources {
Expand Down Expand Up @@ -121,9 +119,6 @@ dependencyManagement {

repositories {
mavenCentral()
jcenter()
maven { url 'https://repo.spring.io/libs-milestone' }
maven { url "https://repo.maven.apache.org/maven2" }
maven { url "https://jitpack.io" }
}

Expand All @@ -137,20 +132,10 @@ distributions {
}
}

checkstyle.toolVersion = '8.32'
checkstyle.configFile = new File(rootDir, "checkstyle.xml")
checkstyle.maxWarnings(0)

// make build fail on Checkstyle issues (https://github.com/gradle/gradle/issues/881)
tasks.withType(Checkstyle).each { checkstyleTask ->
checkstyleTask.doLast {
reports.all { report ->
def outputFile = report.destination
if (outputFile.exists() && outputFile.text.contains("<error ")) {
throw new GradleException("There were checkstyle warnings! For more info check $outputFile")
}
}
}
checkstyle {
maxWarnings = 0
toolVersion = '10.14.0'
getConfigDirectory().set(new File(rootDir, 'config/checkstyle'))
}

sourceSets {
Expand Down Expand Up @@ -199,7 +184,7 @@ def versions = [
pitest : '1.15.3',
puppyCrawl : '8.45.1',
reformPropertiesVolume: '0.1.0',
reformsJavaLogging : '5.1.7',
reformsJavaLogging : '6.1.6',
restAssured : '4.5.1',
serenity : '2.6.0',
serenityCucumber : '1.9.51',
Expand All @@ -211,8 +196,7 @@ def versions = [
springSecurityCrypto : '5.8.8',
tomcatEmbed : '9.0.82',
unirest : '1.4.9',
wiremockVersion : '2.27.2',
logbackVersion : '1.2.10'
wiremockVersion : '2.27.2'
]

tasks.withType(JavaExec).configureEach {
Expand All @@ -238,9 +222,6 @@ dependencies {
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: versions.springBoot
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-validation', version: versions.springBoot

implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackVersion
implementation group: 'ch.qos.logback', name: 'logback-core', version: versions.logbackVersion

implementation group: 'com.google.guava', name: 'guava', version: versions.guava

implementation(group: 'org.springframework.cloud', name: 'spring-cloud-starter-openfeign', version: versions.springOpenFeign)
Expand All @@ -251,13 +232,8 @@ dependencies {
exclude group: 'io.reactivex', module: 'rxnetty-servo'
}

implementation(group: 'org.springframework.security', name: 'spring-security-rsa', version: versions.spring_security_rsa) {
force = true
}

implementation(group: 'org.springframework.security', name: 'spring-security-crypto', version: versions.springSecurityCrypto) {
force = true
}
implementation group: 'org.springframework.security', name: 'spring-security-rsa', version: versions.springSecurityRsa
implementation group: 'org.springframework.security', name: 'spring-security-crypto', version: versions.springSecurityCrypto

implementation group: 'org.apache.tomcat.embed', name: 'tomcat-embed-core', version: versions.tomcatEmbed
implementation group: 'org.apache.tomcat.embed', name: 'tomcat-embed-websocket', version: versions.tomcatEmbed
Expand All @@ -274,11 +250,9 @@ dependencies {
implementation group: 'org.apache.commons', name: 'commons-collections4', version: versions.commonsCollections4
implementation group: 'org.apache.commons', name: 'commons-lang3', version: versions.commonsLang3

implementation group: 'uk.gov.hmcts.reform', name: 'properties-volume-spring-boot-starter', version: versions.reformPropertiesVolume
implementation group: 'org.apache.httpcomponents', name: 'httpclient', version: versions.httpComponents
implementation group: 'org.apache.httpcomponents', name: 'fluent-hc', version: versions.httpComponents
implementation group: 'uk.gov.hmcts.reform', name: 'logging', version: versions.reformsJavaLogging
implementation group: 'uk.gov.hmcts.reform', name: 'logging-appinsights', version: versions.reformsJavaLogging
implementation group: 'com.github.hmcts.java-logging', name: 'logging', version: versions.reformsJavaLogging

implementation group: 'org.pitest', name: 'pitest', version: versions.pitest
implementation group: 'info.solidsoft.gradle.pitest', name: 'gradle-pitest-plugin', version: versions.gradlePitest
Expand Down Expand Up @@ -387,11 +361,10 @@ project.tasks['sonarqube'].dependsOn jacocoTestReport

sonarqube {
properties {
property "sonar.exclusions", sonarExclusions.join(", ")
property "sonar.cpd.exclusions", sonarCpdExclusions.join(", ")
property "sonar.coverage.jacoco.xmlReportPaths", "${jacocoTestReport.reports.xml.destination.path}"
property "sonar.projectKey", "DivorceCaseFormatterService"
property "sonar.projectName", "Divorce :: case-formatter-service"
property "sonar.exclusions", sonarExclusions.join(", ")
property "sonar.coverage.jacoco.xmlReportPaths", "${jacocoTestReport.reports.xml.outputLocation.get()}"
property "sonar.pitest.mode", "reuseReport"
property "sonar.pitest.reportsDirectory", "build/reports/pitest"
}
Expand All @@ -405,9 +378,9 @@ jacocoTestReport {
executionData(test)

reports {
xml.enabled = true
html.enabled = true
xml.destination file("${buildDir}/reports/jacoco/test/jacocoTestReport.xml")
xml.required = true
html.required = true
xml.outputLocation = file("${buildDir}/reports/jacoco/test/jacocoTestReport.xml")
}
}

Expand Down
4 changes: 2 additions & 2 deletions charts/div-cfs/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
appVersion: "1.0"
description: Divorce - Case data formatter Service
name: div-cfs
version: 2.0.12
version: 2.0.13
dependencies:
- name: java
version: 5.0.0
version: 5.2.0
repository: "https://hmctspublic.azurecr.io/helm/v1/repo/"
16 changes: 11 additions & 5 deletions dependency-check-suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,11 @@
<cve>CVE-2023-28708</cve>
</suppress>
<suppress>
<notes><![CDATA[file name: tomcat-embed-websocket-9.0.68.jar]]></notes>
<packageUrl regex="true">^pkg:maven/org\.apache\.tomcat\.embed/tomcat\-embed\-websocket@.*$</packageUrl>
<cve>CVE-2022-45143</cve>
<cve>CVE-2023-28708</cve>
</suppress>
<notes><![CDATA[file name: tomcat-embed-websocket-9.0.68.jar]]></notes>
<packageUrl regex="true">^pkg:maven/org\.apache\.tomcat\.embed/tomcat\-embed\-websocket@.*$</packageUrl>
<cve>CVE-2022-45143</cve>
<cve>CVE-2023-28708</cve>
</suppress>
<suppress>
<notes><![CDATA[file name: bcprov-jdk15on-1.61.jar]]></notes>
<packageUrl regex="true">^pkg:maven/org\.bouncycastle/bcprov\-jdk15on@.*$</packageUrl>
Expand Down Expand Up @@ -310,4 +310,10 @@
<packageUrl regex="true">^pkg:maven/org.springframework.boot/spring-boot@.*$</packageUrl>
<cve>CVE-2023-34055</cve>
</suppress>
<suppress>
<cve>CVE-2023-6481</cve>
</suppress>
<suppress>
<cve>CVE-2023-33202</cve>
</suppress>
</suppressions>
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
34 changes: 21 additions & 13 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -83,10 +85,9 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -133,26 +134,29 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -197,11 +201,15 @@ if "$cygwin" || "$msys" ; then
done
fi

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
22 changes: 12 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down Expand Up @@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand All @@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down