Thankyou for your quick reply. Yes I am using maven 1.x only.

But I was able to make some progress but unfortunately found one more issue.
below is my maven goal

<goal name="maven-goal">
         <ant:echo> mohan in maven goal</ant:echo>
                 <ant antfile="build.xml" inheritrefs="true" 
target="ant-target">
                 </ant>

        </goal> 

and below is my build.xml:
<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE project [
 <!ENTITY sunny SYSTEM "sunny-sample.xml">
]>

<project name="tests" default="main" basedir=".">
<import file="level-2-build.xml"/>
<property file="test.properties"/>
<property file="test1.properties"/>
<property file="mohan.properties"/>
<!-- <property name="property" value="build.xml.property"/> -->

@sunny


 
  <target name="ant-target">
 
    <echo> "MOHAN" in ant target </echo>
        <echo> ${src} in mohan.properties</echo>
        <echo> ${sample} in test.propertes</echo>
        <echo> ${jars} </echo>
        <echo> ${property-level2} </echo>
  </target>

  

        
</project>

But when I execute the maven-goal I am getting the below error: 

Unexpected element "import"

But very thing working fine , when I remove the following segment from my
build.xml:

<!DOCTYPE project [
 <!ENTITY sunny SYSTEM "sunny-sample.xml">
]>

what I need to do achieve the same functionality ?





Wayne Fay wrote:
> 
>> I have a build.xml and maven.xml.  I am using the following goal into
>> maven.xml to call ant:target in build.xml
> 
> It sounds like you're talking about Maven1 which means you're
> essentially on your own. M1 is old, crusty, and not very many people
> on this list are still using it which means you'll have trouble
> getting good answers to your questions.
> 
> You should take this opportunity to update your build to the latest
> Maven2 release (with pom.xml files etc) rather than wasting time
> making an M1 build. And btw, Maven3 is expected to land in the
> (relatively) near future, too.
> 
> Wayne
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-do-I-convert-build.xml-into-maven.xml--tp26022041p26030087.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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

Reply via email to