ant javac include misses directory with dot

Discussion in 'Java' started by Dave, Nov 18, 2005.

  1. Dave

    Dave Guest

    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
     
    Dave, Nov 18, 2005
    #1
    1. Advertising

  2. Dave

    jfbriere Guest

    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
     
    jfbriere, Nov 18, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. z3
    Replies:
    0
    Views:
    503
  2. Ronald Fischer

    Ant javac : How to print classpath?

    Ronald Fischer, Sep 18, 2003, in forum: Java
    Replies:
    1
    Views:
    17,598
    Wayne Berke
    Sep 19, 2003
  3. John Green

    ant javac source alternative

    John Green, Dec 4, 2003, in forum: Java
    Replies:
    0
    Views:
    2,722
    John Green
    Dec 4, 2003
  4. sowbug
    Replies:
    4
    Views:
    1,106
    Tony Morris
    Jan 26, 2004
  5. Replies:
    6
    Views:
    251
    Thomas 'PointedEars' Lahn
    Dec 12, 2005
Loading...

Share This Page