ANT application (2)

xiaoxiao2021-03-06  124

4.1 FILE (Directory) class 4.1.1 MKDIR  Create a directory if his parent directory does not exist, will be created simultaneously.  Example:  Description: If Build does not exist, it will be created at the same time 4.1.2 COPY to copy a (group) file, directory  Example: 1. Copy single file: 2. Copy single file to the specified directory 3. Copy a directory to another directory 4. Copy a batch of files to the specified directory 5. Copy a batch of files to the specified directory, increase the file name.

BAK suffix 6 Copy a set of files to the specified directory, replace it with @ tag @ 内容 4.1.3 delete  Delete one (group) file or directory  Example 1. Delete a file 2 Delete the specified directory and its subdirectory 3. Delete the specified set of files 4. Delete the specified directory and its subdirectories, including his own 4.1.4 move  Move or rename a (group) file, Directory  Example: 1. Move or rename a file 2. Move or rename a file to another folder 3. Move a directory to another directory 4. Move a set of files to another directory 5. Increase during mobile files. BAK suffix 4.2 java related 4.2.1 javac  Compile Java original code  Example 1.

Compile all of the $ {src} directory and all of its subdirectory. Java file,. The class file will be placed in the directory specified by $ {build}, the classpath indicates the class file or directory you want to use, and the debug is set to ON to indicate the output debug information 2. Compile $ {src} and $ {src2} directory and its subdirectory All of the next. Java file, but package / p1 / **, mypackage / p2/ ** will be compiled, and mypackage / p1 / testpackage / ** will not be compiled. The Class file will be placed in the directory specified by $ {build}, the classpath indicates that the class file or directory you want to use, and the debug is set to ON to indicate the output DEBUG information 3.

The path is 4.2.2 java  in Property, executes the specified Java class  Example: 1.

ClassName specifies the class to be executed, and the classpath sets the environment variable 2 to use.

4.3 Packing Related 4.3.1 JAR  Pack a set of files  Example: 1.

Pack all the files below $ {build} / classes to $ {dist} /lib/app.jar 2.

Pack all the files below $ {build} / classes to $ {dist} /lib/app.jar, but including mypackage / test / all files do not include all Test.class 3.

The manifest property specifies its own meta-inf / manifest.mf file, not by the system to generate 4.3.2 war  For JAR's extension, used to pack web applications  Example:  Suppose our file directory is as follows: thirdParty / libs / jdbc1 .jar thirdparty / libs / jdbc2.jar build / main / comb / myco / myapp / servlet.class src / metadata / myapp.xml src / html / myapp / index.html src / jsp / myapp / front.jsp SRC / Graphics /Images/gifs/small/logo.gif src / graphics / images / gifs / large / logo.gif  The following is the content of our task:

 After completion: Web-inf / web.xml web-inf / lib / jdbc2.jar web-inf / class / com / myco / myapp / servlet.class meta-inf / manifest.mf index.html Front.jsp Images / small / logo.gif images / large / logo.gif 4.3.3 EAR  For packaging companies Apps  Example

转载请注明原文地址:https://www.9cbs.com/read-98914.html

New Post(0)