build.gradle 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  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. force = true
  72. }
  73. compile 'org.apache.logging.log4j:log4j-core:2.17.2'
  74. compile 'org.apache.logging.log4j:log4j-web:2.17.2'
  75. compile 'org.apache.logging.log4j:log4j-1.2-api:2.17.2'
  76. compile 'org.apache.logging.log4j:log4j-slf4j-impl:2.17.2'
  77. compile 'com.sun.xml.bind:jaxb-impl:3.0.2'
  78. compile ('org.apache.commons:commons-lang3:3.12.0'){
  79. force = true
  80. }
  81. // https://mvnrepository.com/artifact/ognl/ognl
  82. compile 'ognl:ognl:3.1.29'
  83. // https://mvnrepository.com/artifact/org.freemarker/freemarker
  84. compile ('org.freemarker:freemarker:2.3.23'){
  85. force = true
  86. }
  87. compileOnly "javax.servlet:javax.servlet-api:3.1.0"
  88. compileOnly "javax.servlet.jsp:jsp-api:2.2.1-b03"
  89. }
  90. configurations {
  91. compile.exclude module: 'servlet-api'
  92. compile.exclude module: 'log4j'
  93. compile.exclude module: 'slf4j-log4j12'
  94. compile.exclude module: 'commons-io'
  95. }
  96. configurations.compile.resolutionStrategy{
  97. failOnVersionConflict()
  98. force 'org.freemarker:freemarker:2.3.31'
  99. force 'ognl:ognl:3.1.29'
  100. }
  101. }
  102. project(':web-cluster'){
  103. apply plugin: 'java'
  104. apply plugin: 'idea'
  105. apply plugin: 'war'
  106. dependencies {
  107. compile (
  108. project(':common')
  109. )
  110. compile 'org.apache.struts:struts2-core:2.5.30'
  111. compile 'org.apache.struts:struts2-convention-plugin:2.5.30'
  112. compile('org.apache.struts:struts2-spring-plugin:2.5.30'){
  113. exclude module: 'spring-context'
  114. }
  115. compile 'org.apache.logging.log4j:log4j-api:2.17.2'
  116. compile 'org.apache.logging.log4j:log4j-core:2.17.2'
  117. compile 'org.apache.logging.log4j:log4j-web:2.17.2'
  118. compile 'org.apache.logging.log4j:log4j-1.2-api:2.17.2'
  119. compile 'org.apache.logging.log4j:log4j-slf4j-impl:2.17.2'
  120. compile 'com.sun.xml.bind:jaxb-impl:3.0.2'
  121. compile ('org.apache.commons:commons-lang3:3.12.0'){
  122. force = true
  123. }
  124. // https://mvnrepository.com/artifact/ognl/ognl
  125. compile 'ognl:ognl:3.1.29'
  126. // https://mvnrepository.com/artifact/org.freemarker/freemarker
  127. compile ('org.freemarker:freemarker:2.3.23'){
  128. force = true
  129. }
  130. compileOnly "javax.servlet:javax.servlet-api:3.1.0"
  131. providedCompile "javax.servlet.jsp:jsp-api:2.2.1-b03"
  132. }
  133. configurations {
  134. compile.exclude module: 'log4j'
  135. compile.exclude module: 'slf4j-log4j12'
  136. }
  137. war {
  138. archiveName 'BH_CLUSTER.war'
  139. }
  140. }
  141. project(':web-clis'){
  142. apply plugin: 'java'
  143. apply plugin: 'idea'
  144. apply plugin: 'war'
  145. dependencies {
  146. compile (
  147. project(':common')
  148. )
  149. compile 'org.apache.struts:struts2-core:2.5.30'
  150. compile 'org.apache.struts:struts2-convention-plugin:2.5.30'
  151. compile('org.apache.struts:struts2-spring-plugin:2.5.30'){
  152. exclude module: 'spring-context'
  153. }
  154. compile 'org.apache.logging.log4j:log4j-api:2.17.2'
  155. compile 'org.apache.logging.log4j:log4j-core:2.17.2'
  156. compile 'org.apache.logging.log4j:log4j-web:2.17.2'
  157. compile 'org.apache.logging.log4j:log4j-1.2-api:2.17.2'
  158. compile 'org.apache.logging.log4j:log4j-slf4j-impl:2.17.2'
  159. compile 'com.sun.xml.bind:jaxb-impl:3.0.2'
  160. compile ('org.apache.commons:commons-lang3:3.12.0'){
  161. force = true
  162. }
  163. // https://mvnrepository.com/artifact/ognl/ognl
  164. compile 'ognl:ognl:3.1.29'
  165. // https://mvnrepository.com/artifact/org.freemarker/freemarker
  166. compile ('org.freemarker:freemarker:2.3.23'){
  167. force = true
  168. }
  169. compileOnly "javax.servlet:javax.servlet-api:3.1.0"
  170. providedCompile "javax.servlet.jsp:jsp-api:2.2.1-b03"
  171. }
  172. configurations {
  173. compile.exclude module: 'log4j'
  174. compile.exclude module: 'slf4j-log4j12'
  175. }
  176. war {
  177. archiveName 'BH_CLIS.war'
  178. }
  179. }
  180. project(':web-edi'){
  181. apply plugin: 'java'
  182. apply plugin: 'idea'
  183. apply plugin: 'war'
  184. dependencies {
  185. compile (
  186. project(':common')
  187. )
  188. compile 'org.apache.struts:struts2-core:2.5.30'
  189. compile 'org.apache.struts:struts2-convention-plugin:2.5.30'
  190. compile('org.apache.struts:struts2-spring-plugin:2.5.30'){
  191. exclude module: 'spring-context'
  192. }
  193. compile 'org.apache.logging.log4j:log4j-api:2.17.2'
  194. compile 'org.apache.logging.log4j:log4j-core:2.17.2'
  195. compile 'org.apache.logging.log4j:log4j-web:2.17.2'
  196. compile 'org.apache.logging.log4j:log4j-1.2-api:2.17.2'
  197. compile 'org.apache.logging.log4j:log4j-slf4j-impl:2.17.2'
  198. compile 'com.sun.xml.bind:jaxb-impl:3.0.2'
  199. compile ('org.apache.commons:commons-lang3:3.12.0'){
  200. force = true
  201. }
  202. // https://mvnrepository.com/artifact/ognl/ognl
  203. compile 'ognl:ognl:3.1.29'
  204. // https://mvnrepository.com/artifact/org.freemarker/freemarker
  205. compile ('org.freemarker:freemarker:2.3.23'){
  206. force = true
  207. }
  208. compileOnly "javax.servlet:javax.servlet-api:3.1.0"
  209. providedCompile "javax.servlet.jsp:jsp-api:2.2.1-b03"
  210. }
  211. configurations {
  212. compile.exclude module: 'log4j'
  213. compile.exclude module: 'slf4j-log4j12'
  214. }
  215. war {
  216. archiveName 'BH_EDI.war'
  217. }
  218. }