Guest User

Untitled

a guest
Mar 4th, 2016
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.90 KB | None | 0 0
  1. apply plugin: 'java'
  2. apply plugin: 'maven'
  3. apply plugin: 'war'
  4. apply plugin: com.bmuschko.gradle.cargo.CargoPlugin
  5.  
  6. group = 'com.simbirsoft.origolo'
  7. version = '1.0-SNAPSHOT'
  8.  
  9. description = """Example Spring Boot REST Service"""
  10.  
  11. sourceCompatibility = 1.8
  12. targetCompatibility = 1.8
  13.  
  14. buildscript {
  15. repositories {
  16. jcenter()
  17. }
  18.  
  19. dependencies {
  20. classpath 'com.bmuschko:gradle-cargo-plugin:2.2.2'
  21. }
  22. }
  23.  
  24. repositories {
  25. mavenCentral()
  26. }
  27.  
  28. dependencies {
  29. compile(group: 'org.springframework.boot', name: 'spring-boot-starter', version: '1.3.2.RELEASE') {
  30. exclude(module: 'commons-logging')
  31. }
  32. compile group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: '1.3.2.RELEASE'
  33. compile group: 'org.springframework.boot', name: 'spring-boot-starter-data-jpa', version: '1.3.2.RELEASE'
  34. compile group: 'com.zaxxer', name: 'HikariCP', version: '2.4.3'
  35. compile group: 'org.hibernate', name: 'hibernate-validator', version: '5.2.2.Final'
  36. compile group: 'javax.inject', name: 'javax.inject', version: '1'
  37. compile group: 'io.springfox', name: 'springfox-swagger-ui', version: '2.2.2'
  38. compile group: 'io.springfox', name: 'springfox-swagger2', version: '2.2.2'
  39. runtime group: 'org.postgresql', name: 'postgresql', version: '9.4-1201-jdbc41'
  40.  
  41. def cargoVersion = '1.4.18'
  42. cargo "org.codehaus.cargo:cargo-core-uberjar:$cargoVersion",
  43. "org.codehaus.cargo:cargo-ant:$cargoVersion"
  44. }
  45.  
  46. task testTask << {
  47.  
  48. println project.ext.getProperty('tomcat_hostname');
  49. println "done";
  50. }
  51.  
  52. cargo {
  53. containerId = 'tomcat8x'
  54. port = 8080
  55.  
  56. deployable {
  57. file = file('build/libs/origolo-1.0-SNAPSHOT.war')
  58. context = '/'
  59. }
  60.  
  61. remote {
  62. hostname = project.ext.getProperty('tomcat_hostname')
  63. username = 'tomcat'
  64. password = 'tomcat'
  65. }
  66.  
  67. }
Add Comment
Please, Sign In to add comment