joelittlejohn / embedmongo-maven-plugin

Maven plugin wrapper for the flapdoodle.de embedded MongoDB API
Apache License 2.0
88 stars 51 forks source link

New maven 'run' goal; similar in spirit to jetty:run #2

Closed jeremynorris closed 12 years ago

jeremynorris commented 12 years ago

This is the same as 'start' except that it will continue to run until the plugin is explicitly stopped, for example, .

joelittlejohn commented 12 years ago

Hi Jeremy. Thanks for contributing this patch! A very useful addition (I use jetty:run all the time :)).

I've made a couple of comments on the commit. If you address these I'll merge it straight in (or I can apply these changes myself if you like).

Thanks again!

jeremynorris commented 12 years ago

Thanks for the feedback. There are some additional issues here; the configuration injection doesn't work right on the subclass so I'll have to find a better/cleaner way to do this - perhaps just a new option (eg, block=true or interactive=true?) on the main start goal. Thoughts?

(In any case, I definitely agree on the style/indentation issues...)

Thanks, -Jeremy

On Jul 4, 2012, at 10:18 AM, Joe Littlejohnreply@reply.github.com wrote:

Hi Jeremy. Thanks for contributing this patch! A very useful addition (I use jetty:run all the time :)).

I've made a couple of comments on the commit. If you address these I'll merge it straight in (or I can apply these changes myself if you like).

Thanks again!


Reply to this email directly or view it on GitHub: https://github.com/joelittlejohn/embedmongo-maven-plugin/pull/2#issuecomment-6764516

joelittlejohn commented 12 years ago

This is strange (inherited properties should work), I'm sure this is something we could get to the bottom of. That said, I actually think using a property would be a lot more convenient here.

The Jetty run goal is quite awkward to use in this sense. As they have chosen a separate mojo instead of a property, it means that if you temporarily want to switch to 'blocking/waiting' mode you need to parameterize the goal and set up some complicated (property-activated) profile to switch from start to run.

If we go with a property, there's no need set up any additional profiles. If you want to start in blocking/waiting mode, just invoke like:

mvn verify -Dembedmongo.wait

So I think go for a property (my preference would be wait) and be sure to include an expression value (my preference would be embedmongo.wait :))