Commit 89359b12 authored by ipatini's avatar ipatini
Browse files

Modified control-service pom.xml to copy baguette-client.tgz from maven...

Modified control-service pom.xml to copy baguette-client.tgz from maven repository, call maven-checksum-plugin to calculate MD5 checksum and copy 'install.sh', 'index.html' and 'favicon.ico' from their respective sources. Move vm.xml assembly description in baguette-client/src/main/assembly folder and renamed it to 'installation-package'. Modified control-service configuration to map http://...:8111/resources to file:resources/ (relative to working dir. rather than to $MELODIC_CONFIG_DIR). Modified control-service Dockerfile to copy baguette client installation staff into $WORKDIR/resources (rather than in config/resources)
parent 99112671
Pipeline #9422 passed with stage
in 37 minutes and 18 seconds
......@@ -90,7 +90,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptor>src/assembly/vm.xml</descriptor>
<descriptor>src/main/assembly/baguette-client-installation-package.xml</descriptor>
<finalName>baguette-client</finalName>
</configuration>
<executions>
......@@ -156,11 +156,11 @@
<configuration>
<fileSets>
<fileSet>
<sourceFile>target/baguette-client-vm.tgz</sourceFile>
<sourceFile>target/baguette-client-installation-package.tgz</sourceFile>
<destinationFile>../config-files/resources/baguette-client.tgz</destinationFile>
</fileSet>
<fileSet>
<sourceFile>target/baguette-client-vm.tgz.md5</sourceFile>
<sourceFile>target/baguette-client-installation-package.tgz.md5</sourceFile>
<destinationFile>../config-files/resources/baguette-client.tgz.md5</destinationFile>
</fileSet>
<fileSet>
......
......@@ -14,7 +14,7 @@
http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
http://maven.apache.org/xsd/assembly-1.1.2.xsd"
>
<id>vm</id>
<id>installation-package</id>
<formats>
<format>tgz</format>
</formats>
......
......@@ -101,7 +101,8 @@ melodic.security.enabled=false
### Web configuration - Resources
static.favicon.path=classpath:/public/favicon.ico
static.resource.path=file:${MELODIC_CONFIG_DIR}/resources/
static.resource.path=file:resources/
#static.resource.path=file:${MELODIC_CONFIG_DIR}/resources/
#static.resource.path=file:/opt/ems-server/resources/
static.resource.context=/resources/**
#static.resource.redirect=/resources/index.html
......
......@@ -163,42 +163,58 @@
<type>jar</type>
<outputDirectory>${project.build.directory}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>eu.melodic.event</groupId>
<artifactId>baguette-client</artifactId>
<version>${project.version}</version>
<type>tgz</type>
<classifier>installation-package</classifier>
<outputDirectory>${project.build.directory}</outputDirectory>
<destFileName>baguette-client.tgz</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<!-- Checksum Maven plugin (http://checksum-maven-plugin.nicoulaj.net) -->
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<groupId>net.nicoulaj.maven.plugins</groupId>
<artifactId>checksum-maven-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>files</goal>
</goals>
</execution>
</executions>
<configuration>
<resources>
<resource>
<targetPath>/jars</targetPath>
<fileSets>
<fileSet>
<directory>${project.build.directory}</directory>
<include>${docker.jarToInclude}</include>
<include>${docker.esperJarToInclude}</include>
</resource>
<resource>
<targetPath>/bin</targetPath>
<directory>${project.basedir}/../bin/</directory>
<include>run.sh</include>
</resource>
<resource>
<targetPath>/config</targetPath>
<directory>${project.basedir}/../config-files</directory>
</resource>
<resource>
<targetPath>/resources</targetPath>
<directory>${project.basedir}/../config-files/resources</directory>
</resource>
</resources>
<!--<directory>target</directory>-->
<includes>
<include>*.zip</include>
<include>*.tar</include>
<include>*.tar.gz</include>
<include>*.tgz</include>
</includes>
<excludes>
<exclude>*.jar</exclude>
</excludes>
</fileSet>
</fileSets>
<algorithms>
<algorithm>MD5</algorithm>
</algorithms>
<individualFiles>true</individualFiles>
<failOnError>true</failOnError>
<failIfNoFiles>false</failIfNoFiles>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
</plugin>
<!-- Copy-Rename Maven plugin (https://coderplus.github.io/copy-rename-maven-plugin/) -->
<plugin>
......@@ -207,21 +223,13 @@
<version>1.0</version>
<executions>
<execution>
<id>copy-zip</id>
<id>copy-files</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<fileSets>
<fileSet>
<sourceFile>../baguette-client/target/baguette-client-vm.tgz</sourceFile>
<destinationFile>target/baguette-client.tgz</destinationFile>
</fileSet>
<fileSet>
<sourceFile>../baguette-client/target/baguette-client-vm.tgz.md5</sourceFile>
<destinationFile>target/baguette-client.tgz.md5</destinationFile>
</fileSet>
<fileSet>
<sourceFile>../baguette-client/bin/install.sh</sourceFile>
<destinationFile>target/install.sh</destinationFile>
......@@ -234,6 +242,49 @@
</executions>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<resources>
<resource>
<targetPath>/jars</targetPath>
<directory>${project.build.directory}</directory>
<include>${docker.jarToInclude}</include>
<include>${docker.esperJarToInclude}</include>
</resource>
<resource>
<targetPath>/bin</targetPath>
<directory>${project.basedir}/../bin/</directory>
<include>run.sh</include>
</resource>
<resource>
<targetPath>/config</targetPath>
<directory>${project.basedir}/../config-files</directory>
</resource>
<!--<resource>
<targetPath>/resources</targetPath>
<directory>${project.basedir}/../config-files/resources</directory>
</resource>-->
<resource>
<targetPath>/resources</targetPath>
<directory>${project.build.directory}</directory>
<include>baguette-client.tgz</include>
<include>baguette-client.tgz.md5</include>
<include>install.sh</include>
</resource>
<resource>
<targetPath>/resources</targetPath>
<directory>${project.basedir}/src/main/resources/public</directory>
<include>*</include>
</resource>
</resources>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment