Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- plugins {
- id 'org.springframework.boot' version '2.2.6.RELEASE'
- id 'io.spring.dependency-management' version '1.0.9.RELEASE'
- id 'java'
- }
- group 'lt.mycompany'
- version '1.0'
- project.ext {
- // jaxbTargetDir = file("build/generated/java")
- jaxbTargetDir = file("$buildDir/generated/sources/main/java")
- }
- configurations {
- xsd2java
- }
- configurations {
- compileOnly {
- extendsFrom annotationProcessor
- }
- }
- repositories {
- mavenCentral()
- }
- dependencies {
- xsd2java "com.sun.xml.bind:jaxb-xjc:2.2.6"
- xsd2java "com.sun.xml.bind:jaxb-impl:2.2.6"
- xsd2java "jakarta.xml.bind:jakarta.xml.bind-api:2.3.2"
- xsd2java "org.glassfish.jaxb:jaxb-runtime:2.3.2"
- implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.9.8'
- implementation 'org.springframework.boot:spring-boot-starter-web'
- implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
- implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
- implementation 'org.springframework.boot:spring-boot-starter-security'
- implementation 'org.springframework.security:spring-security-test'
- implementation 'org.springframework.boot:spring-boot-devtools'
- implementation 'io.springfox:springfox-swagger2:2.9.2' //:
- implementation 'io.springfox:springfox-swagger-ui:2.9.2' //:2.9.2
- implementation 'commons-codec:commons-codec:1.14' //:2.9.2
- implementation 'org.apache.httpcomponents:httpclient:4.3.6'
- compileOnly 'org.projectlombok:lombok'
- runtimeOnly 'org.postgresql:postgresql'
- annotationProcessor 'org.projectlombok:lombok'
- testImplementation('org.springframework.boot:spring-boot-starter-test') {
- exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
- }
- testCompile group: 'junit', name: 'junit', version: '4.12'
- }
- test {
- useJUnitPlatform()
- }
- sourceSets {
- main {
- java {
- srcDirs jaxbTargetDir
- }
- }
- }
- task xsd2java() {
- doLast {
- jaxbTargetDir.mkdirs()
- ant.taskdef(name: 'xjc', classname: 'com.sun.tools.xjc.XJCTask', classpath: configurations.xsd2java.asPath)
- ant.jaxbTargetDir = jaxbTargetDir
- ant.xjc(
- destdir: '${jaxbTargetDir}',
- package: 'lt.mycompany.iso20022.camt.v053s02',
- schema: 'src/main/resources/camt.053.001.02.xsd'
- )
- ant.xjc(
- destdir: '${jaxbTargetDir}',
- package: 'lt.mycompany.iso20022.camt.v052s02',
- schema: 'src/main/resources/camt.052.001.02.xsd'
- )
- }
- }
- compileJava.dependsOn xsd2java
- bootJar {
- launchScript()
- }
Advertisement
Add Comment
Please, Sign In to add comment