Advertisement
vrvarma

discovery-web/build.gradle

Apr 2nd, 2014
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.31 KB | None | 0 0
  1. eclipse { project { name = 'discovery-container-discovery-web' } }
  2. apply plugin: 'jaxb'
  3. apply plugin: 'war'
  4.  
  5. task wcopy(type: Copy) {
  6. from (file(project(":src:modules:ws-common").projectDir.absolutePath+"/wsdl"))
  7. into "$projectDir/wsdl"
  8. include('*.xsd')
  9. }
  10.  
  11.  
  12. sourceSets {
  13. test {
  14. resources {
  15. srcDir 'j2ee'
  16. srcDir 'wsdl'
  17. }
  18. }
  19. jaxbGen{
  20. jaxb{
  21. srcDir 'wsdl'
  22. include 'idis-discovery.xsd'
  23. include '*.xjb'
  24. exclude '*.wsdl'
  25. }
  26. }
  27. }
  28.  
  29. generateJaxbGenSchemaSource.dependsOn wcopy
  30.  
  31. jar{
  32. archiveName='discovery-web.jar'
  33. enabled=true
  34. }
  35.  
  36. dependencies {
  37.  
  38. compile project(":src:modules:ws-common")
  39.  
  40. providedCompile project(':src:common:common')
  41. providedCompile project(":src:common:container:messaging")
  42. providedCompile project(":src:common:container:orm:orm-cramer")
  43. providedCompile project(":src:common:container:orm:orm-idis")
  44.  
  45.  
  46. providedCompile project(":src:modules:discovery:schema")
  47. providedCompile project(":src:modules:discovery:container:common")
  48. providedCompile project(":src:modules:discovery:container:sonis")
  49. providedCompile project(":src:modules:discovery:container:spring")
  50.  
  51. jaxb libraries.xjc_jaxb
  52.  
  53. testCompile project(path: ':src:common:container:unittest', configuration: 'testApi')
  54. testCompile project(path: ':src:common:container:messaging', configuration: 'testApi')
  55. testCompile project(path: ':src:modules:discovery:container:spring', configuration: 'testApi')
  56.  
  57. testCompile project(path: ':src:common:container:orm:orm-cramer', configuration: 'testApi')
  58. testCompile project(path: ':src:common:container:orm:orm-idis', configuration: 'testApi')
  59.  
  60. testCompile libraries.commons_pool
  61. testCompile libraries.activemq_all
  62. testCompile libraries.activemq_pool
  63. testCompile 'org.apache.xbean:xbean-spring:3.11'
  64. testRuntime libraries.aspectjrt
  65. testRuntime libraries.aspectjweaver
  66.  
  67. providedCompile thirdparty_libraries.oracle6
  68. providedCompile thirdparty_libraries.weblogic
  69.  
  70.  
  71. compile fileTree(dir: "$libsDir", include: '*.jar',exclude:'*tests.jar')
  72. }
  73.  
  74. task jaxbJar(type:Jar) {
  75.  
  76. archiveName = 'discovery-web-xmlgen.jar'
  77. from (project.sourceSets.jaxbGen.output){
  78. include('**/*.class')
  79. exclude ('**/idis/intf/common/**')
  80. }
  81.  
  82. into('wsdl'){
  83. from ('wsdl'){
  84. include('*.xsd')
  85. include('*.wsdl')
  86. }
  87. }
  88. }
  89. test.doFirst() {
  90. sourceSets.test.runtimeClasspath = project.sourceSets.test.output+project(':src:modules:discovery:container:common').sourceSets.test.runtimeClasspath +
  91. project(':src:common:container:unittest').sourceSets.test.runtimeClasspath +
  92. sourceSets.test.runtimeClasspath
  93.  
  94. sourceSets.test.runtimeClasspath.each { println it }
  95. }
  96. war{
  97. dependsOn jar
  98. archiveName='discovery-web.war'
  99. classpath = configurations.runtime-configurations.providedCompile
  100. webInf {
  101. into('classes') {
  102. from (sourceSets.main.output){
  103.  
  104. exclude 'log4j.properties'
  105. exclude '**/*.class'
  106. exclude '*.xml'
  107. }
  108. }
  109. from 'j2ee/WEB-INF'
  110. includeEmptyDirs=false
  111. }
  112. }
  113.  
  114. configurations { schemaGen }
  115.  
  116. artifacts { schemaGen jaxbJar }
  117.  
  118. compileJava.dependsOn jaxbJar
  119. assemble.dependsOn war
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement