i am building a microservice using microservice-package-maven-plugin to package docker container. This works fine on build-server, but i would like to switch off thid docker packaging on my development environment, because i use windows and therefore no docker. At the moment i am editing the pom.xml true.. and true... Is there a better way to achieve this?
Can i add some command lines to my maven build like that? >mvn clean insatll -Dmicroservice.containerSkip=true ?
Or should i introduce maven profiles?
Thanks in advance
I am a bit late but this works for me:
Create a property in your pom:
<properties>
<skip-docker-image>false</skip-docker-image>
</properties>
Use the property in the plugin config:
<configuration>
<skip>${skip-docker-image}</skip>
</configuration>
Change the property when needed:
mvn clean install -Dskip-docker-image=true