build.gradle 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. apply plugin: 'java'
  2. apply plugin: 'idea'
  3. idea {
  4. module {
  5. inheritOutputDirs = true
  6. }
  7. }
  8. ext {
  9. env = System.getProperty("env") ?:"dev"
  10. split = ";"
  11. switch (System.getProperty("os.name")) {
  12. case "Linux":
  13. split = ":"
  14. break
  15. case "Mac OS X":
  16. split = ":"
  17. break
  18. default:
  19. split = ";"
  20. }
  21. println "使用环境配置为:$env,分隔符为:$split"
  22. project_jdk = '1.8'
  23. project_web = '3.0'
  24. }
  25. subprojects { subproj ->
  26. apply plugin: 'java'
  27. sourceSets {
  28. main {
  29. resources {
  30. srcDirs = ["src/main/resources", "src/main/resources-$env"]
  31. }
  32. }
  33. }
  34. [compileJava,compileTestJava]*.options*.encoding = 'UTF-8'
  35. [compileJava,compileTestJava]*.options*.debug = 'UTF-8'
  36. apply plugin: 'idea'
  37. version = '1.0'
  38. // sourceCompatibility = JavaVersion.VERSION_1_7
  39. // targetCompatibility = JavaVersion.VERSION_1_7
  40. repositories {
  41. maven {url "http://maven.aliyun.com/nexus/content/groups/public/"}
  42. // maven{ url 'http://c-wms.iask.in:7777/nexus/content/groups/public/'}
  43. }
  44. compileJava {
  45. options.compilerArgs << "-g:source,lines,vars"
  46. // options.bootstrapClasspath = "${System.properties['java.home']}/lib/rt.jar$split${System.properties['java.home']}/lib/jce.jar"
  47. }
  48. }
  49. version = '1.0'
  50. idea {
  51. module {
  52. // idea Module 的忽略列表加入下面这些目录
  53. excludeDirs += [file('bin'),file('out'), file('node_modules'), file('tools'), file('.gradle')]
  54. }
  55. }
  56. project(':common'){
  57. apply plugin: 'java'
  58. apply plugin: 'idea'
  59. // apply plugin: 'war'
  60. dependencies {
  61. compile fileTree(dir: '../lib', include: '*.jar')
  62. compile 'avalon-framework:avalon-framework:4.1.5-RC2'
  63. compile 'org.apache.struts:struts2-core:2.5.30'
  64. compile 'org.apache.struts:struts2-convention-plugin:2.5.30'
  65. compile('org.apache.struts:struts2-spring-plugin:2.5.30'){
  66. exclude module: 'spring-context'
  67. exclude module: 'spring-core'
  68. exclude module: 'spring-web'
  69. }
  70. compile 'org.apache.logging.log4j:log4j-api:2.17.2'
  71. compile 'org.apache.logging.log4j:log4j-core:2.17.2'
  72. compile 'org.apache.logging.log4j:log4j-web:2.17.2'
  73. compile 'org.apache.logging.log4j:log4j-1.2-api:2.17.2'
  74. compile 'org.apache.logging.log4j:log4j-slf4j-impl:2.17.2'
  75. compile 'com.sun.xml.bind:jaxb-impl:3.0.2'
  76. compile 'org.apache.commons:commons-lang3:3.12.0'
  77. // https://mvnrepository.com/artifact/ognl/ognl
  78. compile 'ognl:ognl:3.1.12'
  79. // https://mvnrepository.com/artifact/org.freemarker/freemarker
  80. compile 'org.freemarker:freemarker:2.3.23'
  81. compileOnly "javax.servlet:javax.servlet-api:3.1.0"
  82. compileOnly "javax.servlet.jsp:jsp-api:2.2.1-b03"
  83. }
  84. configurations {
  85. compile.exclude module: 'servlet-api'
  86. compile.exclude module: 'log4j'
  87. compile.exclude module: 'slf4j-log4j12'
  88. }
  89. configurations.compile.resolutionStrategy{
  90. failOnVersionConflict()
  91. }
  92. }
  93. project(':web-cluster'){
  94. apply plugin: 'java'
  95. apply plugin: 'idea'
  96. apply plugin: 'war'
  97. dependencies {
  98. compile (
  99. project(':common')
  100. )
  101. compile 'org.apache.struts:struts2-core:2.5.30'
  102. compile 'org.apache.struts:struts2-convention-plugin:2.5.30'
  103. compile('org.apache.struts:struts2-spring-plugin:2.5.30'){
  104. exclude module: 'spring-context'
  105. }
  106. compile 'org.apache.logging.log4j:log4j-api:2.17.2'
  107. compile 'org.apache.logging.log4j:log4j-core:2.17.2'
  108. compile 'org.apache.logging.log4j:log4j-web:2.17.2'
  109. compile 'org.apache.logging.log4j:log4j-1.2-api:2.17.2'
  110. compile 'org.apache.logging.log4j:log4j-slf4j-impl:2.17.2'
  111. compile 'com.sun.xml.bind:jaxb-impl:3.0.2'
  112. compile 'org.apache.commons:commons-lang3:3.12.0'
  113. // https://mvnrepository.com/artifact/ognl/ognl
  114. compile 'ognl:ognl:3.1.12'
  115. // https://mvnrepository.com/artifact/org.freemarker/freemarker
  116. compile 'org.freemarker:freemarker:2.3.23'
  117. compileOnly "javax.servlet:javax.servlet-api:3.1.0"
  118. providedCompile "javax.servlet.jsp:jsp-api:2.2.1-b03"
  119. }
  120. configurations {
  121. compile.exclude module: 'log4j'
  122. compile.exclude module: 'slf4j-log4j12'
  123. }
  124. war {
  125. archiveName 'BH_CLUSTER.war'
  126. }
  127. }
  128. project(':web-clis'){
  129. apply plugin: 'java'
  130. apply plugin: 'idea'
  131. apply plugin: 'war'
  132. dependencies {
  133. compile (
  134. project(':common')
  135. )
  136. compile 'org.apache.struts:struts2-core:2.5.30'
  137. compile 'org.apache.struts:struts2-convention-plugin:2.5.30'
  138. compile('org.apache.struts:struts2-spring-plugin:2.5.30'){
  139. exclude module: 'spring-context'
  140. }
  141. compile 'org.apache.logging.log4j:log4j-api:2.17.2'
  142. compile 'org.apache.logging.log4j:log4j-core:2.17.2'
  143. compile 'org.apache.logging.log4j:log4j-web:2.17.2'
  144. compile 'org.apache.logging.log4j:log4j-1.2-api:2.17.2'
  145. compile 'org.apache.logging.log4j:log4j-slf4j-impl:2.17.2'
  146. compile 'com.sun.xml.bind:jaxb-impl:3.0.2'
  147. compile 'org.apache.commons:commons-lang3:3.12.0'
  148. // https://mvnrepository.com/artifact/ognl/ognl
  149. compile 'ognl:ognl:3.1.12'
  150. // https://mvnrepository.com/artifact/org.freemarker/freemarker
  151. compile 'org.freemarker:freemarker:2.3.23'
  152. compileOnly "javax.servlet:javax.servlet-api:3.1.0"
  153. providedCompile "javax.servlet.jsp:jsp-api:2.2.1-b03"
  154. }
  155. configurations {
  156. compile.exclude module: 'log4j'
  157. compile.exclude module: 'slf4j-log4j12'
  158. }
  159. war {
  160. archiveName 'BH_CLIS.war'
  161. }
  162. }
  163. project(':web-edi'){
  164. apply plugin: 'java'
  165. apply plugin: 'idea'
  166. apply plugin: 'war'
  167. dependencies {
  168. compile (
  169. project(':common')
  170. )
  171. compile 'org.apache.struts:struts2-core:2.5.30'
  172. compile 'org.apache.struts:struts2-convention-plugin:2.5.30'
  173. compile('org.apache.struts:struts2-spring-plugin:2.5.30'){
  174. exclude module: 'spring-context'
  175. }
  176. compile 'org.apache.logging.log4j:log4j-api:2.17.2'
  177. compile 'org.apache.logging.log4j:log4j-core:2.17.2'
  178. compile 'org.apache.logging.log4j:log4j-web:2.17.2'
  179. compile 'org.apache.logging.log4j:log4j-1.2-api:2.17.2'
  180. compile 'org.apache.logging.log4j:log4j-slf4j-impl:2.17.2'
  181. compile 'com.sun.xml.bind:jaxb-impl:3.0.2'
  182. compile 'org.apache.commons:commons-lang3:3.12.0'
  183. // https://mvnrepository.com/artifact/ognl/ognl
  184. compile 'ognl:ognl:3.1.12'
  185. // https://mvnrepository.com/artifact/org.freemarker/freemarker
  186. compile 'org.freemarker:freemarker:2.3.23'
  187. compileOnly "javax.servlet:javax.servlet-api:3.1.0"
  188. providedCompile "javax.servlet.jsp:jsp-api:2.2.1-b03"
  189. }
  190. configurations {
  191. compile.exclude module: 'log4j'
  192. compile.exclude module: 'slf4j-log4j12'
  193. }
  194. war {
  195. archiveName 'BH_EDI.war'
  196. }
  197. }