Re: How can a plugin detect which Maven version it gets run with?

2010-12-11 Thread Peter Niederwieser
Thanks for the hints. For the record, here is my solution: - Added dependency org.apache.maven:maven-project - Added a field of type org.apache.maven.execution.RuntimeInformation to my Mojo and marked it as a @component (in JavaDoc) - Retrieved the version number with runtimeInformation.getApplic

How can a plugin detect which Maven version it gets run with?

2010-12-06 Thread Peter Niederwieser
Because my plugin (spock-maven) doesn't work with Maven 3, I'd like to fail the build if it used with Maven 3. (Otherwise it will be very hard for users to find out the cause of the effect they are seeing.) How can I detect which Maven version my plugin gets run with? Can't find any information on

How can a plugin detect which Maven version it gets run with?

2010-12-06 Thread Peter Niederwieser
any information on this. Cheers, Peter PS: I'm posting to dev because I didn't get any replies on the user list. ---- Peter Niederwieser Creator, http://spockframework.org Committer, http://groovy.codehaus.org Blogger, http