Download ant zip file






















Ant is extremely flexible and does not impose coding conventions or directory layouts to the Java projects which adopt it as a build tool. Software development projects looking for a solution combining build tool and dependency management can use Ant in combination with Apache Ivy. Apache Ant 1. The Apache Ant team currently maintains two lines of development.

The 1. Both lines are based off of Ant 1. We recommend using 1. Apache AntUnit 1. This release fixes the antlib. This means that all its resources are removed or made read only and no further development will be done.

It also means that, if a community grows, the subproject could reactivated. Apache Ivy 2. It lets you manage your dependencies declared in an ivy. Apache IvyDE will contribute to the classpath of your Java project or you can make it retrieve your dependencies directly into your project.

Last but not least Apache IvyDE offer editors of ivy. The exclude or excludesfile attribute is used to specify the files you want to have excluded. This is also done with patterns. And finally with the defaultexcludes attribute, you can specify whether you want to use default exclusions or not.

Or, you may place within it nested file sets, or references to file sets. In this case basedir is optional; the implicit file set is only used if basedir is set. The ZIP file will only reflect the relative paths of files within each fileset. The Zip task and its derivatives know a special form of a fileset named zipfileset that has additional attributes described below. The Zip task also supports the merging of multiple zip files into the zip file.

This is possible through either the src attribute of any nested filesets or by using the special nested fileset zipgroupfileset. The update parameter controls what happens if the ZIP file already exists. When set to yes , the ZIP file is updated with the files specified. New files are added; old files are replaced with the new versions. When set to no the default the ZIP file is overwritten if any of the files that would be added to the archive are newer than the entries inside the archive.

Please note that ZIP files store file modification times with a granularity of 2 seconds. If a file is less than 2 seconds newer than the entry in the archive, Apache Ant will not consider it newer.

The whenempty parameter controls what happens when no files match. If skip the default , the ZIP is not created and a warning is issued. If fail , the ZIP is not created and the build is halted with an error. If create , an empty ZIP file explicitly zero entries is created, which should be recognized as such by compliant ZIP manipulation tools. Use the encoding attribute and set it to UTF8 to create zip files that can safely be read by Java.

For a more complete discussion, see below. Since Ant 1. Unfortunately there is no portable way to store these permissions. Ant uses the algorithm used by Info-Zip's implementation of the zip and unzip commands—these are the default versions of zip and unzip for many Unix -like systems. Please note that the zip format allows multiple files of the same fully-qualified name to exist within a single archive. This has been documented as causing various problems for unsuspecting users.

If you wish to avoid this behavior you must set the duplicate attribute to a value other than its default, add. Please also 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.

Traditionally the ZIP archive format uses CodePage as encoding for file name, which is not sufficient for many international character sets. Over time different archivers have chosen different ways to work around the limitation—the java. Ant has been offering the encoding attribute of the zip and unzip task as a way to explicitly specify the encoding to use or expect since Ant 1.

More recent versions of the ZIP specification introduce something called the language encoding flag which can be used to signal that a file name has been encoded using UTF Our interoperability tests with existing archivers didn't show any ill effects in fact, most archivers ignore the flag to date , but you can turn off the language encoding flag by setting the attribute useLanguageEncodingFlag to false on the zip task if you should encounter problems. The unzip task and similar tasks will recognize the language encoding flag and ignore the encoding set on the task if it has been found.

Most archivers ignore these extra fields. The fallbackToUTF8 attribute of zip can be used to create archives that use the specified encoding in the majority of cases but UTF-8 and the language encoding flag for filenames that cannot be encoded using the specified encoding.

The unzip task will recognize the Unicode extra fields by default and read the file name information from them, unless you set the optional attribute scanForUnicodeExtraFields to false. Below are some test results which may be superseded with later versions of each tool. If you are creating jars, then java. We recommend you set the encoding to UTF-8 and keep the language encoding flag enabled.

The flag won't help or hurt java.



0コメント

  • 1000 / 1000