Hi That is what I thought too, but I have a very simple mojo (that does no have @requiresProject set) that when run complains that:
[INFO] Cannot execute mojo: generate. It requires a project with an existing pom .xml, but the build is not using one. Hermod -----Original Message----- From: Jason van Zyl [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 28, 2006 1:20 PM To: Maven Developers List Subject: Re: Executing mojo without a pom. On 28 Jun 06, at 11:18 AM 28 Jun 06, <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> wrote: > Hi > > As part of a an initial project setup, I want to execute a mojo > that I have written (sort of like archetyep:create). At this stage > the pom is not available, so I was wondering how to specify that > the mojo does not require a pom. > By default a Mojo does not require a POM. You must specify when your Mojo needs a maven project you enforce that by using the @requiresProject in your Mojo. When Maven inspects the metadata for a plugin before executing a Mojo (DefaultPluginManager) it will check this flag and throw an exception if there is no pom.xml file present. But by default you don't need a pom.xml file to have your Mojo execute. Jason. > Hermod > > > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * > * * * * > > This email with attachments is solely for the use of the individual or > entity to whom it is addressed. Please also be aware that DnB NOR > cannot > accept any payment orders or other legally binding correspondence with > customers as a part of an email. > > This email message has been virus checked by the anti virus > programs used > in the DnB NOR Group. > > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * > * * * * > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > Jason van Zyl [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]