I am trying to create ComboPooledDataSource which is ideally present in C3P0 dependency. despite adding the gradle compile group, and doing gradle clean build, it is unable to fetch the jars related to c3p0. Below is the build.gradle file
plugins {
id 'org.springframework.boot' version '2.2.0.RELEASE'
id 'io.spring.dependency-management' version '1.0.8.RELEASE'
id 'java'
}
group = 'com.xyz.abc'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'
configurations {
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
}
sourceSets {
main {
java {
srcDir 'src'
}
}
}
repositories {
mavenCentral()
}
ext {
set('springCloudVersion', "Hoxton.RELEASE")
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-web-services'
compile group: 'org.hibernate', name: 'hibernate-core', version: '5.2.10.Final'
compile group: 'org.hibernate', name: 'hibernate-c3p0', version: '5.2.10.Final'
compile group: 'com.mchange', name: 'c3p0', version: '0.9.5.2'
runtimeOnly 'mysql:mysql-connector-java'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
testImplementation 'org.springframework.amqp:spring-rabbit-test'
testImplementation 'org.springframework.security:spring-security-test'
testCompile 'junit:junit:4.12'
compile 'junit:junit:4.12'
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud dependencies:${springCloudVersion}"
}
}
test {
useJUnitPlatform()
}
Related
I am trying to combine a Spring Boot backend api and a React frontend app into one single jar.
I was able to build a jar file containing both by following this article (https://medium.com/xebia-engineering/a-minimalistic-guide-to-building-and-deploying-monolithic-spring-boot-react-applications-39440035b27) but the frontend jar ends up in BOOT-INF/lib/frontend.jar instead of META-INF/resources. How can I create a jar file with the webjar in the right directory so it can render a React page?
frontend/build.gradle
plugins {
id "com.moowork.node" version "1.3.1"
}
apply plugin: "java"
apply plugin: "com.moowork.node"
node {
version = "12.9.1"
download = true
}
task bundle(type: NpmTask, dependsOn: npmInstall) {
args = ["run", "build"]
}
task uiTest(type: NpmTask) {
environment = ["CI": "true"]
args = ["run", "test"]
}
task run(type: NpmTask) {
args = ["start"]
}
check.dependsOn(test)
jar.dependsOn(bundle)
task webjar(type: Jar) {
from(fileTree("build")) {
into "META-INF/resources"
}
}
check.dependsOn(test)
jar.dependsOn(bundle)
jar.finalizedBy("webjar")
backend/build.gradle
plugins {
id 'org.springframework.boot' version '2.1.5.RELEASE'
id 'java'
}
apply plugin: 'io.spring.dependency-management'
apply plugin: 'maven'
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'
repositories {
mavenCentral()
maven {
url 'https://repo.spring.io/libs-milestone'
}
}
jar {
manifest {
attributes "Main-Class": "com.example.kasahararestapi.StockCheckAppApplication"
}
from {
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
}
}
tasks.withType(Test) {
scanForTestClasses = false
include "**/*Test.class" // whatever Ant pattern matches your test class files
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-security'
runtimeOnly 'org.springframework.boot:spring-boot-devtools'
runtimeOnly 'mysql:mysql-connector-java'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
implementation 'org.springframework.social:spring-social-github:1.0.0.M4'
implementation 'commons-io:commons-io:2.6'
implementation 'org.apache.commons:commons-lang3:3.0'
implementation 'io.jsonwebtoken:jjwt:0.9.0'
implementation platform('com.amazonaws:aws-java-sdk-bom:1.11.807')
implementation 'com.amazonaws:aws-java-sdk-s3'
implementation 'org.springframework.boot:spring-boot-starter-mail:1.2.0.RELEASE'
implementation 'org.modelmapper:modelmapper:2.3.5'
testCompile group: 'junit', name: 'junit', version: '4.11'
implementation project(path: ':frontend', configuration: 'default')
}
setting.gradle
pluginManagement {
repositories {
gradlePluginPortal()
}
}
rootProject.name = 'stock_check_app'
include 'backend'
include 'frontend'
It seems wierd to me that you can must use Java11 for Gluon.attach but you can not build a apk because of retrolambda issues, because they are compiled with java 11.
But with JDK1.8 you can build a apk but can not use gluon.attach instead i use gluon.charm.plugin.
Do i need to have a special gradle configuration to generate a apk with gluon.attach ?
this is my gradle file:
buildscript {
repositories {
jcenter()
mavenLocal()
mavenCentral()
}
dependencies {
classpath group: 'de.dynamicfiles.projects.gradle.plugins', name: 'javafx-gradle-plugin', version: '8.7.0'
classpath 'org.javafxports:jfxmobile-plugin:1.3.12'
}
}
plugins {
id 'java-library'
id "java"
id "eclipse"
id 'application'
}
apply plugin: "org.javafxports.jfxmobile"
repositories {
jcenter()
google()
mavenCentral()
mavenLocal()
maven {
url 'https://nexus.gluonhq.com/nexus/content/repositories/releases'
}
}
sourceSets {
main.java.srcDir "src/main/java"
main.resources.srcDir "src/main/resources"
}
mainClassName = 'de.test.main.App'
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
dependencies {
api 'org.apache.commons:commons-math3:3.6.1'
implementation 'com.google.guava:guava:27.0.1-jre'
testImplementation 'junit:junit:4.12'
//GLUON
compile group: 'com.gluonhq', name: 'charm-down-core', version: '3.8.6'
compile group: 'com.gluonhq', name: 'charm-glisten', version: '5.0.0'
compile group: 'com.gluonhq.attach', name: 'display', version: '4.0.2'
compile group: 'com.gluonhq.attach', name: 'util', version: '4.0.1.1'
compile group: 'com.gluonhq.attach', name: 'orientation', version: '4.0.1.1'
compile group: 'com.gluonhq.attach', name: 'magnetometer', version: '4.0.1.1'
//END
compile group: 'com.google.code.gson', name: 'gson', version: '2.8.5'
compile group: 'org.reflections', name: 'reflections', version: '0.9.11'
compile group: 'com.gluonhq', name: 'charm', version: '5.0.1'
}
jfxmobile {
downConfig {
version = '3.8.6'
plugins 'display', 'lifecycle', 'statusbar', 'storage'
}
android {
manifest = 'src/android/AndroidManifest.xml'
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'icon.png'
}
}
ios {
infoPList = file('src/ios/Default-Info.plist')
forceLinkClasses = [
'com.gluonhq.**.*',
'javax.annotations.**.*',
'javax.inject.**.*',
'javax.json.**.*',
'org.glassfish.json.**.*'
]
}
}
Or is this feature only for iOS ?
I have a project in the Eclipse IDE that using the gradle plugin and its working and running successfully within the IDE, However, when I export the project into a jar file using eclipse and run it via cmd, java -jar test1.jar, I get this reoccurring error:
"Caused by: java.lang.NoSuchMethodError:org.apache.log4j.Logger.getLoggerRepository()Lorg/apache/log4j/spi/LoggerRepository;"
From my understanding the log4j-1.2.17.jar file is being retrieved by gradle and is packaged when exported to a runnable jar, using eclipse, but I still get this error.
build.gradle:
buildscript {
ext {
springBootVersion = '1.5.6.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.7
repositories {
mavenCentral()
flatDir {
dirs 'F:/flatRepo'
}
}
dependencies {
compile('org.springframework.boot:spring-boot-starter-security')
compile('org.springframework.session:spring-session')
compile('org.springframework.boot:spring-boot-starter-thymeleaf')
runtime('org.springframework.boot:spring-boot-devtools')
compile('org.springframework.boot:spring-boot-starter-data-jpa')
runtime('org.hsqldb:hsqldb')
runtime('mysql:mysql-connector-java')
testCompile('org.springframework.boot:spring-boot-starter-test')
testCompile('org.springframework.security:spring-security-test')
//
// Dimensions dependencies
// log4j
compile group: 'log4j', name: 'log4j', version: '1.2.17'
// https://mvnrepository.com/artifact/javax.mail/mail
compile group: 'javax.mail', name: 'mail', version: '1.4.1'
// https://mvnrepository.com/artifact/commons-codec/commons-codec
compile group: 'commons-codec', name: 'commons-codec', version: '1.4'
// https://mvnrepository.com/artifact/javax.inject/javax.inject
compile group: 'javax.inject', name: 'javax.inject', version: '1'
}
task setHttpProxyFromEnv {
def map = ['HTTP_PROXY': 'http', 'HTTPS_PROXY': 'https']
for (e in System.getenv()) {
def key = e.key.toUpperCase()
if (key in map) {
def base = map[key]
def url = e.value.toURL()
println " - systemProp.${base}.proxy=${url.host}:${url.port}"
System.setProperty("${base}.proxyHost", url.host.toString())
System.setProperty("${base}.proxyPort", url.port.toString())
}
}
}
build.dependsOn setHttpProxyFromEnv
I am working on selenium Gradle project in which I accidentally changed some configuration that causes changes in build structure. before change my project structure was
project-dir
.gradle
.idea
build
gradle
out
src
now its
project-dir
.gradle
.idea
classes
gradle
out
src
when I run command "gradlew build" it should run all the feature files but it is not working after change. can you help me what went wrong. I am new to all this.
I am using
gradle 4.12
selenium 2.53.0
cucumber-junit 1.2.5
cucumber-java 1.2.5
cucumber-core 1.2.5
Gradle.build file:
-
import java.text.DateFormat
import java.text.SimpleDateFormat
version '1.0-SNAPSHOT'
task gitBuildId {
description = "Determine the build id from git"
def buildIdOut = new ByteArrayOutputStream()
def errorsOut = new ByteArrayOutputStream()
def extraInfo = ""
try {
exec {
// TODO: use a java git library?
standardOutput = buildIdOut
errorOutput = errorsOut
commandLine 'git', 'log', '-1', '--pretty=format:%ct|%h', 'HEAD'
}
} catch (Exception e) {
buildIdOut.write('0'.getBytes())
if (errorsOut.toString().contains("Not a git repository")) {
extraInfo = "(Not a git repository and/or no commits found)\n" +
"Type: git init; git add *; git commit *;"
}
}
//OR? def buildIdOut = (long) ((new Date()).getTime() / 1000)
DateFormat df = new SimpleDateFormat("yyyyMMddHHmmss")
df.setTimeZone(TimeZone.getTimeZone("GMT"))
//split into hash and timestamp
String[] parts = buildIdOut.toString().split("\\|")
def inTimeStamp = Long.parseLong(parts[0])
def date = new Date((inTimeStamp as long) * 1000)
def dateString = df.format(date)
def buildId = "${dateString}.${parts[1]}"
println "buildId = ${buildId} ${extraInfo}"
ext.output = {
return buildId
}
}
if (JavaVersion.current().isJava8Compatible()) {
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
}
//def buildId = rootProject.tasks.gitBuildId.output()
def rpmVersion = '0.0.0'
//apply plugin: 'java'
//apply plugin: 'gradle-one-jar'
apply plugin: 'application'
//apply plugin: 'idea'
sourceCompatibility = 1.8
// UTF-8 should be standard by now. So use it!
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
mainClassName = 'cucumber.api.cli.Main'
// Add Gradle OneJar Plugin, see https://github.com/rholder/gradle-one-jar
buildscript {
repositories {
mavenCentral()
}
}
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'org.seleniumhq.selenium', name: 'selenium-java', version: '2.53.0'
testCompile group: 'info.cukes', name: 'cucumber-junit', version: '1.2.5'
testCompile group: 'info.cukes', name: 'cucumber-java', version: '1.2.5'
testCompile group: 'info.cukes', name: 'cucumber-core', version: '1.2.5'
testCompile group: 'info.cukes', name: 'cucumber-jvm-deps', version: '1.0.3'
testCompile group: 'info.cukes', name: 'gherkin', version: '2.7.3'
testCompile group: 'org.mockito', name: 'mockito-all', version: '1.10.8'
testCompile group: 'com.mashape.unirest', name: 'unirest-java', version: '1.4.9'
testCompile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.3.6'
testCompile group: 'org.apache.httpcomponents', name: 'httpasyncclient', version: '4.0.2'
testCompile group: 'org.apache.httpcomponents', name: 'httpmime', version: '4.3.6'
testCompile group: 'org.json', name: 'json', version: '20140107'
compile group: 'mysql', name: 'mysql-connector-java', version: '5.1.6'
compile group: 'info.cukes', name: 'cucumber-junit', version: '1.2.5'
compile group: 'info.cukes', name: 'cucumber-java', version: '1.2.5'
compile group: 'info.cukes', name: 'cucumber-core', version: '1.2.5'
compile group: 'info.cukes', name: 'cucumber-jvm-deps', version: '1.0.3'
}
// Configure the oneJar task
task oneJar() {
doLast {
mainClass = mainClassName
}
}
//def buildId = rootProject.tasks.gitBuildId.output()
allprojects {
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'signing'
apply plugin: 'application'
mainClassName = 'cucumber.api.cli.Main'
// IDE support
apply from: rootProject.file('gradle/ide.gradle')
//cucumber support
//apply from: rootProject.file('gradle/cucumber.gradle')
if (version == 'unspecified') {
version = '0.0.0'
def envVersion = System.env['VERSION']
if (envVersion) {
version = envVersion
}
}
distZip.doFirst {
copy {
from('bin') {
include '**/*'
}
into file("src/dist/bin")
fileMode = 0755
}
}
}
task deleteTestResults() {
delete "build/test-results/test/"
delete "cucumber-html-reports"
}
/*task cucumberTest() {
def arglist = ["--monochrome", "--plugin", "pretty", "--glue", "com.automation.server",
"src/test/resources/features/"]
return javaexec {
main = "cucumber.api.cli.Main"
classpath = sourceSets.main.runtimeClasspath
args = arglist
}
}*/
test {
//we want display the following test events
testLogging {
events "PASSED", "STARTED", "FAILED", "SKIPPED"
//showStandardStreams = true
}
}
task testBoth {
println 'This is executed last during the execution phase.'
}
task wrapper(type: Wrapper) {
gradleVersion = '4.0'
}
artifacts {
oneJar
}
Getting the below error while running functional test cases after upgrading to jdk10.
Could not target platform: 'Java SE 10' using tool chain: 'JDK 8 (1.8)'.
build.gradle
import com.bmuschko.gradle.docker.tasks.image.Dockerfile
import java.text.SimpleDateFormat;
import org.apache.tools.ant.taskdefs.condition.Os
buildscript {
ext {
springBootVersion = '2.0.1.RELEASE'
}
repositories {
mavenCentral()
mavenLocal()
maven {
url 'https://repo.spring.io/libs-release'
url 'https://repo.spring.io/release'
url 'https://repo.spring.io/snapshot'
url 'https://repo.spring.io/milestone'
url 'https://repo.spring.io/libs-milestone'
}
maven{
url='https://plugins.gradle.org/m2/'
}
mavenLocal()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath ("com.bmuschko:gradle-docker-plugin:3.2.1")
classpath ("org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.5")
classpath "gradle.plugin.au.com.dius:pact-jvm-provider-gradle_2.12:3.6.0-rc.0"
classpath ("com.moowork.gradle:gradle-node-plugin:1.2.0")
}
}
plugins {
id "java"
id "au.com.dius.pact" version "3.6.0-rc.0"
id "com.gorylenko.gradle-git-properties" version "1.4.17"
id "de.undercouch.download" version "3.4.2"
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'com.bmuschko.docker-remote-api'
apply plugin: 'jacoco'
apply plugin: 'maven-publish'
apply plugin: 'org.sonarqube'
apply plugin: 'au.com.dius.pact'
apply plugin: 'scala'
group = 'com'
sourceCompatibility = 10
ext {
springCloudVersion = 'Finchley.RELEASE'
}
//start of integration tests changes
sourceSets {
integrationTest {
java {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
srcDir file('test/functional-api/java')
}
resources.srcDir file('test/functional-api/resources')
}
}
configurations {
integrationTestCompile.extendsFrom testCompile
integrationTestRuntime.extendsFrom testRuntime
}
//end of integration tests changes
dependencies {
//web (Tomcat, Logging, Rest)
compile group: 'org.springframework.boot', name: 'spring-boot-starter-web'
// Redis
//compile group: 'org.springframework.boot', name: 'spring-boot-starter-data-redis'
//Mongo Starter
compile group: 'org.springframework.boot', name:'spring-boot-starter-data-mongodb'
// Configuration processor - To Generate MetaData Files. The files are designed to let developers offer “code completion� as users are working with application.properties
compile group: 'org.springframework.boot', name: 'spring-boot-configuration-processor'
// Actuator - Monitoring
compile group: 'org.springframework.boot', name: 'spring-boot-starter-actuator'
//Sleuth - Tracing
compile group: 'org.springframework.cloud', name: 'spring-cloud-starter-sleuth'
//Hystrix - Circuit Breaker
compile group: 'org.springframework.cloud', name: 'spring-cloud-starter-netflix-hystrix'
// Hystrix - Dashboard
compile group: 'org.springframework.cloud', name: 'spring-cloud-starter-netflix-hystrix-dashboard'
// Thymeleaf
compile group: 'org.springframework.boot', name: 'spring-boot-starter-thymeleaf'
//Voltage
// Device Detection
compile group: 'org.springframework.boot', name: 'spring-boot-starter-data-cassandra', version:'2.0.4.RELEASE'
compile group: 'com.google.guava', name: 'guava', version: '23.2-jre'
compile('com.google.code.gson:gson:2.8.0')
compile('org.json:json:20170516')
//Swagger
compile group: 'io.springfox', name: 'springfox-swagger2', version:'2.8.0'
compile group: 'io.springfox', name: 'springfox-swagger-ui', version:'2.8.0'
//jkd10 fixes
compile group: 'javax.xml.bind',name: 'jaxb-api', version:'2.3.0'
compile group: 'javax.xml.soap', name: 'javax.xml.soap-api', version:'1.3.5'
compile group: 'com.sun.xml.messaging.saaj', name: 'saaj-impl', version:'1.4.0'
compile group: 'javax.activation', name: 'activation', version: '1.1.1'
compile group: 'org.glassfish.jaxb', name: 'jaxb-runtime', version:'2.3.0.1'
//Lombok
compileOnly group: 'org.projectlombok', name: 'lombok',version:'1.18.2'
//compile group: 'io.smartcat', name: 'cassandra-diagnostics-connector21', version: '1.4.10'
//Testing
//Spring WS Test
testCompile group: 'org.springframework.ws', name: 'spring-ws-test', version:'2.4.0.RELEASE'
testCompile('org.springframework.boot:spring-boot-starter-test'){
exclude group: "com.vaadin.external.google", module:"android-json"
}
//Pact
testCompile group: 'au.com.dius', name: 'pact-jvm-provider-gradle_2.12', version: '3.5.7'
testCompile group: 'au.com.dius', name:'pact-jvm-provider-junit_2.12',version:'3.5.13'
testCompile group: 'au.com.dius', name:'pact-jvm-consumer-junit_2.12', version:'3.5.13'
//Embedded mongo for testing
testCompile group: 'de.flapdoodle.embed', name:'de.flapdoodle.embed.mongo',version:'2.0.1'
//testCompile group: 'cz.jirutka.spring', name: 'embedmongo-spring', version: '1.1'
compile group: 'info.cukes', name: 'cucumber-jvm', version: '1.2.5'
testCompile group: 'io.cucumber', name: 'cucumber-junit', version: '3.0.2'
compile group: 'io.cucumber', name: 'cucumber-spring', version: '3.0.2'
testCompile('org.cassandraunit:cassandra-unit-spring:3.5.0.1'){
exclude group: 'org.cassandraunit', module: 'cassandra-unit'
}
// https://mvnrepository.com/artifact/org.cassandraunit/cassandra-unit-shaded
compile group: 'org.cassandraunit', name: 'cassandra-unit-shaded', version: '3.5.0.1'
// https://mvnrepository.com/artifact/org.hectorclient/hector-core
compile group: 'org.hectorclient', name: 'hector-core', version: '2.0-0'
compile group: 'org.apache.cassandra', name: 'cassandra-all', version: '3.11.3'
integrationTestCompile group: 'org.springframework.ws', name: 'spring-ws-test', version:'2.4.0.RELEASE' //changes for integration tests
integrationTestCompile("org.springframework.boot:spring-boot-starter-test"){ //changes for integration tests
exclude group: "com.vaadin.external.google", module:"android-json"
}
//integrationTestCompile group: 'info.cukes', name: 'cucumber-junit', version: '1.2.5' //changes for integration tests
//integrationTestCompile group: 'info.cukes', name: 'cucumber-spring', version: '1.2.5' //changes for integration tests
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}
test {
//ignoreFailures = true
reports.junitXml.enabled = false
reports.html.enabled = true
testLogging {
exceptionFormat = 'full'
}
jacoco {
append = false
destinationFile = file("$buildDir/jacoco/jacocoTest.exec")
maxHeapSize = '2048m'
minHeapSize = '1024m'
//classDumpDir = file("$buildDir/jacoco/classpathdumps")
}
}
jacocoTestReport {
group = "Reporting"
reports {
xml.enabled true
csv.enabled false
html.destination "${buildDir}/reports/coverage"
}
afterEvaluate {
classDirectories = files(classDirectories.files.collect {
fileTree(dir: it,
exclude: [
'**/config*',
'**/coupons/TextToClipApplication*',
'**/bean/*Request*',
'**/bean/*Response*',
])
})
}
}
test.finalizedBy jacocoTestReport
jacoco {
toolVersion = "0.8.2"
reportsDir = file("$buildDir/customJacocoReportDir")
}
//start of changes for integration tests
task apifunctionaltest(type: Test) {
systemProperty "integrationurl", System.getProperty("integrationurl")
reports.junitXml.enabled = false
reports.html.enabled = true
testLogging {
exceptionFormat = 'full'
}
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
outputs.upToDateWhen { false }
reports.html.destination = file("${reporting.baseDir}/${name}")
}
//end of changes for integration tests
We are using cucumber to test it. Same code is working in local using gradle, but not working in server. Anyone faced the same problem ?
Thanks everyone. Issue for us is build server has been using jdk8. Now it is resolved after changing the build template to jdk10.