diff --git a/build.gradle b/build.gradle index 51c165c..eb9a4da 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' - id 'com.palantir.docker' version '0.19.2' - id 'com.palantir.docker-run' version '0.19.2' + id 'com.palantir.docker' version '0.20.1' + id 'com.palantir.docker-run' version '0.20.1' } repositories { @@ -12,8 +12,7 @@ task wrapper(type: Wrapper) { jarFile = rootProject.file('.gradle-wrapper/gradle-wrapper.jar') } -task dist() { - dependsOn compileJava +task dist { def aggSourceDirs = [] as LinkedList bndWorkspace.models.each{ def fromFile = new File(it.value.base, "generated/") @@ -32,20 +31,17 @@ task dist() { } task packageZip(type: Zip) { - dependsOn dist archiveName = "younic.zip" destinationDir = file("cnf/release") from "cnf/run" } -docker { - dependsOn packageZip +docker (){ name 'escv/younic' //name 'hub.docker.com/escv/younic' //tags 'latest' dockerfile file('container/Dockerfile') - dependsOn packageZip - files file("cnf/release/younic.zip") + files 'cnf/release/younic.zip' pull true noCache true } @@ -58,3 +54,7 @@ dockerRun { daemonize true env 'YOUNIC_CMS_ROOT_GIT': 'https://github.com/escv/younic-sample.git' } + +compileJava.dependsOn clean +dist.dependsOn compileJava +packageZip.dependsOn dist \ No newline at end of file diff --git a/container/Dockerfile b/container/Dockerfile index e359387..c9f6f9b 100644 --- a/container/Dockerfile +++ b/container/Dockerfile @@ -13,7 +13,7 @@ RUN apk --update add git openssh && \ rm /var/cache/apk/* # ADD http://andre.webofferte.com/younic/younic.zip ./younic.zip -ADD cnf/release/younic.zip ./younic.zip +ADD younic.zip ./younic.zip RUN unzip younic.zip && \ rm younic.zip diff --git a/net.younic.core.dispatcher/src/net/younic/core/dispatcher/Activator.java b/net.younic.core.dispatcher/src/net/younic/core/dispatcher/Activator.java index 1371c8e..3a0ef07 100644 --- a/net.younic.core.dispatcher/src/net/younic/core/dispatcher/Activator.java +++ b/net.younic.core.dispatcher/src/net/younic/core/dispatcher/Activator.java @@ -95,7 +95,7 @@ private void setupFileInstallDeployFolders(BundleContext context) { addFileInstallDeployFolder(extBundleDir); String runAdmin = System.getenv("YOUNIC_RUN_ADMIN"); LOG.info("Check if run in Admin Mode: "+runAdmin); - if (runAdmin.equals("true")) { + if (runAdmin != null && runAdmin.equals("true")) { File admBundleDir = new File("bundle-adm"); addFileInstallDeployFolder(admBundleDir); }