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

2012-04-20 Thread Jesse Glick

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-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



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

2012-04-17 Thread Vincent Latombe
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