I'm new to fabric8-maven-plugin.
I have a Dropwizard fat jar which I'd like to containerize for OpenShift/okd. It seems the recommended way would invoke the java-exec generator: http://maven.fabric8.io/#generator-java-exec
Problem is that Dropwizard apps have a config file argument that must be provided, but I'm not sure how to instruct the generator to do so.
Correct invocation should be:
java -jar hello-world-0.0.1-SNAPSHOT.jar server hello-world.yml
The generator does the following, which is missing arguments:
java -jar hello-world-0.0.1-SNAPSHOT.jar
The following seems to be the simplest approach:
Use the
exec-maven-plugin
in your build configuration. Supply the needed arguments: one for the command and another for the configuration file location.The following example is a random search result: https://github.com/christian-posta/microservices-by-example-source/blob/master/hola-dropwizard/pom.xml#L103-L114.
It seems to implement the approach described here: https://www.oreilly.com/ideas/microservices-for-java-developers/page/3/dropwizard-for-microservices#chapter-3-dropwizard-for-microservices