diff --git a/docs/faq.html b/docs/faq.html index 279ba0c3d..504077f52 100644 --- a/docs/faq.html +++ b/docs/faq.html @@ -165,15 +165,12 @@
- - - Why does Ant always recompile all my Java files? - - - |
- -- |
@@ -986,81 +964,6 @@ shell-prompt> cat < foo |
-
-
- I've used a <delete> task to delete
- unwanted
- SourceSafe control files (CVS files, editor backup files, etc.), but
- it doesn't seem to work; the files never get deleted. What's
- wrong?
-
-
- | ||||||||||||||||||
- -- |
+ + + How can I include national characters like German + umlauts in my build file? + + + | |||||||||
+ ++ |
+ + + Why does Ant always recompile all my Java files? + + + |
+ ++ |
+
+
+ I've used a <delete> task to
+ delete unwanted SourceSafe control files (CVS files, editor
+ backup files, etc.), but it doesn't seem to work; the files
+ never get deleted. What's wrong?
+
+
+ | ||||||||||||||||||
+ ++ |
- How can I include national characters like German
- umlauts in my build file?
+ ant failed to build my program via javac
+ even when I put the needed jars in an external
+ build.properties file and reference them by
+ pathelement or classpath refid .
| |||||||||
- |
- ant failed to build my program via javac
- even when I put the needed jars in an external
- build.properties file and reference them by
- pathelement or classpath refid .
+ Ant creates WAR files with a lower-case
+ web-inf or JAR files with a lower-case
+ meta-inf directory.
|
- |
In order to find out which files should be compiled, Ant
- compares the timestamps of the source files to those of the
- resulting .class
files. Opening all source files
- to find out which package they belong to would be very
- inefficient. Instead, Ant expects you to place your
- source files in a directory hierarchy that mirrors your
- package hierarchy and to point Ant to the root of this
- directory tree with the srcdir
attribute.
Say you have <javac srcdir="src"
- destdir="dest"/>
. If Ant finds a file
- src/a/b/C.java
, it expects it to be in package
- a.b
so that the resulting .class
- file is going to be dest/a/b/C.class
.
If your source-tree directory structure does not match your - package structure, Ant's heuristic won't work, and - it will recompile classes that are up-to-date. Ant is not the - only tool that expects a source-tree layout like this.
- -If you have Java source files that aren't declared to
- be part of any package, you can still use the <javac>
- task to compile these files correctly - just set the
- srcdir
and destdir
attributes to
- the actual directory the source
- files live in and the directory the class files should go into,
- respectively.
<delete>
task to delete
- unwanted
- SourceSafe control files (CVS files, editor backup files, etc.), but
- it doesn't seem to work; the files never get deleted. What's
- wrong?This is probably happening because, by default, Ant excludes
- SourceSafe control files (vssver.scc
) and certain other
- files from FileSets.
Here's what you probably did:
- - -You need to switch off the default exclusions, - and it will work:
-For a complete listing of the patterns that are excluded - by default, see the user - manual.
- -You need to tell the XML parser which character encoding + your build file uses, this is done inside the XML + declaration.
+ +By default the parser assumes you are using the UTF-8
+ encoding instead of your platform's default. For most Western
+ European countries you should set the encoding to
+ ISO-8859-1
. To do so, make the very first line
+ of you build file read like
In order to find out which files should be compiled, Ant
+ compares the timestamps of the source files to those of the
+ resulting .class
files. Opening all source files
+ to find out which package they belong to would be very
+ inefficient. Instead, Ant expects you to place your
+ source files in a directory hierarchy that mirrors your
+ package hierarchy and to point Ant to the root of this
+ directory tree with the srcdir
attribute.
Say you have <javac srcdir="src"
+ destdir="dest"/>
. If Ant finds a file
+ src/a/b/C.java
, it expects it to be in package
+ a.b
so that the resulting .class
+ file is going to be dest/a/b/C.class
.
If your source-tree directory structure does not match your + package structure, Ant's heuristic won't work, and + it will recompile classes that are up-to-date. Ant is not the + only tool that expects a source-tree layout like this.
+ +If you have Java source files that aren't declared to
+ be part of any package, you can still use the <javac>
+ task to compile these files correctly - just set the
+ srcdir
and destdir
attributes to
+ the actual directory the source
+ files live in and the directory the class files should go into,
+ respectively.
<delete>
task to
+ delete unwanted SourceSafe control files (CVS files, editor
+ backup files, etc.), but it doesn't seem to work; the files
+ never get deleted. What's wrong?This is probably happening because, by default, Ant excludes
+ SourceSafe control files (vssver.scc
) and certain other
+ files from FileSets.
Here's what you probably did:
+ + +You need to switch off the default exclusions, + and it will work:
+For a complete listing of the patterns that are excluded + by default, see the user + manual.
+ +unless="property"
as an attribute
@@ -573,33 +596,11 @@ shell-prompt> cat < foo
To get the files you want, focus on just the
<include>
patterns that would be necessary
to get them. If you find you need to trim the list that the
- <include>
elements
- produce, then use <exclude>
elements.
<include>
elements produce, then use
+ <exclude>
elements.
You need to tell the XML parser which character encoding - your build file uses, this is done inside the XML - declaration.
- -By default the parser assumes you are using the UTF-8
- encoding instead of your platform's default. For most Western
- European countries you should set the encoding to
- ISO-8859-1
. To do so, make the very first line
- of you build file read like
ant
failed to build my program via javac
even when I put the needed jars in an external
@@ -618,6 +619,25 @@ shell-prompt> cat < foo
trailing spaces.
web-inf
or JAR files with a lower-case
+ meta-inf
directory.No it doesn't.
+ +You may have seen these lower-case directory names in + WinZIP, but WinZIP is trying to be helpful (and fails). If + WinZIP encounters a filename that is all upper-case, it + assumes it has come from an old DOS box andchanges the case to + all lower-case for you.
+ +If you extract (or just check) the archive with jar, you + will see that the names have the correct case.
+