You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Peter Fischer <pf...@fast-mail.org> on 2007/12/13 16:33:59 UTC
own plugin without need for pom.xml
Hello,
I want to write my own deploy-plugin, which takes a directory and deploys
all contained jars.
In this scenario, I don't need a pom.xml like for "mvn deploy:deploy-file
...".
But if I use my own plugin, maven shows me the error:
[INFO] Cannot execute mojo: bundlesdeploy. It requires a project with an
existing pom.xml, but the build is not using one.
How can I avoid this error?
regards,
Peter
--
View this message in context: http://www.nabble.com/own-plugin-without-need-for-pom.xml-tp14318109s177p14318109.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: own plugin without need for pom.xml
Posted by Stuart McCulloch <st...@jayway.net>.
On 15/12/2007, Peter Fischer <pf...@fast-mail.org> wrote:
>
>
> Hello,
>
> next question? ;)
>
> The DeployFileMojo uses a method getDeployer() of the AbstractDeployMojo
> class;
>
> I also tried to extend the AbstractDeployMojo class, but now getDeployer()
> returns only null.
> What do I wrong?
are you patching a local copy of the deploy plugin? (ie. you checked out the
deploy plugin source and have added your new mojo to the source folder...)
If not then you're probably hitting:
http://jira.codehaus.org/browse/MNG-3042
in your case the ArtifactDeployer @component is probably not being injected
best option is to build your mojo as part of the deploy plugin - use a
snapshot
or branch the version in the pom (this also makes it easier to contribute
back)
alternatively, where this isn't possible, you could consider:
http://www.ops4j.org/projects/pax/construct/maven-inherit-plugin
but I think it your case, it makes sense to work directly with the deploy
plugin...
regards,
> Peter
> --
> View this message in context:
> http://www.nabble.com/own-plugin-without-need-for-pom.xml-tp14318109s177p14339201.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
--
Cheers, Stuart
Re: own plugin without need for pom.xml
Posted by Peter Fischer <pf...@fast-mail.org>.
Hello,
next question? ;)
The DeployFileMojo uses a method getDeployer() of the AbstractDeployMojo
class;
I also tried to extend the AbstractDeployMojo class, but now getDeployer()
returns only null.
What do I wrong?
regards,
Peter
--
View this message in context: http://www.nabble.com/own-plugin-without-need-for-pom.xml-tp14318109s177p14339201.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: own plugin without need for pom.xml
Posted by Peter Fischer <pf...@fast-mail.org>.
Hello,
I use maven as build-tool and need many not mavenized equinox-bundles in an
internal project (gmf, ...). Upgrading to a new version of this set of
bundles is much stupid work.
struberg wrote:
>
> Peter, just out of curiosity: How do you decide which groupId, artifactId
> and versionId you should
> take for each jar?
>
You 'r right, the separation, of what is groupId and what is artifactId is
not included in the manifest-file. For me, I decided to use the whole
"Bundle-SymbolicName" for both.
"Bundle-Version" is used for the maven-version.
The greater problem is the dependency-version. For this, I have to deploy
all needed jars together, so that the version of the previously parsed
manifest-file of the needed jar is used.
I know that this is not the best solution, but for the moment it works.
But I don't know, if someone else would be interested in using this hack...
regards,
Peter
--
View this message in context: http://www.nabble.com/own-plugin-without-need-for-pom.xml-tp14318109s177p14337471.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: own plugin without need for pom.xml
Posted by Mark Struberg <st...@yahoo.de>.
Peter, just out of curiosity: How do you decide which groupId, artifactId and versionId you should
take for each jar?
txs,
strub
--- Wayne Fay <wa...@gmail.com> schrieb:
> Peter, I hope you will consider donating this plugin to the Mojo
> project. A number of people have asked about this exact thing on this
> list in the last year or so.
>
> Wayne
>
> On 12/13/07, Mark Struberg <st...@yahoo.de> wrote:
> > Simply add
> >
> > @requiresProject false
> >
> > to your mojo.
> > An example of this usage can e.g. be found in the maven-archetype-plugin.
> > LieGrü,
> > strub
> >
> > --- Peter Fischer <pf...@fast-mail.org> schrieb:
> > > Hello,
> > >
> > > I want to write my own deploy-plugin, which takes a directory and deploys
> > > all contained jars.
> > > In this scenario, I don't need a pom.xml like for "mvn deploy:deploy-file
> > > ...".
> > >
> > > But if I use my own plugin, maven shows me the error:
> > >
> > > [INFO] Cannot execute mojo: bundlesdeploy. It requires a project with an
> > > existing pom.xml, but the build is not using one.
> > >
> > > How can I avoid this error?
> > >
> > > regards,
> > > Peter
__________________________________ Ihr erstes Baby? Holen Sie sich Tipps von anderen Eltern. www.yahoo.de/clever
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: own plugin without need for pom.xml
Posted by Wayne Fay <wa...@gmail.com>.
Peter, I hope you will consider donating this plugin to the Mojo
project. A number of people have asked about this exact thing on this
list in the last year or so.
Wayne
On 12/13/07, Mark Struberg <st...@yahoo.de> wrote:
> Simply add
>
> @requiresProject false
>
> to your mojo.
>
> An example of this usage can e.g. be found in the maven-archetype-plugin.
>
>
> LieGrü,
> strub
>
> --- Peter Fischer <pf...@fast-mail.org> schrieb:
>
> >
> > Hello,
> >
> > I want to write my own deploy-plugin, which takes a directory and deploys
> > all contained jars.
> > In this scenario, I don't need a pom.xml like for "mvn deploy:deploy-file
> > ...".
> >
> > But if I use my own plugin, maven shows me the error:
> >
> > [INFO] Cannot execute mojo: bundlesdeploy. It requires a project with an
> > existing pom.xml, but the build is not using one.
> >
> > How can I avoid this error?
> >
> > regards,
> > Peter
> > --
> > View this message in context:
> > http://www.nabble.com/own-plugin-without-need-for-pom.xml-tp14318109s177p14318109.html
> > Sent from the Maven - Users mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>
>
> Jetzt Mails schnell in einem Vorschaufenster überfliegen. Dies und viel mehr bietet das neue Yahoo! Mail - www.yahoo.de/mail
>
> ---------------------------------------------------------------------
> 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
RE: own plugin without need for pom.xml
Posted by Peter Fischer <pf...@fast-mail.org>.
Hello,
struberg wrote:
>
> Simply add
>
> @requiresProject false
>
> to your mojo.
>
> An example of this usage can e.g. be found in the maven-archetype-plugin.
>
>
> LieGrü,
> strub
>
This works fine. Thank you!
regars,
Peter
--
View this message in context: http://www.nabble.com/own-plugin-without-need-for-pom.xml-tp14318109s177p14318910.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: own plugin without need for pom.xml
Posted by Mark Struberg <st...@yahoo.de>.
Simply add
@requiresProject false
to your mojo.
An example of this usage can e.g. be found in the maven-archetype-plugin.
LieGrü,
strub
--- Peter Fischer <pf...@fast-mail.org> schrieb:
>
> Hello,
>
> I want to write my own deploy-plugin, which takes a directory and deploys
> all contained jars.
> In this scenario, I don't need a pom.xml like for "mvn deploy:deploy-file
> ...".
>
> But if I use my own plugin, maven shows me the error:
>
> [INFO] Cannot execute mojo: bundlesdeploy. It requires a project with an
> existing pom.xml, but the build is not using one.
>
> How can I avoid this error?
>
> regards,
> Peter
> --
> View this message in context:
> http://www.nabble.com/own-plugin-without-need-for-pom.xml-tp14318109s177p14318109.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Jetzt Mails schnell in einem Vorschaufenster überfliegen. Dies und viel mehr bietet das neue Yahoo! Mail - www.yahoo.de/mail
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org