Why might my Maven Mojo lose its configuration properties when run individually? -
i've got outstanding issue in jasmine-maven-plugin , can't figure out.
you're welcome try out yourself, gist when 1 runs:
mvn jasmine:test the properties configured in pom.xml plugin not set on mojo bean.
upon inspection it's pretty clear each property on bean falling on default value. however, when run test phase (which jasmine:test bound to), like:
mvn test it works fine.
any ideas? preamble @ top of testmojo looks like:
/** * @component * @goal test * @phase test * @execute lifecycle="jasmine-lifecycle" phase="process-test-resources" */ update: i'm more confused. upon further reading, seems behavior unexpected, since configuration i'm seeing missing done in <configuration> element right under plugin, not under <execution/>, per this document:
note: configurations inside tag differ outside in cannot used direct command line invocation. instead applied when lifecycle phase bound invoked. alternatively, if move configuration section outside of executions section, apply globally invocations of plugin.
and of course i'm idiot. looking @ wrong pom, , sure enough configuration inside <execution> block.
so i'll try feed google answering own question in big bold letters:
when invoke maven goal command line, pick pom.xml's configuration element if configuration made directly under <plugin/> element, , not under <execution/> element.
Comments
Post a Comment