You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Vincent Latombe <vi...@gmail.com> on 2012/04/17 09:24:13 UTC

For a mojo with requiresProject=false, I would like to avoid Maven from loading the pom.xml from working directory

Hello,

I'm coding a plugin where I can have a goal that is using requiresProject =
false, which I call directly from command line.

In some cases, this plugin can be called in a context where there is a
pom.xml in the working directory. The project itself may be invalid, but I
still would like to be able to execute the mojo.
Currently, Maven tries to parse the project and if it fails, it doesn't
even call my mojo. Is there any way to workaround this ?

I would be fine with a flag that would tell Maven to ignore the pom in the
current directory and call directly the mojo, but I don't believe it
currently exists.

Any clue?

Vincent

Re: For a mojo with requiresProject=false, I would like to avoid Maven from loading the pom.xml from working directory

Posted by Jesse Glick <je...@oracle.com>.
On 04/17/2012 03:24 AM, Vincent Latombe wrote:
> Maven tries to parse the project and if it fails, it doesn't even call my mojo.

Same applies to 'mvn archetype:generate'. Seems to me that this is a bug more than an RFE.

Note that invocations of bin/mvn without a goal but with e.g. --encrypt-password do work even when $CWD/pom.xml exists and is invalid.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org