Maven mojo - prevent execution on project in current working directory?

I'm writing a Maven plugin and would like to prevent it running on the project in the current working directory. The plugin is designed to run on an artifactId (or list of artifactIds) specified by the user, which may not be the artifact in the current working directory.

I find Maven always starts interrogating the project in the working directory, creating log messages which will confuse users of my plugin.

Is there anything I can do to prevent this?

Thanks in advance,



Use @requiresProject false annotation for your mojo.

Need Your Help

Neo4j - java.lang.NoClassDefFoundError: org/parboiled/scala/Parser

java scala neo4j

I try this Hello world example ( I inserted into this example my method:

Maintain center of google map when I change the size of the map

javascript google-maps

I'm trying to change the size of a map and maintain the center. It doesn't work thoug. Code