You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Siegmann Daniel, NY" <Da...@fja-us.com> on 2006/03/07 17:48:14 UTC

[M2] Passing properties to ant script

I am converting a large and complex project from Ant to Maven2. I am reusing
part of the existing ant script to build a Jar file for deployment on a
WebSphere Application Server. The existing Ant script has many properties
defined which describe the structure of the project, but many of these are
redundant - Maven already knows base directory, source directory, and so on.

I know M2 doesn't have project.properties, but are there existing properties
which contain this information? If not, how do I pass this information to
Ant using the antrun plugin?

--
Daniel Siegmann
FJA-US, Inc.
(212) 840-2618 ext. 139

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [M2] Passing properties to ant script

Posted by Roland Bali <ro...@gmail.com>.
Hi Daniel,

This is a example from a POM of mine:

<property name="project.version" value="${project.version}"/>
<ant antfile="${basedir}/src/main/misc/build.xml"/>

It creates the variable project.version inside the Ant script.

This parameter should be available to the Ant script but isn't because
of a bug (if I'm not mistaken). Anyway this setup works for me.

/Roland

On 3/7/06, Siegmann Daniel, NY <Da...@fja-us.com> wrote:
> I am converting a large and complex project from Ant to Maven2. I am reusing
> part of the existing ant script to build a Jar file for deployment on a
> WebSphere Application Server. The existing Ant script has many properties
> defined which describe the structure of the project, but many of these are
> redundant - Maven already knows base directory, source directory, and so on.
>
> I know M2 doesn't have project.properties, but are there existing properties
> which contain this information? If not, how do I pass this information to
> Ant using the antrun plugin?
>
> --
> Daniel Siegmann
> FJA-US, Inc.
> (212) 840-2618 ext. 139
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>