how to get a value from pom file in ant

hi this is my pom file

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>mycompany.com</groupId>
        <artifactId>mercury</artifactId>
        <version>1249</version>
    </parent>

    <groupId>mycompany.com.tools.mm</groupId>
    <artifactId>parent</artifactId>
    <version>1249</version>
    <packaging>pom</packaging>
    <name>parent</name>
    <description>The parent to all MM projects</description>

    <properties>
        <mercury.version>@product.version@</mercury.version>
        <abc.version>7.0</abc.version>
    <metamodel.test>true</metamodel.test>
    </properties>
</project>

in ant i want to get value of abc.version> i am writing this code

<artifact:pom id="mypom" file="C:\work\build\pom.template.xml" />

<echo>The version is ${mypom.properties.version}</echo>

but it is not working,can anyone help please

Answers


You should change it to :

<echo>The version is ${mypom.properties.abc.version}</echo>

Need Your Help

why the database table TABLES.table_rows column does not match select count(*) from the physical table in MySQL

mysql database count information-schema

When comparing the information_schema.TABLES.table_rows column to the physical row count retrieved from the "SELECT count(*) from " the numbers do not match. Why are the row counts different?

Decreasing space taken by navigation drawer icon

android android-actionbar navigation-drawer

My action bar has navigation drawer and profile image icon.I want to decrease the space between navigation drawer icon and profile image icon but navigation drawer icon takes fixed space even if i