Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 987593
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T05:30:16+00:00 2026-05-16T05:30:16+00:00

I would like to learn Ant. Can anyone recommend some good learning resources about

  • 0

I would like to learn Ant. Can anyone recommend some good learning resources about this topic? Any resource is appreciated, from online introductory tutorials to in-depth books.

Thanks for your help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T05:30:17+00:00Added an answer on May 16, 2026 at 5:30 am
    1. ant.apache.org. Look at the manual.
    2. Ant Best Practices

    Won’t take long – Ant’s not hard.

    Here’s a sample, fairly reusable build.xml you can start with. It’s generic enough for me to reuse. The directory naming convention should be easy to follow. I use a layout that mimics the output from IntelliJ.

    <?xml version="1.0" encoding="UTF-8"?>
    <project name="xslt-converter" basedir="." default="package">
    
        <property name="version" value="1.6"/>
        <property name="haltonfailure" value="no"/>
    
        <property name="out" value="out"/>
    
        <property name="production.src" value="src"/>
        <property name="production.lib" value="lib"/>
        <property name="production.resources" value="config"/>
        <property name="production.classes" value="${out}/production/${ant.project.name}"/>
    
        <property name="test.src" value="test"/>
        <property name="test.lib" value="lib"/>
        <property name="test.resources" value="config"/>
        <property name="test.classes" value="${out}/test/${ant.project.name}"/>
    
        <property name="exploded" value="out/exploded/${ant.project.name}"/>
        <property name="exploded.classes" value="${exploded}/WEB-INF/classes"/>
        <property name="exploded.lib" value="${exploded}/WEB-INF/lib"/>
    
        <property name="reports.out" value="${out}/reports"/>
        <property name="junit.out" value="${reports.out}/junit"/>
        <property name="testng.out" value="${reports.out}/testng"/>
    
        <path id="production.class.path">
            <pathelement location="${production.classes}"/>
            <pathelement location="${production.resources}"/>
            <fileset dir="${production.lib}">
                <include name="**/*.jar"/>
                <exclude name="**/junit*.jar"/>
                <exclude name="**/*test*.jar"/>
            </fileset>
        </path>
    
        <path id="test.class.path">                            
            <path refid="production.class.path"/>
            <pathelement location="${test.classes}"/>
            <pathelement location="${test.resources}"/>
            <fileset dir="${test.lib}">
                <include name="**/junit*.jar"/>
                <include name="**/*test*.jar"/>
            </fileset>
        </path>
    
        <path id="testng.class.path">
            <fileset dir="${test.lib}">
                <include name="**/testng*.jar"/>
            </fileset>
        </path>
    
        <available file="${out}" property="outputExists"/>
    
        <target name="clean" description="remove all generated artifacts" if="outputExists">
            <delete dir="${out}" includeEmptyDirs="true"/>
            <delete dir="${reports.out}" includeEmptyDirs="true"/>
        </target>
    
        <target name="create" description="create the output directories" unless="outputExists">
            <mkdir dir="${production.classes}"/>
            <mkdir dir="${test.classes}"/>
            <mkdir dir="${reports.out}"/>
            <mkdir dir="${junit.out}"/>
            <mkdir dir="${testng.out}"/>
            <mkdir dir="${exploded.classes}"/>
            <mkdir dir="${exploded.lib}"/>
        </target>
    
        <target name="compile" description="compile all .java source files" depends="create">
            <!-- Debug output
                    <property name="production.class.path" refid="production.class.path"/>
                    <echo message="${production.class.path}"/>
            -->
            <javac srcdir="src" destdir="${out}/production/${ant.project.name}" debug="on" source="${version}">
                <classpath refid="production.class.path"/>
                <include name="**/*.java"/>
                <exclude name="**/*Test.java"/>
            </javac>
            <javac srcdir="${test.src}" destdir="${out}/test/${ant.project.name}" debug="on" source="${version}">
                <classpath refid="test.class.path"/>
                <include name="**/*Test.java"/>
            </javac>
        </target>
    
        <target name="junit-test" description="run all junit tests" depends="compile">
            <!-- Debug output
                    <property name="test.class.path" refid="test.class.path"/>
                    <echo message="${test.class.path}"/>
            -->
            <junit printsummary="yes" haltonfailure="${haltonfailure}">
                <classpath refid="test.class.path"/>
                <formatter type="xml"/>
                <batchtest fork="yes" todir="${junit.out}">
                    <fileset dir="${test.src}">
                        <include name="**/*Test.java"/>
                    </fileset>
                </batchtest>
            </junit>
            <junitreport todir="${junit.out}">
                <fileset dir="${junit.out}">
                    <include name="TEST-*.xml"/>
                </fileset>
                <report todir="${junit.out}" format="frames"/>
            </junitreport>
        </target>
    
        <taskdef resource="testngtasks" classpathref="testng.class.path"/>
        <target name="testng-test" description="run all testng tests" depends="compile">
            <!-- Debug output
                    <property name="test.class.path" refid="test.class.path"/>
                    <echo message="${test.class.path}"/>
            -->
            <testng classpathref="test.class.path" outputDir="${testng.out}" haltOnFailure="${haltonfailure}" verbose="2" parallel="methods" threadcount="50">
                <classfileset dir="${out}/test/${ant.project.name}" includes="**/*.class"/>
            </testng>
        </target>
    
        <target name="exploded" description="create exploded deployment" depends="testng-test">
            <copy todir="${exploded.classes}">
                <fileset dir="${production.classes}"/>
            </copy>
            <copy todir="${exploded.lib}">
                <fileset dir="${production.lib}"/>
            </copy>
        </target>
    
        <target name="package" description="create package file" depends="exploded">
            <jar destfile="${out}/${ant.project.name}.jar" basedir="${production.classes}" includes="**/*.class"/>
        </target>
    
    </project>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to learn more about C++0x. What are some good references and
I would like to learn how to use TFS2010, but I can't find any
I would like to learn about streams in C++. I have done some googling
Hi I would like to learn and develop applications for iPhone. Can some one
This can easily be scripted, but I would like to learn how to do
I would like to learn SSIS 2008. can any one guide me to get
I would like to learn how I can use nested template tags where the
I would like to learn the basic usage of SOAP through this ( weather
I would like to learn about linux/Unix kernel programming for scalable multi processors (smps).
hi every now i would like to learn one cource.i think to learn any

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.