bedpana.blogg.se

Apache ant fileset
Apache ant fileset




In this case, it includes the classes in the build folder and the jar files in the lib folder.įinally, the build targets to build the files.įirst of all, we create the build directory, if it does not exist, then, we execute the javac command (specifying jdk1.5 as our target compilation). The master-classpath holds the classpath information. The clean target, as the name suggests, deletes the files in the build folder. But first, let us look at the clean target.

apache ant fileset

The default target of our project is the compile target. In this example, the src.dir refers to the source folder of the project. As shown in the above example, the build.dir property makes a reference to the web.dir property. Properties can refer to other properties. Web.dir refers to the web source folder of the project, where you can find the JSPs,web.xml, css, javascript and other web related filesīuild.dir refers to the output folder of the project compilation.

apache ant fileset

Src.dir refers to the source folder of the project, where the java source files can be found. Let us consider it piece by piece.įirst, let us declare some properties for the source, web, and build folders. Here is the build.xml required for this project. Volume serial number is 00740061 EC1C:ADB1 This project forms the Hello World Fax Application for the rest of this tutorial. The java class files are stored in the WEB-INF\classes folder.

apache ant fileset

The third party jar files are stored in the lib folder. The Java Server Pages (JSPs) are stored in the jsp folder. The images, js, META-INF, styles (css) are stored in the war folder. The java source code is stored in the src folder. The database scripts are stored in the db folder. The aim of this chapter is to build an Ant file that compiles the java classes and places them in the WEB-INF\classes folder.Ĭonsider the following project structure − Now that we have learnt about the data types in Ant, it is time to put that knowledge into practice.






Apache ant fileset