Javed,
    Thanks. This returns 'mykey' and all the other properties declared
in the parent pom (s). For example If I have - 

parent pom.xml - 
<properties>
    <one>1</one>
    ...........
</properties>
..............


    I want to get _only_ 'mykey' and not 'one' etc.

Thanks in Advance
Anita


To get properties in M2 try adding the properties tag in your POM :

<properties>
  <mykey>valuehere</myKey>
</properties>

You can refer to the
http://maven.apache.org/ref/2.0.3-SNAPSHOT/maven-model/maven.html#class_prerequisitesmodel

Hope that helps,
       Javed

On 5/16/06, anita kulshreshtha <[EMAIL PROTECTED]> wrote:
>
> Hi,
>    Is it possible to get only the properties declared in a pom.xml
> inside a mojo? An example -
>
> pom.xml -
>   ..........
>   <key>value</key>
> .................
>
>
>
> MyMojo :
> ..................
> ..................
> project.getProperties();
> .......................
>
>     This returns all the properties from the parent pom as well. Is
> there a way to get just the list declared in the pom.xml? I can not
use
> the project.properties.key because the name of the property is not
> known.
>
> Thnaks in Advance
> Anita
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to