|
|
Now that we have learnt about the information types in Ant, it's time to place that information into action. we can build a venture on this chapter. The purpose of this chapter is to build an Ant record that compiles the java lessons and places them in the web-INFclasses folder.
Remember the following project structure:
This project forms the hello world Fax application for the rest of this tutorial.
Here is the build.xml required for this project. let us remember it piece by using piece.
First, let us declare some properties for the source, web, and build folders.
In this example:
Properties can talk to other properties. As proven inside the above example, the build.dir assets makes a reference to the web.dir property.
In this case, the src.dir refers to the supply folder of the project.
The default goal of our task is the complet target. but first allow us to examine the clean target.
The clean target, because the name shows, deletes the files inside the build folder.
The master-classpath holds the classpath data. In this situation, it includes the lessons inside the build folder and the jar files within the lib folder.
Finally, the build target to build the documents. to begin with, we create the construct listing, if it does not exist. Then we execute the javac command (specifying jdk1.5 as our target compilation). We supply the source folder and the classpath to the javac project and ask it to drop the class files within the build folder.
Executing Ant on this record compiles the java source documents and locations the classes within the build folder.
The following outcome is the result of running the Ant file:
The files are compiled and placed in the build.dir folder.
|
|
Apache Ant Related Practice Tests |
---|
Apache HBase Practice Tests |
All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.