build.gradle 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. // druid
  13. compileClasspath 'com.alibaba:druid-spring-boot-starter:1.1.10'
  14. // swagger
  15. compileClasspath libraries."springfox-bean-validators", libraries."springfox-swagger2", libraries."springfox-swagger-ui"
  16. compileClasspath 'com.github.penggle:kaptcha:2.3.2'
  17. // https://mvnrepository.com/artifact/org.apache.poi/poi
  18. compileClasspath group: 'org.apache.poi', name: 'poi', version: '3.17'
  19. compileClasspath group: 'org.apache.poi', name: 'poi-ooxml', version: '3.17'
  20. // compile group: 'commons-lang', name: 'commons-lang', version:'2.6'
  21. // compile group: 'commons-fileupload', name: 'commons-fileupload', version:'1.3.3'
  22. // compile group: 'commons-io', name: 'commons-io', version:'2.6'
  23. // compile group: 'commons-codec', name: 'commons-codec', version:'1.11'
  24. // compile group: 'commons-configuration', name: 'commons-configuration', version:'1.10'
  25. }
  26. bootJar {
  27. classifier = 'boot'
  28. // lib目录的清除和复制任务
  29. dependsOn clearJar
  30. dependsOn copyJar
  31. manifest {
  32. // Properties 允许加载扩展jar,是compileClasspath生效,定义在loader.properties
  33. // https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#executable-jar-launching
  34. attributes 'Main-Class': 'org.springframework.boot.loader.PropertiesLauncher'
  35. attributes 'Start-Class': mainClassName
  36. }
  37. excludeDevtools = true
  38. }
  39. bootRun {
  40. dependsOn copyJar
  41. classpath +=files(fileTree(dir:"${libsDir}/lib/",include:['*.jar']))
  42. // jvmArgs = ["-Dloader.path=${libsDir}/lib", "-Dloader.debug=true"]
  43. // mainClassName = 'org.springframework.boot.loader.PropertiesLauncher'
  44. }
  45. //task runLocal(type: JavaExec) {
  46. // dependsOn bootJar
  47. // main="org.springframework.boot.loader.PropertiesLauncher"
  48. // args("-Dloader.path=${libsDir}/lib -Dloader.debug=true")
  49. //}