jdoklovic/maven-cli-plugin — pull request #28 by samcday (2014-10-17 02:04:35+00:00)
Title: Ensure correct profiles are propagated from PhaseCallRunner

I thought I was going crazy, because I figured this would *have* to be biting someone else, but it looks like only Connie is affected.

Our in-source studio runner uses a hacked up maven-cli setup to start up the products via AMPS. It allows a few different modes of startup (different product configurations) that are enabled via profiles. With the switch to using MojoExecutor profiles from the parent project were not being propagated to the cli command execution.

This fixes it, but it's a little hacky. I spent an hour or two trying to understand how to do it properly, but it looks like that will require re-reading the POM in with the ModelBuilder, in order to obtain all the different external / hierarchical profiles.

This changeset works fine for me - though it does result in some spurious warnings on spawned commands about trying to activate profiles that don't exist. This is because I'm including all activated profile ids, of which some may be from settings.xml. Meh.