Skip to content
This repository has been archived by the owner on Mar 21, 2022. It is now read-only.

Changed build mojo to enable renaming files added to container #301

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

trojanbug
Copy link

Enabled using the name provided in resource's literally, so that the new name can be given to a file.
The trigger for this behavious is the resource definition naming a single file (similar to the below), and the target path not ending with trailing slash (which would make DOCKER treat is as directory name).

<configuration> <baseImage>dordoka/tomcat</baseImage> <imageName>${docker-image-name}</imageName> <resources> <resource> <targetPath>${webapps-dir-path}/ROOT.war</targetPath> <directory>${project.build.directory}</directory> <include>${project.build.finalName}.war</include> </resource> </resources> </configuration>

…s (renaming) - if the resource selection names a single file.

That way it is possible to use the build output where the name is of significance in the container - e.g. WAR name copied to Tomcat webapps directory defines the context path of the deployed app.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant