Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
zaharchenko committed Apr 9, 2019
2 parents 9a85b91 + 27b1f1c commit 798ca11
Showing 1 changed file with 24 additions and 17 deletions.
41 changes: 24 additions & 17 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
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 {
username(rootProject.hasProperty('repoUser') ? rootProject['repoUser'] : 'cuba')
password(rootProject.hasProperty('repoPass') ? rootProject['repoPass'] : 'cuba123')
}
}

}
dependencies {
classpath "com.haulmont.gradle:cuba-plugin:$cubaVersion"
Expand All @@ -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'

Expand Down Expand Up @@ -129,7 +139,7 @@ configure(globalModule) {
runtime('org.glassfish.jaxb:jaxb-runtime:2.3.1')
}
}

}

configure(coreModule) {
Expand All @@ -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')
Expand Down Expand Up @@ -205,7 +215,7 @@ configure(webModule) {
compile(guiModule)

}

task webArchive(type: Zip) {
from file("$buildDir/web")
from file('web')
Expand All @@ -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')
Expand All @@ -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 {
Expand Down

0 comments on commit 798ca11

Please sign in to comment.