ant javac include misses directory with dot

D

Dave

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
 
J

jfbriere

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,829
Latest member
PIXThurman

Latest Threads

Top