build.gradle 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. apply plugin: 'java'
  2. mainClassName = 'com.qxgmat.Application'
  3. repositories {
  4. mavenLocal()
  5. maven { url = "http://maven.aliyun.com/nexus/content/groups/public" }
  6. mavenCentral()
  7. }
  8. dependencies {
  9. // shiro
  10. // compile(libraries."shiro-core", libraries."shiro-spring", libraries."shiro-cache")
  11. compileClasspath libraries."shiro"
  12. testCompile libraries."shiro"
  13. // druid
  14. compileClasspath 'com.alibaba:druid-spring-boot-starter:1.1.10'
  15. testCompile 'com.alibaba:druid-spring-boot-starter:1.1.10'
  16. // swagger
  17. compileClasspath libraries."springfox-bean-validators", libraries."springfox-swagger2", libraries."springfox-swagger-ui"
  18. testCompile libraries."springfox-bean-validators", libraries."springfox-swagger2", libraries."springfox-swagger-ui"
  19. compileClasspath 'com.github.penggle:kaptcha:2.3.2'
  20. testCompile 'com.github.penggle:kaptcha:2.3.2'
  21. // https://mvnrepository.com/artifact/org.apache.poi/poi
  22. compileClasspath group: 'org.apache.poi', name: 'poi', version: '3.17'
  23. testCompile group: 'org.apache.poi', name: 'poi', version: '3.17'
  24. compileClasspath group: 'org.apache.poi', name: 'poi-ooxml', version: '3.17'
  25. testCompile group: 'org.apache.poi', name: 'poi-ooxml', version: '3.17'
  26. // compileClasspath group: 'e-iceblue', name: 'spire.pdf', version: '2.2.0'
  27. compileClasspath group: 'com.itextpdf', name: 'itextpdf', version: '5.5.13.1'
  28. testCompile group: 'com.itextpdf', name: 'itextpdf', version: '5.5.13.1'
  29. compileClasspath group: 'com.itextpdf', name: 'itext-asian', version: '5.2.0'
  30. testCompile group: 'com.itextpdf', name: 'itext-asian', version: '5.2.0'
  31. // compile group: 'commons-lang', name: 'commons-lang', version:'2.6'
  32. // compile group: 'commons-fileupload', name: 'commons-fileupload', version:'1.3.3'
  33. // compile group: 'commons-io', name: 'commons-io', version:'2.6'
  34. // compile group: 'commons-codec', name: 'commons-codec', version:'1.11'
  35. // compile group: 'commons-configuration', name: 'commons-configuration', version:'1.10'
  36. }
  37. bootJar {
  38. classifier = 'boot'
  39. // lib目录的清除和复制任务
  40. dependsOn clearJar
  41. dependsOn copyJar
  42. manifest {
  43. // Properties 允许加载扩展jar,是compileClasspath生效,定义在loader.properties
  44. // https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#executable-jar-launching
  45. attributes 'Main-Class': 'org.springframework.boot.loader.PropertiesLauncher'
  46. attributes 'Start-Class': mainClassName
  47. }
  48. excludeDevtools = true
  49. }
  50. bootRun {
  51. dependsOn copyJar
  52. classpath +=files(fileTree(dir:"${libsDir}/lib/",include:['*.jar']))
  53. // jvmArgs = ["-Dloader.path=${libsDir}/lib", "-Dloader.debug=true"]
  54. // mainClassName = 'org.springframework.boot.loader.PropertiesLauncher'
  55. }
  56. //task runLocal(type: JavaExec) {
  57. // dependsOn bootJar
  58. // main="org.springframework.boot.loader.PropertiesLauncher"
  59. // args("-Dloader.path=${libsDir}/lib -Dloader.debug=true")
  60. //}