Its content is completely ignored unless you set the index attribute of the task to true. The index created by this task will contain indices for the archives contained in this path, the names used for the archives depend on your manifest:. This task will not create any index entries for archives that are empty or only contain files inside the META-INF directory unless the indexmetainf attribute has been set to true.
The nested indexjarsmapper element can be used to perform custom filename transformations for the archives specified by indexjars if the default filename transformation doesn't suffice. The nested service element specifies a service. Services are described in the service provider overview. ScriptEngineFactory which can include implementation class names, one per line usually just one per JAR. The name of the service is set by the type attribute. The classname implementing the service is the the provider attribute, or if one wants to specify a number of classes that implement the service, by provider nested elements.
Files with the name Test. Create an executable jar file with a main class com. This is an example of an inline manifest specification including the version of the build program Implementation-Version.
Note that the Built-By attribute will take the value of the Ant property user. The manifest produced by the above would look like this:. The following shows how to create a jar file specifying a service with an implementation of the scripting interface:. The following shows how to create a jar file specifying a service with two implementations of the scripting interface:.
It defines on top of a JAR the possibility to place additional or overwriting classes in a jar, which are available according to the Java version you run. Not only store data but also compress them. Unless you set the keepcompression attribute to false , this will apply to the entire archive, not only the files you've added while updating. For entries coming from existing archives like nested zipfileset s or while updating the archive , keep the compression as it has been originally instead of using the compress attribute.
Since Ant 1. The character encoding to use for filenames inside the archive. It is not recommended to change this value as the created archive will most likely be unreadable for Java otherwise. See also the discussion in the zip task page. This can be either the location of a manifest, or the name of a jar added through a fileset. Valid values are skip , merge , and mergewithoutmain. Valid values are fail , skip , and create.
Valid values are add , preserve , and fail. Unless you specify additional jars with nested indexjars elements, only the contents of this jar will be included in the index. Prior to Apache Ant 1. You can define filename transformations by using a nested mapper element. The default mapper is the identity mapper. The untar task recognizes the long pathname entries used by GNU tar. Please note that different ZIP tools handle timestamps differently when it comes to applying timezone offset calculations of files.
Some ZIP libraries will store the timestamps as they've been read from the filesystem while others will modify the timestamps both when reading and writing the files to make all timestamps use the same timezone. A ZIP archive created by one library may extract files with "wrong timestamps" when extracted by another library. This means that using the unzip task on files created by Windows' compressed folders function may create files with timestamps that are "wrong", the same is true if you use Windows' functions to extract an Ant generated ZIP archive.
Extract all images from ant. Specify what happens if the base directory does not exist. Since Apache Ant 1. Makes this fileset a reference to a fileset defined elsewhere. If specified no other attributes or nested elements are allowed.
0コメント