build.gradle 2.1 KB

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