1
0

build.gradle 2.3 KB

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