stephenc/mongodb-maven-plugin — pull request #4 by guruxu (2013-08-08 04:30:37+00:00)
Title: Patch to allow it-random-ports set property to be used by the mojo

This is the best I can do for now. Given the hack I don't think we should ask Connolly to take it, so we should probably deploy it to our Nexus.

Ideally I'd like to have something like:

/**
* The port to start mongodb on.
*
* @parameter expression="${mongodb.port}" expression="${project.mongodb.port}" default-value="27017"
*/
private int port;

So that the 2nd expression can take effect if the first is not set. But maven doesn't so crazy things like this.

Alternatively, I can set another config called true then add a lot of code to conditionally check project properties and use them if set, but that's also hackish.

Any better idea?