0

I have a port section in my maven file (docker-maven-plugin section) that looks like this:

<port>${webservice.adminport}:8080</port>

This works fine (uses webservice.adminport if it is defined or defaults to 8080).

However, I'm trying to use the same pattern in the env section of the pom:

<MY_ENV_VAR>http://${docker.host.address}:${webservice.adminport}:8080/my-service</MY_ENV_VAR>

but getting the following error, I think the syntax in the env section above is not correct?

Could not resolve placeholder 'webservice.adminport' in value "http://1.2.3.4:${webservice.adminport}:8080/my-service

rmf
  • 625
  • 2
  • 9
  • 39

1 Answers1

0

Found it:

<MY_ENV_VAR>http://${docker.host.address}:${webservice.adminport:8080}/my-service</MY_ENV_VAR>
rmf
  • 625
  • 2
  • 9
  • 39