private MojoExecution getMojoExecution(String executionId, MojoDescriptor mojoDescriptor) {
        if (executionId != null) {
            return new MojoExecution(mojoDescriptor, executionId);
        } else {
            return new MojoExecution(mojoDescriptor, toXpp3Dom(mojoDescriptor.getMojoConfiguration()));
        }
    }
A service for executing goals on configured plugins.
<p>
Inspired by and partly reused from
https://github.com/TimMoore/mojo-executor but adapted to newer Maven versions.

@author roland
@since 01/07/15
src/main/java/io/fabric8/maven/docker/service/MojoExecutionService.java