diff --git a/scripts/install-stable.sh b/scripts/install-stable.sh index e8aa1d0..07b97f7 100755 --- a/scripts/install-stable.sh +++ b/scripts/install-stable.sh @@ -57,34 +57,83 @@ else tar -xzvf apache-maven-${mavenVersion}-bin.tar.gz fi -# Download Ozone -echo "$INFO Downloading Ozone $ozoneVersion..." -$mvn dependency:get \ --DgroupId=com.ozonehis \ --DartifactId=ozone \ --Dversion=${ozoneVersion} \ --Dpackaging=zip \ --DremoteRepositories=https://nexus.mekomsolutions.net/repository/maven-public \ --Dtransitive=false - -# Copy and Unpack -echo "$INFO Extracting Ozone..." -$mvn dependency:copy \ --Dartifact=com.ozonehis:ozone:${ozoneVersion}:zip \ --DoutputDirectory=./ \ --DuseBaseVersion=true - -# Account for some inconsistencies in some systems where Maven copies the files without a timestamp. -# Only rename the file if it is time-stamped. -if [ ! -f "ozone-${ozoneVersion}.zip" ] -then - echo "$INFO Rename to 'ozone-${ozoneVersion}.zip'..." - mv ozone-1.0.0-*.zip ozone-${ozoneVersion}.zip -fi +# Set up local Maven helper project to workaround issues when using the Maven dependency plugin from CLI. +cat >_temp_install-latest-ozone-pom.xml < + + 4.0.0 + install-latest-ozone-helper + com.ozonehis + Install Latest Ozone Helper + Helper project to install the latest Ozone HIS + 1.0.0-SNAPSHOT + pom + + + Ozone HIS + https://www.ozone-his.com + + + + Mekom Solutions + https://www.mekomsolutions.com + + + + + UTF-8 + + + + + com.ozonehis + ozone + zip + ${ozoneVersion} + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + Fetch Ozone + generate-resources + + unpack-dependencies + + + true + pom + ozone + ozone + + + + + + + + + + mks-nexus-public + https://nexus.mekomsolutions.net/repository/maven-public/ + + + + +EOF + +echo "$INFO Download and extract Ozone $ozoneVersion..." +$mvn clean package -f _temp_install-latest-ozone-pom.xml +rm _temp_install-latest-ozone-pom.xml -echo "$INFO Unzipping..." -unzip ozone-${ozoneVersion}.zip -d ${ozoneInstallFolder} -rm ozone-${ozoneVersion}.zip +# Move to the scripts/ folder pushd ozone/run/docker/scripts/ echo ""