build.gradle 7.5 KB

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