You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Roland Bali <ro...@gmail.com> on 2006/02/15 13:23:45 UTC
[m2] maven-antrun-plugin: Property problems
Hi,
I want to execute a Ant build script but none of the properties are found
when using Mavens antrun-plugin. If I run the script using Ant the first
property is displayed correctly. Is this a known bug or am I doing something
wrong?
<?xml version="1.0"?>
<project name="movlan-server" default="test">
<target name="test">
<echo message="${os.name}"/>
<echo message="${project.build.directory}"/>
</target>
</project>
The POM plugin part looks like this.
<ant antfile="${basedir}/src/main/misc/testbuild.xml" target="test"
inheritRefs="true"/>
I'm using:
Maven2: 2.0.2
maven-antrun-plugin: 1.1
OS: Windows 2000 and Mac OS X
Kind regards,
Roland
Re: [m2] maven-antrun-plugin: Property problems
Posted by Carlos Sanchez <ca...@apache.org>.
It's a known issue already filed in jira.
On 2/15/06, Roland Bali <ro...@gmail.com> wrote:
> I kind of solved my problems by adding the following lines before the
> <ant>-tag in the POM:
>
> <property name="project.build.directory" value="${project.build.directory
> }"/>
> <property name="os.name" value="${os.name}"/>
>
> This enables the properties in the Ant build script. But the question still
> remains why the "os.name" parameter is not available in the Ant script when
> called thru Maven.
>
> Kind regards,
> Roland
>
> On 2/15/06, Roland Bali <ro...@gmail.com> wrote:
> >
> > Hi,
> >
> > I want to execute a Ant build script but none of the properties are found
> > when using Mavens antrun-plugin. If I run the script using Ant the first
> > property is displayed correctly. Is this a known bug or am I doing something
> > wrong?
> >
> > <?xml version="1.0"?>
> > <project name="movlan-server" default="test">
> > <target name="test">
> > <echo message="${ os.name}"/>
> > <echo message="${project.build.directory}"/>
> > </target>
> > </project>
> >
> > The POM plugin part looks like this.
> >
> > <ant antfile="${basedir}/src/main/misc/testbuild.xml" target="test"
> > inheritRefs="true"/>
> >
> > I'm using:
> >
> > Maven2: 2.0.2
> > maven-antrun-plugin: 1.1
> > OS: Windows 2000 and Mac OS X
> >
> > Kind regards,
> > Roland
> >
>
>
--
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
-- The Princess Bride
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m2] maven-antrun-plugin: Property problems
Posted by Roland Bali <ro...@gmail.com>.
I kind of solved my problems by adding the following lines before the
<ant>-tag in the POM:
<property name="project.build.directory" value="${project.build.directory
}"/>
<property name="os.name" value="${os.name}"/>
This enables the properties in the Ant build script. But the question still
remains why the "os.name" parameter is not available in the Ant script when
called thru Maven.
Kind regards,
Roland
On 2/15/06, Roland Bali <ro...@gmail.com> wrote:
>
> Hi,
>
> I want to execute a Ant build script but none of the properties are found
> when using Mavens antrun-plugin. If I run the script using Ant the first
> property is displayed correctly. Is this a known bug or am I doing something
> wrong?
>
> <?xml version="1.0"?>
> <project name="movlan-server" default="test">
> <target name="test">
> <echo message="${ os.name}"/>
> <echo message="${project.build.directory}"/>
> </target>
> </project>
>
> The POM plugin part looks like this.
>
> <ant antfile="${basedir}/src/main/misc/testbuild.xml" target="test"
> inheritRefs="true"/>
>
> I'm using:
>
> Maven2: 2.0.2
> maven-antrun-plugin: 1.1
> OS: Windows 2000 and Mac OS X
>
> Kind regards,
> Roland
>