Closed claussni closed 1 year ago
I cannot replicate this locally (Windows, MinGW Msys 1.0). The deploy step works as intended on my machine.
The deploy.bash
target first creates a TAR.GZ file in dist
that it then deploys from. The directory structure should be there in the file, and preserved on deploy.
Could you please check if your TAR file contains folder information? It could either be the fault of the packaging step (Ant) or the deployment step (which uses platform-native TAR for extracting).
Thank you!
Also cannot replicate locally on Ubuntu VM (WSL, Ubuntu 20.04.6). Packaging and extracting steps work.
tar -tvf
on the dist tar displays correct path information. Untarring via build script preserves folders.
It almost appears like the version of Ant you are running isn't respecting the prefix
attribute on the tarfileset
and zipfileset
elements in the dist.bash
target. That changelogs
and licenses
folder should be under docs
, as well as the jar file under jar
. Those directories may not be created on your packaging step for whatever reason.
Can you verify the version of Apache Ant that you are running?
Found the cause of the problem. It's not about Ant. It's the Docker COPY directive dissolving all the directories.
This will copy just the files and cause the issue:
COPY --from=build /opt/* .
This copies the whole folder as build by ant and everything works as expected:
COPY --from=build /opt/ .
When using the
ant deploy.bash -Ddeploy.dir=/somedir
command the built jar file is expected in/somedir/jar/
. Yet, it is just copied to/somedir
:Consequently the run scripts fail to start the programm: