Simple ant file


















This example program shows how to create the JAR file after building all the java files. We are setting base directory as the current directory by just giving. The default attribute is used for setting the starting point for the ANT script.

We call a seperate task as target. We can define as many number of targets inside a build file. If we closely look into the build file, we have many number of targets based its operations. Pushpendu Mondal. Ridhi Arora. Manish Gupta. Ant - Build Files Advertisements. Previous Page. Next Page. Useful Video Courses. More Detail. Anatomy of Floering Plant 19 Lectures 2. Morphology of Flowering Plants 30 Lectures 1. Determinants 65 Lectures 6. The default target of our project is the compile target.

But first let us look at the clean target. The master-classpath holds the classpath information. In this case, it includes the classes in the build folder and the jar files in the lib folder.

Finally, the build target to build the files. First of all, we create the build directory, if it does not exist. Then we execute the javac command specifying jdk1. We supply the source folder and the classpath to the javac task and ask it to drop the class files in the build folder. Executing Ant on this file compiles the java source files and places the classes in the build folder.



0コメント

  • 1000 / 1000