0% found this document useful (0 votes)
127 views2 pages

Service Build

This document contains a Gradle build file that configures plugins, dependencies, and tasks for building a Spring Boot application. It defines a bootJar task to build a runnable JAR file, configures source sets and dependencies, and comments out tasks for generating code from XML schemas and unpacking contract JAR files. It applies the Spring Boot plugin and configures properties and dependencies needed to run the application.

Uploaded by

Vamshi KRishna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
127 views2 pages

Service Build

This document contains a Gradle build file that configures plugins, dependencies, and tasks for building a Spring Boot application. It defines a bootJar task to build a runnable JAR file, configures source sets and dependencies, and comments out tasks for generating code from XML schemas and unpacking contract JAR files. It applies the Spring Boot plugin and configures properties and dependencies needed to run the application.

Uploaded by

Vamshi KRishna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

apply plugin: 'org.springframework.

boot'

// Build a non-boot jar for consumption by the AC tests submodule


jar {
enabled = true
}

// Build the Jar to be run


bootJar {
enabled = true
destinationDir = new File(rootProject.buildDir, 'libs')
}

/*configurations {
contractConfig
jaxb
}*/

// Share the system properties with the bootRun task so we can pass in the spring
active profile
bootRun.systemProperties['spring.profiles.active'] =
System.properties['spring.profiles.active']

ext {

/* jaxbSettings = [[
jaxbTargetPackage :
'com.swacorp.opssuite.ods.contract',
jaxbXjbFile : 'ods-retriever-query',
contractJar : 'com.swacorp.opssuite:os-ods-
contracts:5.5.2-194',
xsdFiles : ['OpsSchedBusinessEvents']
],[
//jaxbTargetPackage :
'com.swacorp.opssuite.swim.tfms.contract',
//jaxbXjbFile : 'TFMData',
contractJar :
'com.swacorp.opssuite.contracts:swim-tfms-adapter-contract:1.0.0',
xsdFiles : ['TFMData_Service']
]]*/

jaxbTargetDir = file("$buildDir/generated-sources")

sourceSets {
main {
java.srcDirs jaxbTargetDir
}
}

dependencies {
//jaxb 'com.sun.xml.bind:jaxb-xjc:2.2.4-1'
implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-log4j2'
implementation 'org.springframework.boot:spring-boot-starter-web'
//implementation 'com.swacorp.opssuite.common:common-log4j2:5.0.+'
implementation 'org.springframework:spring-jms'
implementation 'org.springframework:spring-web'
implementation 'com.amazonaws:aws-java-sdk-sqs'
implementation 'com.amazonaws:amazon-sqs-java-messaging-lib:1.0.5'
implementation 'com.sun.xml.bind:jaxb-impl:2.2.3-1'
implementation "com.amazonaws:aws-java-sdk-dynamodb:
$awsJavaSDKDynamoDBVersion"
implementation group: 'com.google.guava', name: 'guava', version: '22.0'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-joda:2.9.2'

runtimeOnly("io.micrometer:micrometer-registry-prometheus")

compile 'com.amazonaws:aws-java-sdk-s3'
compile "javax.jms:javax.jms-api:${javaxJmsVersion}"
compile "com.amazonaws:amazon-sqs-java-extended-client-lib:1.0.1"
compile 'org.springframework:spring-oxm'
compile 'org.springframework.ws:spring-xml'
compile 'org.apache.ws.xmlschema:xmlschema-core:2.1.0'
//contractConfig 'com.swacorp.opssuite:os-ods-contracts:5.5.2-194'
compile group: 'org.springframework.integration', name: 'spring-integration-
aws', version: '2.2.0.RELEASE'
compile 'com.amazonaws:aws-java-sdk-kinesis'
compile 'com.google.code.gson:gson'

// providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'

compile group: 'com.amazonaws', name: 'aws-java-sdk-secretsmanager', version:


'1.11.550'

testCompile "org.mockito:mockito-core:${mockitoVersion}"
testImplementation 'org.springframework.boot:spring-boot-starter-test'
runtimeOnly("org.springframework.boot:spring-boot-starter-actuator")
}

/*task xsdGen {
outputs.dir jaxbTargetDir

doLast {
jaxbTargetDir.mkdirs()
ant.taskdef(name: 'xjc', classname: 'com.sun.tools.xjc.XJCTask', classpath:
configurations.jaxb.asPath)
}
}

compileJava.dependsOn xsdGen
compileTestJava.dependsOn xsdGen

task unpackContracts(type: Copy) {


from configurations.contractConfig.collect { zipTree(it) }
into "${buildDir}/resources/main/xsd"
}

compileJava.dependsOn unpackContracts
compileTestJava.dependsOn unpackContracts*/

You might also like