REPO-4172: Add Licenses directory to the root of docker image (#137)

* Added Licenses directory to the root of docker image

* Updated artefactId correctly for community packaging

* Replaced maven-dependency-plugin with maven-resources-plugin to copy licenses from source code

* Replaced maven-dependency-plugin with maven-resources-plugin to copy licenses from source code
This commit is contained in:
Abdul Mohammed
2019-02-01 14:48:52 +00:00
committed by GitHub
parent 12fd3f0673
commit f303243006
2 changed files with 28 additions and 0 deletions

View File

@@ -59,6 +59,10 @@ COPY target/war /usr/local/tomcat/webapps
COPY target/connector/* /usr/local/tomcat/lib/
COPY target/alfresco-mmt/* /usr/local/tomcat/alfresco-mmt/
# Copy Licenses to the root of the Docker image
RUN mkdir /licenses
COPY target/licenses/ /licenses/
# Change the value of the shared.loader= property to the following:
# shared.loader=${catalina.base}/shared/classes
RUN sed -i "s/shared.loader=/shared.loader=\${catalina.base}\/shared\/classes/" /usr/local/tomcat/conf/catalina.properties

View File

@@ -73,6 +73,30 @@
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>copy-licenses</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<resources>
<resource>
<!-- Extract licenses directory -->
<directory>../distribution/src/main/resources/licenses</directory>
<filtering>false</filtering>
</resource>
</resources>
<outputDirectory>${project.build.directory}/licenses</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>