Totel:26 Click:
1
2 3 4 5 6
ANT Interview Questions And Answers
Page 1
Questions 1 Give Example How we can deploy file on server using ant?
Answer
<?xml version="1.0" ?>
<project name="ProjectName" default="deploy">
..................
................
<target name="deploy" depends="compile,doc" >
<jar destfile="dist/project.jar"
basedir="build/classes"/>
<ftp server="${server.name}"
userid="${ftp.username}"
password="${ftp.password}">
<fileset dir="dist"/>
</ftp>
</target>
............
........
</project>
Questions 2 What is Core Concepts of Ant?
Answer
The core concepts of Ant as
XML format:Ant uses XML files called build files to describe how to build, test, and deploy an
application
Declarative syntax:Ant is declarative. Rather than spelling out the details of every stage in the build process
A build file contains one project:Each XML build file includes how to build, test, and deploy one project. Very large
projects may be composed of multiple smaller projects, each with its own build file.
A higher-level build file can coordinate the builds of the subprojects.
Each project contains multiple targets:Within the single project of a build file, you declare the different targets for the build
process. These targets may represent actual outputs of the build, such as a redistributable
file, or stages in the build process, such as compiling source or deploying the
redistributable file to a remote server.
Targets can have dependencies on other targets:When declaring a target, you can declare which targets have to be built first. This
ensures that the source gets compiled before the redistributables are built, and that
the redistributable is built before the remote deployment.
Targets contain tasks:Inside targets you declare what actual work is needed to complete that stage of the
build process. You do this by listing the tasks that constitute each stage. Each task is
actually a reference to a Java class, built into Ant or an extension library, that understands
the parameters in the build file and can execute the task based upon the
parameters. These tasks are expected to be smart—to handle much of their own argument
validation, dependency checking, and error reporting.
New tasks can easily be added in Java:The fact that it is easy to extend Ant with new classes is one of its core strengths
Questions 3 Why Ant is a great build tool?
Answer
Ant is great build tool due to following reason:
1.Ant is a Java-based build tool designed to be cross-platform, easy to use, extensible,and scalable.
2.Ant can be used in a small personal project as well as ant can be used in a large,multi-team software project.
3.Ant syntax is very easy to learn.
4.Ant syntax used XML format .We need only specifies our task only on build.xml file.
5.Ant is easy to use .eliminating the full-time make file engineer common on large Make-based software projects.
6.It Hadlee's Java class-paths and file directory structure in a portable manner.It hand's it as cross-platform.
7.Ant is very fast.Java routines such as compiler or code make a jar file can start inside the Ant JVM.This reduce process of start up delay .Ant tasks are also designed to do dependency checking to avoid doing any more work than necassery.
8.Ant integrate tightly with the JUnit test frameworks for XP-style using tseting.
9.An Ant is easily extensible using Java.
10. Ant Ant has built-in support for J2EE development, Such as EJB compilation and packaging.
11.Ant addresses the deployment problems of Java project such as FTP,Telnet,application servers,SQL commands; all can used for automated deployment.
12.Ant is the de facto standard (is a standard formal or informal) for most open source Java projects,Such as Apache Tomcat and Apache Xerces. Many application servers even ship with embedded version of Ant for deployment.
13.As Ant understands testing and deployment,I can be used for a unified build-test-deploy process, by a single command or by use of Ant-aware Java IDE, such as NetBeans,Eclipse IDEA, and jEdit.
14.Ant can be used to control team works together to build and deploy Java project easily.
Questions 4 What is IVY?
Answer
Ivy is a popular dependency manager .IVY is basically focused on flexibility and simplicity.
The latest version of Ivy is 2.1.0.
Key features of the 2.1.0 release are
•The Key features of Ivy is enhanced Maven2 compatibility, with several bug fixes and more pom features covered.
•new options for the Ivy Ant tasks and commandline
•configuration intersections and configuration groups
•numerous bug fixes & improvements as documented in Jira and in the release notes
Questions 5 What is advantage of Ant 1.7.1 ?
Answer
Ant 1.7.1 is mainly a bugfix release.
Ant 1.7.1 has extended support for Java6 features.
Ant 1.7.1 <script> now has support for JavaFX.
Goto Page:
1
2 3 4 5 6
ANT Objective Questions And Answers
ANT Objective Questions And Answers
ANT Interview Questions And Answers
ANT Subjective Questions And Answers
R4R,ANT Objective, ANT Subjective, ANT Interview Questions And Answers,ANT,ANT Interview,ANT Questions ,ANT Answers