Closed sumit-gurav closed 4 years ago
org.gradle.parallel=true
org.gradle.caching=true
org.gradle.workers.max=4
#LIBS
jwt_version=0.9.0
shedlock_version=2.1.0
activation_api_version=1.2.0
aws_java_sdk_core=1.11.135
commons_fileupload_version=1.3.3
commons_text_version=1.1
commons_io_version=2.6
commons_lang_version=3.7
google_findbugs_version=3.0.2
google_maps_services_version=0.9.1
guava_version=25.0-jre
hello_sign=4.0.9
jackson_version=2.10.1
jaxb_api_version=2.3.0
json_version=20180130
logback_cloudwatch_appender_version=1.0.9
logstash_logback_encoder_version=5.2
lombok_version=1.18.2
mongobee_version=0.15-SNAPSHOT
springfox_swagger2_version=2.7.0
cda_parse_version=1.2.0.201212201425
smartystreets_java_sdk_version=3.3.8
#TEST LIBS
#embeded_mongo_version=2.1.1
embeded_mongo_version=2.2.0
jmh_version=1.21
#junit_version=5.2
junit_version=5.5.2
#powermock_version=2.0.0-beta.5
powermock_version=2.0.4
#Plugins
#System properties, etc
systemProp.sonar.host.url=http://sonar.hhstechgroup.com:9000
plugins {
id 'com.palantir.docker-run' version '0.20.1'
}
String container = UUID.randomUUID()
String port = getRandomPort()
dockerRun {
name container
image "registry.hhstechgroup.com/general/rabbitmq:3-management"
ports port + ':5672'
daemonize true
env 'RABBITMQ_ERLANG_COOKIE': 'SWQOKODSQALRPCLNMEQG', 'RABBITMQ_DEFAULT_USER': 'rabbitmq', 'RABBITMQ_DEFAULT_PASS': 'rabbitmq', 'RABBITMQ_DEFAULT_VHOST': '/'
}
description = 'Provider Management core services'
dependencies {
compile project(':commons:autoconfigure')
compile project(':commons:commons')
compile project(':commons:commons-audit')
compile project(':commons:commons-services')
compile project(':commons:jwt-filter')
compile "org.springframework.cloud:spring-cloud-starter-netflix-eureka-client"
compile "io.opentracing.contrib:opentracing-spring-jaeger-cloud-starter:1.0.1"
compile "org.springframework.boot:spring-boot-starter"
compile "org.springframework.boot:spring-boot-starter-amqp"
compile "org.springframework.boot:spring-boot-starter-web"
compile "org.springframework.boot:spring-boot-starter-actuator"
compile "org.springframework.boot:spring-boot-starter-tomcat"
compile "org.springframework.boot:spring-boot-starter-security"
compile "org.springframework.boot:spring-boot-starter-logging"
compile "org.springframework.boot:spring-boot-starter-data-rest"
compile "org.springframework.boot:spring-boot-starter-data-mongodb"
compile "org.springframework.boot:spring-boot-starter-aop"
compile "org.springframework:springloaded:1.2.8.RELEASE"
compile "commons-io:commons-io:${commons_io_version}"
compile "org.springframework.security:spring-security-web"
compile "org.springframework.security:spring-security-config"
compile "org.apache.commons:commons-collections4:4.1"
compile "com.fasterxml.jackson.core:jackson-databind:2.9.10"
compile "com.google.guava:guava:${guava_version}"
compile(group: 'io.springfox', name: 'springfox-swagger2', version: '2.7.0') {
exclude(module: 'guava')
}
compile "javax.cache:cache-api:1.1.0"
compile "com.hhstechgroup.zoo:zoo-commons:${project.version}"
compile "org.springframework.boot:spring-boot-starter-websocket"
compile "org.springframework.boot:spring-boot-configuration-processor"
compile "org.springframework.boot:spring-boot-starter-cache"
compile "com.hazelcast:hazelcast-spring:3.12"
compile "com.hazelcast:hazelcast-eureka-one:1.0.2"
compile "org.reflections:reflections:0.9.11"
testCompile project(':commons:commons-test')
}
test {
dependsOn tasks.dockerRun
finalizedBy tasks.dockerRemoveContainer
}
dockerRemoveContainer.dependsOn tasks.dockerStop
test.doFirst {
systemProperty 'spring.rabbitmq.addresses', "localhost:" + port
}
buildDocker {
dockerfile {
contextDir = new File(project.buildDir, "libs")
env ("EUREKA_HOST", "http://eureka:8888/config/eureka/")
env ("SPRING_DATA_MONGODB_URI", "mongodb://mongo:27017/?retryWrites=true")
env ("SPRING_RABBITMQ_ADDRESSES", "rabbit:5672")
env ("SPRING_PROFILES_ACTIVE", "prod")
env ("TZ", "US/Eastern")
expose (13080)
add (project.file('providermgmt-server.sh'))
add (project.getName() + '-' + project.getVersion() + '-boot.jar', '/' + project.getName() + '.jar')
entrypoint (["/providermgmt-server.sh"])
healthCheck (10, 5, 5, 360, 'curl -f 127.0.0.1:13080/api/providermgmt/actuator/health -s || exit 1')
}
}
main build.gradle
buildscript {
ext {
springBootVersion = "2.2.2.RELEASE"
springCloudVersion = "Hoxton.RC1"
}
repositories {
maven { url "http://artifactory.hhstechgroup.com:8081/artifactory/repo" }
maven { url "https://plugins.gradle.org/m2/" }
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
maven { url "https://repo.spring.io/release" }
maven { url "http://repo.spring.io/plugins-release" }
}
dependencies {
classpath("org.jfrog.buildinfo:build-info-extractor-gradle:4.7.5")
classpath("io.spring.gradle:dependency-management-plugin:1.0.6.RELEASE")
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("org.owasp:dependency-check-gradle:5.2.2")
}
}
plugins {
id "ch.netzwerg.release" version "1.2.5"
id "se.eugenekainara.docker" version "1.3.1"
id "org.sonarqube" version "2.6.2"
id "com.gorylenko.gradle-git-properties" version "1.4.17"
}
group = "com.hhstechgroup.provider-management"
allprojects {
apply plugin: "com.jfrog.artifactory"
apply plugin: "docker"
apply plugin: "idea"
apply plugin: "io.spring.dependency-management"
apply plugin: "jacoco"
apply plugin: "java"
apply plugin: "maven"
apply plugin: "maven-publish"
apply plugin: "org.owasp.dependencycheck"
repositories {
//Download sources will not work if mavenLocal() is uncomment
// mavenLocal()
maven { url "http://artifactory.hhstechgroup.com:8081/artifactory/local" }
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
maven { url "https://repo.spring.io/release" }
}
dependencyManagement {
imports {
mavenBom "org.springframework.boot:spring-boot-dependencies:${springBootVersion}"
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}
}
subprojects {
sourceCompatibility = 10
targetCompatibility = 10
group parent.group
version parent.version
dependencies {
compileOnly "org.projectlombok:lombok:${lombok_version}"
testCompile "de.flapdoodle.embed:de.flapdoodle.embed.mongo:${embeded_mongo_version}"
testCompile "org.springframework.boot:spring-boot-starter-test"
testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_version}"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_version}"
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = "sources"
from sourceSets.main.allSource
}
jacoco {
toolVersion = "0.8.2"
}
sonarqube {
properties {
property "sonar.java.source", "10"
}
}
test {
useJUnitPlatform()
testLogging {
events 'FAILED', 'SKIPPED'
}
jvmArgs '--add-opens=java.base/java.lang=ALL-UNNAMED', '--illegal-access=warn'
systemProperty 'spring.data.mongodb.port', '0'
}
artifacts {
archives sourcesJar
}
publishing {
publications {
maven(MavenPublication) {
from components.java
artifact (sourcesJar) {
classifier = "sources"
}
}
}
}
artifactory {
contextUrl = "http://artifactory.hhstechgroup.com:8081/artifactory"
publish {
repository {
repoKey = version.matches("(.*)SNAPSHOT") ? "libs-snapshot-local" : "libs-release-local"
username = "${System.getenv('ARTIFACTORY_USR')}"
password = "${System.getenv('ARTIFACTORY_PSW')}"
maven = true
}
defaults {
publications("maven")
}
}
}
artifactoryPublish.dependsOn build
docker {
baseImage 'registry.hhstechgroup.com/general/jre-alpine'
maintainer 'Dev Ops "DevOps@HHSTechGroup.com'
}
}
// Projects with Spring Boot app
configure([project(':audit'), project(':raccoon'), project(':screening-service'),
project(':provider-management'), project(':applications'),
project(':fabric-client'), project(':initial-data'), project(':reporting'), project(':sisense-gateway')]) {
apply plugin: "org.springframework.boot"
dependencies {
runtime("io.micrometer:micrometer-registry-prometheus")
compile("net.logstash.logback:logstash-logback-encoder:${logstash_logback_encoder_version}")
}
jar {
enabled = true
}
bootJar {
classifier = 'boot'
}
task buildDocker(type: Docker, dependsOn: build) {
push = project.hasProperty("push")
tagVersion = !version.matches("(.*)SNAPSHOT") ? project.getVersion() : System.getenv('BRANCH_NAME') ?: "develop"
tag = 'registry.hhstechgroup.com/provider-management/' + project.getName()
stageDir = new File(project.buildDir, "libs")
}
}
release {
dependsOn ':fabric-client:buildDocker', ':initial-data:buildDocker',
':applications:buildDocker',':audit:buildDocker',':raccoon:buildDocker',':screening-service:buildDocker',
':provider-management:buildDocker',':reporting:buildDocker', ':sisense-gateway:buildDocker', project.hasProperty("push") ? artifactoryPublish : build
push = project.hasProperty("push")
tagPrefix = ""
}
task jacocoRootReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) {
dependsOn = subprojects.test
additionalSourceDirs = files(subprojects.sourceSets.main.allSource.srcDirs)
sourceDirectories = files(subprojects.sourceSets.main.allSource.srcDirs)
classDirectories = files(subprojects.sourceSets.main.output)
executionData = files(subprojects.jacocoTestReport.executionData)
reports {
html.enabled = true
xml.enabled = true
csv.enabled = false
}
onlyIf = {
true
}
doFirst {
executionData = files(executionData.findAll {
it.exists()
})
}
}
apply from: "gradle/tasks/logging.gradle"
apply from: "gradle/tasks/utils.gradle"
The version of OpenTracing SpringCloud that you are using isn't compatible with the version of Spring Boot that you are using. It looks like you need 0.3.5 or later to pick up this commit where they stopped sub-classing MongoAutoConfiguration
.
켜짐 2020년 1월 8일 에서 오후 11:41:08, Wilkinson Andy (notifications@github.com) 작성됨:
Closed #19575 https://github.com/spring-projects/spring-boot/issues/19575.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/spring-projects/spring-boot/issues/19575?email_source=notifications&email_token=ACJYJV62AEBQ7FEG2FSLGL3Q4XQYJA5CNFSM4KEJGX5KYY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOV244F6Y#event-2931409659, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACJYJV4JSDVCHEW3OEJAH3DQ4XQYJANCNFSM4KEJGX5A .
The version of OpenTracing SpringCloud that you are using isn't compatible with the version of Spring Boot that you are using. It looks like you need 0.3.5 or later to pick up this commit where they stopped sub-classing
MongoAutoConfiguration
. io.opentracing.contrib:opentracing-spring-jaeger-cloud-starter:1.0.1
am using io.opentracing.contrib:opentracing-spring-jaeger-cloud-starter:1.0.1 Should i need to update this
@sumit-gurav You'll need to check with that project. I'm not sure how the various starters relate to each other and we don't provide any dependency management for the project ourselves.