You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Phillip Hellewell <ss...@gmail.com> on 2010/10/21 01:08:31 UTC

A plugin that doesn't require a pom.xml

How do I create a plugin that doesn't require a pom.xml?

Even the hello world described on this page requires it:
http://maven.apache.org/guides/plugin/guide-java-plugin-development.html

You get this error if you try to run it where no pom.xml is present.
[INFO] Cannot execute mojo: sayhi. It requires a project with an
existing pom.xml, but the build is not using one.

Surely it must be possible.  "mvn help:help" is an example of one that
it lets me run from anywhere.

Thanks,
Phillip

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


Re: A plugin that doesn't require a pom.xml

Posted by Phillip Hellewell <ss...@gmail.com>.
On Wed, Oct 20, 2010 at 5:13 PM, Nick Stolwijk <ni...@gmail.com> wrote:
> I've taken a look at the source of the help:describe goal and it seems
> you need RequireProject.
>
> http://svn.apache.org/viewvc/maven/plugins/tags/maven-help-plugin-2.1.1/src/main/java/org/apache/maven/plugins/help/DescribeMojo.java?view=markup

Thanks!  Adding @requiresProject false worked like a charm!

Phillip

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


Re: A plugin that doesn't require a pom.xml

Posted by Nick Stolwijk <ni...@gmail.com>.
I've taken a look at the source of the help:describe goal and it seems
you need RequireProject.

http://svn.apache.org/viewvc/maven/plugins/tags/maven-help-plugin-2.1.1/src/main/java/org/apache/maven/plugins/help/DescribeMojo.java?view=markup

With regards,

Nick Stolwijk
~Java Developer~

IPROFS BV.
Claus Sluterweg 125
2012 WS Haarlem
http://www.iprofs.nl



On Thu, Oct 21, 2010 at 1:08 AM, Phillip Hellewell <ss...@gmail.com> wrote:
> How do I create a plugin that doesn't require a pom.xml?
>
> Even the hello world described on this page requires it:
> http://maven.apache.org/guides/plugin/guide-java-plugin-development.html
>
> You get this error if you try to run it where no pom.xml is present.
> [INFO] Cannot execute mojo: sayhi. It requires a project with an
> existing pom.xml, but the build is not using one.
>
> Surely it must be possible.  "mvn help:help" is an example of one that
> it lets me run from anywhere.
>
> Thanks,
> Phillip
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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