Click here to Skip to main content
15,890,897 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have installed and set variables in windows 7. but still I did not get where do I have to place the build.xml and how to code that. Can anyone explain this to me? when I run as ant option It saiy build successfull.here my build.xml code

XML
<?xml version="1.0" encoding="UTF-8"?>

<project>

    <target name="clean">
        <delete dir="build"/>
    </target>

    <target name="compile">
        <mkdir dir="build/classes"/>
        <javac srcdir="src" destdir="build/classes"/>
    </target>

    <target name="jar">
        <mkdir dir="build/jar"/>
        <jar destfile="build/jar/BankDemo.jar" basedir="build/classes">
            <manifest>
                <attribute name="Main-Class" value="oata.BankDemo"/>
            </manifest>
        </jar>
    </target>

    <target name="run">
        <java jar="build/jar/BankDemo.jar" fork="true"/>
    </target>

</project>
Posted
Comments
Shubhashish_Mandal 15-Jul-13 3:27am    
in yur ant script missing so many things. I did not find any default target settings, second one there are no dependency-target definition . Actually when you run the script it did nothing

1 solution

First of all, take a tour here: http://ant.apache.org/manual/index.html[^], and read it carefully.

In general you don't have any restriction where to put this xml. You need to run it. Well, you need to run an executive that will process the tasks. You can use the command line (see manual), but many IDEs like Eclipse have built-in executives for Ant (check here: http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2FgettingStarted%2Fqs-81_basics.htm[^]).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900