build.gradle 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  1. /*
  2. * This build file was auto generated by running the Gradle 'init' task
  3. */
  4. defaultTasks "clean", "build"
  5. ext {
  6. jackson2Version = "2.9.8"
  7. log4jVersion = "2.12.0"
  8. springVersion = "5.1.8.RELEASE"
  9. springBootVersion = "2.1.6.RELEASE"
  10. springSecurityVersion= "5.1.5.RELEASE"
  11. hibernateVersion = "5.4.2.Final"
  12. slf4jVersion = "1.7.26"
  13. jacksonVersion = "2.9.9"
  14. }
  15. configurations.all {
  16. transitive = false// 为本依赖关闭依赖传递特性
  17. // 所有需要忽略的包定义在此
  18. //all*.exclude group: 'commons-logging'
  19. //exclude group: 'org.slf4j', module: 'slf4j-api'
  20. //compile.exclude module: 'commons'
  21. }
  22. // Apply the java plugin to add support for Java
  23. //apply plugin: 'java'
  24. allprojects {
  25. apply plugin: "java"
  26. apply plugin: "eclipse"
  27. //apply plugin: "pmd"
  28. //apply plugin: "findbugs"
  29. //apply plugin: "jdepend"
  30. sourceCompatibility = 1.8
  31. targetCompatibility = 1.8
  32. compileJava.options.encoding = 'UTF-8'
  33. eclipse {
  34. jdt {
  35. File f = file('.settings/org.eclipse.core.resources.prefs')
  36. f.write('eclipse.preferences.version=1\n')
  37. f.append('encoding/<project>=UTF-8')
  38. }/*
  39. wtp {
  40. facet {
  41. facet name: 'jst.web', type: Facet.FacetType.fixed
  42. facet name: 'wst.jsdt.web', type: Facet.FacetType.fixed
  43. facet name: 'jst.java', type: Facet.FacetType.fixed
  44. facet name: 'jst.web', version: '3.0'
  45. facet name: 'jst.java', version: '1.7'
  46. facet name: 'wst.jsdt.web', version: '1.0'
  47. }
  48. }*/
  49. }
  50. }
  51. buildscript {
  52. repositories {
  53. mavenCentral()
  54. }
  55. dependencies {
  56. // classpath("org.springframework.boot:spring-boot-gradle-plugin:2.1.6.RELEASE")
  57. }
  58. }
  59. // In this section you declare where to find the dependencies of your project
  60. repositories {
  61. // Use 'jcenter' for resolving your dependencies.
  62. // You can declare any Maven/Ivy/file repository here.
  63. mavenCentral()
  64. jcenter()
  65. }
  66. subprojects {
  67. //apply plugin: 'org.springframework.boot'
  68. //apply plugin: 'io.spring.dependency-management'
  69. sourceSets {
  70. main {
  71. java {
  72. srcDir 'src/main/java' // 指定源码目录
  73. }
  74. resources {
  75. srcDir 'src/main/resources' //资源目录
  76. }
  77. }
  78. }
  79. repositories {
  80. mavenLocal()
  81. mavenCentral()
  82. jcenter()
  83. maven { url "https://maven.eveoh.nl/content/repositories/releases" }
  84. maven { url "https://plugins.gradle.org/m2/" }
  85. maven { url "http://repo.spring.io/plugins-release" }
  86. maven { url "https://repo.spring.io/milestone" }
  87. maven { url "https://repo.spring.io/snapshot" }
  88. }
  89. dependencies {
  90. testCompile 'junit:junit:4.11'
  91. compileOnly 'junit:junit:4.11'
  92. testCompile group: 'javax.servlet', name: 'javax.servlet-api', version: '3.0.1'
  93. compileOnly group: 'javax.servlet', name: 'javax.servlet-api', version: '3.0.1'
  94. compileOnly group: 'javax.servlet', name: 'jstl', version: '1.2'
  95. compileOnly group: 'javax.servlet', name: 'jsp-api', version: '2.0'
  96. compile group: 'org.jboss.logging', name: 'jboss-logging', version: '3.4.0.Final'
  97. compile group: 'commons-beanutils', name: 'commons-beanutils', version: '1.9.3'
  98. compile group: 'commons-codec', name: 'commons-codec', version: '1.12'
  99. compile group: 'commons-collections', name: 'commons-collections', version: '3.2.2'
  100. compile group: 'org.apache.commons', name: 'commons-csv', version: '1.7'
  101. compile group: 'org.apache.commons', name: 'commons-dbcp2', version: '2.6.0'
  102. //compile group: 'commons-dbcp', name: 'commons-dbcp', version: '1.4'
  103. compile group: 'commons-dbutils', name: 'commons-dbutils', version: '1.7'
  104. compile group: 'org.apache.commons', name: 'commons-digester3', version: '3.2'
  105. compile group: 'commons-digester', name: 'commons-digester', version: '2.1'
  106. compile group: 'commons-io', name: 'commons-io', version: '2.6'
  107. compile group: 'commons-lang', name: 'commons-lang', version: '2.6'
  108. compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.9'
  109. compile group: 'commons-logging', name: 'commons-logging', version: '1.2'
  110. compile group: 'org.apache.commons', name: 'commons-pool2', version: '2.6.2'
  111. compile group: 'commons-httpclient', name: 'commons-httpclient', version: '3.1'
  112. compile group: 'commons-fileupload', name: 'commons-fileupload', version: '1.4'
  113. compile group: 'org.apache.commons', name: 'commons-email', version: '1.5'
  114. compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.6'
  115. compile group: 'org.apache.httpcomponents', name: 'fluent-hc', version: '4.5.6'
  116. compile group: 'org.apache.httpcomponents', name: 'httpclient-cache', version: '4.5.6'
  117. compile group: 'org.apache.httpcomponents', name: 'httpmime', version: '4.5.6'
  118. compile group: 'org.apache.httpcomponents', name: 'httpcore', version: '4.4.10'
  119. compile group: 'org.apache.velocity', name: 'velocity', version: '1.7'
  120. compile group: 'velocity', name: 'velocity-dep', version: '1.4'
  121. testCompile group: 'org.apache.commons', name: 'not-yet-commons-ssl', version: '0.3.9'
  122. compile group: 'org.apache.logging.log4j', name: 'log4j-1.2-api', version: "${log4jVersion}"
  123. compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: "${log4jVersion}"
  124. compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: "${log4jVersion}"
  125. compile group: 'org.apache.logging.log4j', name: 'log4j-jcl', version: "${log4jVersion}"
  126. compile group: 'org.apache.logging.log4j', name: 'log4j-jul', version: "${log4jVersion}"
  127. compile group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: "${log4jVersion}"
  128. compile group: 'org.apache.logging.log4j', name: 'log4j-web', version: "${log4jVersion}"
  129. compile group: 'org.slf4j', name: 'slf4j-api', version: "${slf4jVersion}"
  130. compile group: 'org.springframework', name: 'spring-webmvc', version: "${springVersion}"
  131. compile group: 'org.springframework', name: 'spring-core', version: "${springVersion}"
  132. compile group: 'org.springframework', name: 'spring-aop', version: "${springVersion}"
  133. compile group: 'org.springframework', name: 'spring-aspects', version: "${springVersion}"
  134. compile group: 'org.springframework', name: 'spring-context', version: "${springVersion}"
  135. compile group: 'org.springframework', name: 'spring-context-index', version: "${springVersion}"
  136. compile group: 'org.springframework', name: 'spring-core', version: "${springVersion}"
  137. compile group: 'org.springframework', name: 'spring-expression', version: "${springVersion}"
  138. compile group: 'org.springframework', name: 'spring-instrument', version: "${springVersion}"
  139. compile group: 'org.springframework', name: 'spring-jcl', version: "${springVersion}"
  140. compile group: 'org.springframework', name: 'spring-jdbc', version: "${springVersion}"
  141. compile group: 'org.springframework', name: 'spring-jms', version: "${springVersion}"
  142. compile group: 'org.springframework', name: 'spring-messaging', version: "${springVersion}"
  143. compile group: 'org.springframework', name: 'spring-orm', version: "${springVersion}"
  144. compile group: 'org.springframework', name: 'spring-oxm', version: "${springVersion}"
  145. compile group: 'org.springframework', name: 'spring-test', version: "${springVersion}"
  146. compile group: 'org.springframework', name: 'spring-tx', version: "${springVersion}"
  147. compile group: 'org.springframework', name: 'spring-web', version: "${springVersion}"
  148. compile group: 'org.springframework', name: 'spring-webflux', version: "${springVersion}"
  149. compile group: 'org.springframework', name: 'spring-websocket', version: "${springVersion}"
  150. compile group: 'org.springframework.security', name: 'spring-security-core', version: "${springSecurityVersion}"
  151. compile group: 'org.springframework.security', name: 'spring-security-web', version: "${springSecurityVersion}"
  152. compile group: 'org.springframework.security', name: 'spring-security-crypto', version: "${springSecurityVersion}"
  153. compile group: 'org.opensaml', name: 'opensaml', version: '2.6.4'
  154. compile group: 'org.opensaml', name: 'openws', version: '1.5.4'
  155. compile group: 'org.opensaml', name: 'xmltooling', version: '1.4.4'
  156. compile group: 'org.javassist', name: 'javassist', version: '3.23.0-GA'
  157. compile group: 'javax.activation', name: 'activation', version: '1.1.1'
  158. compile group: 'com.sun.mail', name: 'javax.mail', version: '1.6.2'
  159. compile group: 'javax.transaction', name: 'jta', version: '1.1'
  160. compile group: 'taglibs', name: 'standard', version: '1.1.2'
  161. compile group: 'javax.servlet.jsp.jstl', name: 'jstl', version: '1.2'
  162. compile group: 'javax.transaction', name: 'javax.transaction-api', version: '1.3'
  163. compile group: 'javax.validation', name: 'validation-api', version: '2.0.1.Final'
  164. compile group: 'org.owasp.esapi', name: 'esapi', version: '2.2.0.0'
  165. compile group: 'org.bouncycastle', name: 'bcpkix-jdk15on', version: '1.60'
  166. compile group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.60'
  167. compile group: 'org.bouncycastle', name: 'bcprov-ext-jdk15on', version: '1.60'
  168. compile group: 'com.google.crypto.tink', name: 'tink', version: '1.2.2'
  169. compile group: 'com.github.penggle', name: 'kaptcha', version: '2.3.2'
  170. compile group: 'com.google.code.gson', name: 'gson', version: '2.8.5'
  171. compile group: 'org.codehaus.jackson', name: 'jackson-all', version: '1.8.5'
  172. compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "${jacksonVersion}"
  173. compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: "${jacksonVersion}"
  174. compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: "${jacksonVersion}"
  175. compile group: 'com.fasterxml', name: 'classmate', version: '1.5.0'
  176. compile group: 'org.reactivestreams', name: 'reactive-streams', version: '1.0.2'
  177. compile group: 'io.projectreactor', name: 'reactor-core', version: '3.2.10.RELEASE'
  178. compile group: 'eu.tekul', name: 'szxcvbn_2.9.2', version: '0.2'
  179. compile group: 'org.quartz-scheduler', name: 'quartz', version: '2.2.3'
  180. compile group: 'redis.clients', name: 'jedis', version: '3.0.1'
  181. compile group: 'org.ehcache', name: 'ehcache', version: '3.5.3'
  182. compile group: 'org.mybatis', name: 'mybatis', version: '3.5.1'
  183. compile group: 'org.mybatis', name: 'mybatis-spring', version: '2.0.1'
  184. compile group: 'mysql', name: 'mysql-connector-java', version: '5.1.47'
  185. compile group: 'com.mchange', name: 'c3p0', version: '0.9.5.4'
  186. compile group: 'com.mchange', name: 'mchange-commons-java', version: '0.2.16'
  187. compile group: 'org.hibernate.validator', name: 'hibernate-validator', version: '6.0.17.Final'
  188. compile group: 'org.hibernate', name: 'hibernate-validator-cdi', version: '6.0.17.Final'
  189. compile group: 'org.hibernate.validator', name: 'hibernate-validator-annotation-processor', version: '6.0.17.Final'
  190. compile group: 'net.jradius', name: 'jradius-core', version: '1.1.5'
  191. compile group: 'net.jradius', name: 'jradius-dictionary', version: '1.1.5'
  192. compile group: 'joda-time', name: 'joda-time', version: '2.10'
  193. compile group: 'org.yaml', name: 'snakeyaml', version: '1.24'
  194. compile group: 'net.sourceforge.nekohtml', name: 'nekohtml', version: '1.9.22'
  195. compile group: 'org.jdom', name: 'jdom', version: '2.0.2'
  196. compile group: 'com.google.zxing', name: 'core', version: '3.4.0'
  197. compile group: 'com.google.guava', name: 'guava', version: '27.1-jre'
  198. compile group: 'ognl', name: 'ognl', version: '3.2.9'
  199. compile group: 'cglib', name: 'cglib', version: '3.2.12'
  200. compile group: 'org.ow2.asm', name: 'asm', version: '7.0'
  201. compile group: 'aopalliance', name: 'aopalliance', version: '1.0'
  202. compile group: 'org.aspectj', name: 'aspectjtools', version: '1.9.4'
  203. compile group: 'dom4j', name: 'dom4j', version: '1.6.1'
  204. compile group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.1'
  205. compile group: 'com.sun.xml.bind', name: 'jaxb-impl', version: '2.3.1'
  206. compile group: 'javax.xml', name: 'jsr173', version: '1.0'
  207. compile group: 'xalan', name: 'serializer', version: '2.7.2'
  208. compile group: 'xalan', name: 'xalan', version: '2.7.2'
  209. compile group: 'xerces', name: 'xercesImpl', version: '2.12.0'
  210. compile group: 'xml-apis', name: 'xml-apis', version: '1.0.b2'
  211. compile group: 'xml-resolver', name: 'xml-resolver', version: '1.2'
  212. compile group: 'org.apache.santuario', name: 'xmlsec', version: '1.5.8'
  213. compile group: 'org.ogce', name: 'xpp3', version: '1.1.6'
  214. compile group: 'com.thoughtworks.xstream', name: 'xstream', version: '1.4.10'
  215. testCompile group: 'xmlunit', name: 'xmlunit', version: '1.6'
  216. compile group: 'com.belerweb', name: 'pinyin4j', version: '2.5.1'
  217. compile group: 'org.springframework.boot', name: 'spring-boot', version: "${springBootVersion}"
  218. compile group: 'org.springframework.boot', name: 'spring-boot-starter', version: "${springBootVersion}"
  219. compile group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: "${springBootVersion}"
  220. testCompile group: 'org.springframework.boot', name: 'spring-boot-starter-test', version: "${springBootVersion}"
  221. testCompile group: 'org.mockito', name: 'mockito-all', version: '1.10.19'
  222. //compile("org.springframework.boot:spring-boot-starter-web")
  223. //testCompile('org.springframework.boot:spring-boot-starter-test')
  224. }
  225. jar {
  226. def currentTime = java.time.ZonedDateTime.now()
  227. manifest {
  228. attributes( "Implementation-Title": project.name,
  229. "Implementation-Vendor": project.vendor,
  230. "Created-By": project.group,
  231. "Implementation-Date": currentTime,
  232. "Implementation-Version": project.version)
  233. }
  234. }
  235. /*
  236. task checkenv<<{
  237. //项目名
  238. println project.name
  239. //项目相对路径
  240. println project.path
  241. //项目描述
  242. println project.description
  243. //项目的绝对路径
  244. println project.projectDir
  245. //项目的build文件绝对路径
  246. println project.buildDir
  247. //项目所在的group
  248. println project.group
  249. //项目的版本号
  250. println project.version
  251. //项目的ant对象
  252. println project.ant
  253. }*/
  254. task copyjar2Release(type: Copy) {
  255. into "$rootDir/build/jars/"
  256. from "$buildDir/libs/"
  257. include '*.jar'
  258. }
  259. task copydemoWar2Release(type: Copy) {
  260. into "$rootDir/build/demowar/"
  261. from "$buildDir/libs/"
  262. include '*demo*.war'
  263. }
  264. task copyWar2Release(type: Copy) {
  265. into "$rootDir/build/"
  266. from "$buildDir/libs/"
  267. include '*web*.war'
  268. }
  269. task copyotherWar2Release(type: Copy) {
  270. into "$rootDir/build/"
  271. from "$buildDir/libs/"
  272. }
  273. //task buildRelease(dependsOn:['build','war','copyjar2Release','copyWar2Release','copyotherWar2Release','copydemoWar2Release']) << {
  274. //task buildRelease(dependsOn:['copyjar2Release','copyWar2Release','copyotherWar2Release','copydemoWar2Release']) << {
  275. // println 'Build MaxKey '+project.name +' complete .'
  276. //}
  277. }
  278. // In this section you declare the dependencies for your production and test code
  279. dependencies {
  280. }