I want to include some JAR files in my Docker image. I'm using the fabric8 maven plugin's inline assembly feature.
Here is a the dependency in the POM:
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-all</artifactId>
<version>${activemq.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>${org.json.version}</version>
<type>jar</type>
</dependency>
And here is the inline assembly for the fabribc8 plugin:
<assembly>
<inline>
<id>copy-jars</id>
<dependencySets>
<dependencySet>
<includes>
<include>*</include>
</includes>
<outputDirectory>/opt/apache-jmeter-5.1.1/lib</outputDirectory>
</dependencySet>
</dependencySets>
</inline>
</assembly>
The JAR is copied to the target/docker/...
directory. Screenshot:
I build the image, run the container, and into it. However, the JAR is missing.
bash-4.4# ls -l /opt/apache-jmeter-5.1.1/lib/*active*
ls: /opt/apache-jmeter-5.1.1/lib/*active*: No such file or directory
There is a warning from the plugin:
[WARNING] DOCKER> Dockerfile /load-testing/Dockerfile does not contain an ADD or COPY directive to include assembly created at maven. Ignoring assembly.
I have to use a COPY to copy the files from into the Docker image? I don't get that from free from the plugin? Or did I just misconfigure something?