Guest User

Untitled

a guest
May 30th, 2024
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.71 KB | None | 0 0
  1.  
  2. plugins {
  3. id 'org.springframework.boot' version '2.2.6.RELEASE'
  4. id 'io.spring.dependency-management' version '1.0.9.RELEASE'
  5. id 'java'
  6. }
  7.  
  8. group 'lt.mycompany'
  9. version '1.0'
  10.  
  11. project.ext {
  12. // jaxbTargetDir = file("build/generated/java")
  13. jaxbTargetDir = file("$buildDir/generated/sources/main/java")
  14. }
  15.  
  16. configurations {
  17. xsd2java
  18. }
  19.  
  20. configurations {
  21. compileOnly {
  22. extendsFrom annotationProcessor
  23. }
  24. }
  25.  
  26. repositories {
  27. mavenCentral()
  28. }
  29.  
  30. dependencies {
  31. xsd2java "com.sun.xml.bind:jaxb-xjc:2.2.6"
  32. xsd2java "com.sun.xml.bind:jaxb-impl:2.2.6"
  33. xsd2java "jakarta.xml.bind:jakarta.xml.bind-api:2.3.2"
  34. xsd2java "org.glassfish.jaxb:jaxb-runtime:2.3.2"
  35.  
  36. implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.9.8'
  37.  
  38. implementation 'org.springframework.boot:spring-boot-starter-web'
  39. implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
  40. implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
  41. implementation 'org.springframework.boot:spring-boot-starter-security'
  42.  
  43. implementation 'org.springframework.security:spring-security-test'
  44. implementation 'org.springframework.boot:spring-boot-devtools'
  45.  
  46. implementation 'io.springfox:springfox-swagger2:2.9.2' //:
  47. implementation 'io.springfox:springfox-swagger-ui:2.9.2' //:2.9.2
  48.  
  49. implementation 'commons-codec:commons-codec:1.14' //:2.9.2
  50. implementation 'org.apache.httpcomponents:httpclient:4.3.6'
  51.  
  52. compileOnly 'org.projectlombok:lombok'
  53. runtimeOnly 'org.postgresql:postgresql'
  54. annotationProcessor 'org.projectlombok:lombok'
  55. testImplementation('org.springframework.boot:spring-boot-starter-test') {
  56. exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
  57. }
  58. testCompile group: 'junit', name: 'junit', version: '4.12'
  59.  
  60. }
  61.  
  62. test {
  63. useJUnitPlatform()
  64. }
  65.  
  66.  
  67. sourceSets {
  68. main {
  69. java {
  70. srcDirs jaxbTargetDir
  71. }
  72. }
  73. }
  74. task xsd2java() {
  75.  
  76. doLast {
  77. jaxbTargetDir.mkdirs()
  78.  
  79. ant.taskdef(name: 'xjc', classname: 'com.sun.tools.xjc.XJCTask', classpath: configurations.xsd2java.asPath)
  80. ant.jaxbTargetDir = jaxbTargetDir
  81.  
  82.  
  83. ant.xjc(
  84. destdir: '${jaxbTargetDir}',
  85. package: 'lt.mycompany.iso20022.camt.v053s02',
  86. schema: 'src/main/resources/camt.053.001.02.xsd'
  87. )
  88.  
  89. ant.xjc(
  90. destdir: '${jaxbTargetDir}',
  91. package: 'lt.mycompany.iso20022.camt.v052s02',
  92. schema: 'src/main/resources/camt.052.001.02.xsd'
  93. )
  94.  
  95.  
  96. }
  97. }
  98. compileJava.dependsOn xsd2java
  99.  
  100. bootJar {
  101. launchScript()
  102. }
  103.  
Advertisement
Add Comment
Please, Sign In to add comment