diff --git a/build.gradle b/build.gradle index 91a5f8c..062dca2 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,17 @@ buildscript { ext.cubaVersion = '7.0.2' repositories { - + + if (System.getenv('HAULMONT_REPOSITORY_URL')) { + maven { + credentials { + username System.getenv('HAULMONT_REPOSITORY_USER') + password System.getenv('HAULMONT_REPOSITORY_PASSWORD') + } + url System.getenv('HAULMONT_REPOSITORY_URL') + } + } + maven { url 'https://repo.cuba-platform.com/content/groups/work' credentials { @@ -9,7 +19,7 @@ buildscript { password(rootProject.hasProperty('repoPass') ? rootProject['repoPass'] : 'cuba123') } } - + } dependencies { classpath "com.haulmont.gradle:cuba-plugin:$cubaVersion" @@ -19,10 +29,10 @@ buildscript { def modulePrefix = 'imap' -def globalModule = project(":${modulePrefix}-global" ) -def coreModule = project(":${modulePrefix}-core" ) -def guiModule = project(":${modulePrefix}-gui" ) -def webModule = project(":${modulePrefix}-web" ) +def globalModule = project(":${modulePrefix}-global") +def coreModule = project(":${modulePrefix}-core") +def guiModule = project(":${modulePrefix}-gui") +def webModule = project(":${modulePrefix}-web") def servletApi = 'javax.servlet:javax.servlet-api:3.1.0' @@ -129,7 +139,7 @@ configure(globalModule) { runtime('org.glassfish.jaxb:jaxb-runtime:2.3.1') } } - + } configure(coreModule) { @@ -149,7 +159,7 @@ configure(coreModule) { task cleanConf(description: 'Cleans up conf directory') { doLast { - def dir = new File(cuba.tomcat.dir, "/conf/${modulePrefix}-core" ) + def dir = new File(cuba.tomcat.dir, "/conf/${modulePrefix}-core") if (dir.isDirectory()) { ant.delete(includeemptydirs: true) { fileset(dir: dir, includes: '**/*', excludes: 'local.app.properties') @@ -205,7 +215,7 @@ configure(webModule) { compile(guiModule) } - + task webArchive(type: Zip) { from file("$buildDir/web") from file('web') @@ -229,7 +239,7 @@ configure(webModule) { task cleanConf(description: 'Cleans up conf directory') { doLast { - def dir = new File(cuba.tomcat.dir, "/conf/${modulePrefix}" ) + def dir = new File(cuba.tomcat.dir, "/conf/${modulePrefix}") if (dir.isDirectory()) { ant.delete(includeemptydirs: true) { fileset(dir: dir, includes: '**/*', excludes: 'local.app.properties') @@ -245,16 +255,13 @@ configure(webModule) { } - - - -task undeploy(type: Delete, dependsOn: ":${modulePrefix}-web:cleanConf" ) { +task undeploy(type: Delete, dependsOn: ":${modulePrefix}-web:cleanConf") { delete("$cuba.tomcat.dir/shared") - delete("$cuba.tomcat.dir/webapps/${modulePrefix}-core" ) - delete("$cuba.tomcat.dir/webapps/${modulePrefix}" ) + delete("$cuba.tomcat.dir/webapps/${modulePrefix}-core") + delete("$cuba.tomcat.dir/webapps/${modulePrefix}") } -task restart(dependsOn: ['stop', ":${modulePrefix}-core:deploy" , ":${modulePrefix}-web:deploy" ], description: 'Redeploys applications and restarts local Tomcat') { +task restart(dependsOn: ['stop', ":${modulePrefix}-core:deploy", ":${modulePrefix}-web:deploy"], description: 'Redeploys applications and restarts local Tomcat') { doLast { ant.waitfor(maxwait: 6, maxwaitunit: 'second', checkevery: 2, checkeveryunit: 'second') { not {