Open miles-po opened 4 months ago
Fixed by adding the following after COPYing the pom.xml file into the container image:
RUN sed -i "s/\${revision}/$(awk -F'[<>]' '/<revision>/{print $3}' pom.xml)/g" pom.xml
Reads the revision parameter and then replaces the ${revision}
placeholder in the pom file. Uses sed and awk, so should be available in any Linux container.
pom.xml has
<version>${revision}</version>
with a corresponding<revision>0.0.9</revision>
in the<properties>
section. Runningmvn clean package
from terminal and from within IntelliJ work fine. However same code building from Docker fails.When I replace
${revision}
and${changelist}
with explicit versions instead of property references, it builds fine.Relevant Dockerfile snippet leading up to RUN error.
returns