You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Thanh T." <ti...@gmail.com> on 2006/02/21 19:24:06 UTC
Java Plugin Example
Hi All,
I am having a hard time reading POM properties can anyone give me an
example of how to read properties in pom.xml?
--
Thanh T.ICQ #: 10381946
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Java Plugin Example
Posted by Alexandre Poitras <al...@gmail.com>.
Yup but you can also use an EL-similar syntax like
${project.version}... so your Mojo work more in a IoC fashion. But
don't forget get the actual date type for a particular property from
the Project descriptor reference page.
On 2/21/06, dan tran <da...@gmail.com> wrote:
> add this to your mojo
>
> /**
> * @parameter expression="${project}"
> * @required
> * @readonly
> */
> protected MavenProject project;
>
> and project is presentation of your POM.
>
> -D
>
>
> On 2/21/06, Thanh T. <ti...@gmail.com> wrote:
> >
> > Hi All,
> > I am having a hard time reading POM properties can anyone give me an
> > example of how to read properties in pom.xml?
> >
> > --
> > Thanh T.ICQ #: 10381946
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>
--
Alexandre Poitras
Québec, Canada
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Java Plugin Example
Posted by dan tran <da...@gmail.com>.
add this to your mojo
/**
* @parameter expression="${project}"
* @required
* @readonly
*/
protected MavenProject project;
and project is presentation of your POM.
-D
On 2/21/06, Thanh T. <ti...@gmail.com> wrote:
>
> Hi All,
> I am having a hard time reading POM properties can anyone give me an
> example of how to read properties in pom.xml?
>
> --
> Thanh T.ICQ #: 10381946
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>