New user of Ant: Using ant 1.4.1 to compile java code,
with SDK 1.4.2_06
Two of the projects I deliver were recently named with a '.' in the
pathname
e.g. /vob/MyVob/SubSystems/Special
Project/SpecialProject.ExportedServices/,
and the javac call now fails to include the java code, at least with
the syntax as below:.
<javac srcdir="M:\MyView\MyVob\SubSystems\Special Project" >
<includes name="SpecialProject.ExportedServices/**/*.java" />
</javac>
The file scanner syntax that works for other projects seems to skip
over these files.
Question: Are there special characters or pattern rules or limitations
not mentioned
in the Ant ref that the filescanner responds to?
Are there escape characters I can use that would allow the '.' ?
Or do I prevail on programmers not to use blanks or dots in the
pathname ?
Thanks,
Dave
jfbriere - 18 Nov 2005 21:02 GMT
Hi,
First of all, the script element that you show cannot work in any case.
It's either:
<javac srcdir="M:\MyView\MyVob\SubSystems\Special Project"
includes="SpecialProject.ExportedServices/**/*.java"
/>
or:
<javac srcdir="M:\MyView\MyVob\SubSystems\Special Project" >
<include name="SpecialProject.ExportedServices/**/*.java" />
</javac>
Having said that, it should work fine with ANT 1.4.1 and SDK 1.4.2.
I just tested it on my Windows XP Pro machine with a folder tree
that has spaces and dots in their folder names.
It worked perfectly well.
Maybe you should delete all the .class files before executing your
build
because it won't re-compile the .java files unless they have been
modified.
Regards