Hi,
Add this to your mojo:
/**
* @parameter expression="${project}"
* @readonly
*/
private MavenProject project;
See guides about plugin development in
http://maven.apache.org/guides/index.html
Regards,
Jan
-----Original Message-----
From: Jiaqi Guo [mailto:[EMAIL PROTECTED]
Sent: Monday, February 12, 2007 11:22 PM
To: [email protected]
Subject: Can I get MavenProject instance of plugin itself within a Mojo?
I need some of the maven2 plugin's dependencies during execute() method
of a Mojo. In maven1 there's ${plugin.get...} that I can use in jelly
script, how can I do similar thing in maven2 Mojo class? Thanks in
advance.
I've tryed printing out getPluginContext() but it seems to return empty
Map.
Regards
--
Jiaqi Guo
http://www.cyclopsgroup.org
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Tento e-mail je urcen pouze pro jeho adresata/adresaty a muze obsahovat duverne
informace, jejichz ochrana muze byt vyzadovana pravnimi predpisy.
Jestlize jste zpravu obdrzel(a) omylem, neprodlene informujte jejiho
odesilatele a tuto zpravu, jeji prilohy a pripadne kopie ihned vymazte.
Jakakoli forma uziti, zverejneni, reprodukce, kopirovani, distribuce a sireni
teto zpravy je v takovem pripade zakazana.
Komercni banka, a.s., neodpovida za mozne skody zpusobene neuplnym prenosem,
moznou modifikaci ci zpozdenim teto zpravy behem prenosu od odesilatele k
adresatovi.
This e-mail transmission is intended solely for the ordinary user of the e-mail
address to which it was addressed. It may contain legally privileged and/or
confidential information.
If you have received this e-mail in error or are not an intended recipient
please inform the sender with-out delay and delete this e-mail, attachments and
possible copies immediately. The unauthorised use, disclosure, distribution
and/or copying of this e-mail or any information it contains is prohibited.
Komercni banka, a. s., does not accept liability for any damage caused by
incomplete transmission, possible modification or delay of this e-mail during
the transmission from the sender to the recipient.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]