Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#7 how to use fmpp.bat out of ant?

closed
None
5
2003-03-18
2003-03-18
Ralf Hauser
No

ant always put quotes around its agruments (see
http://ant.apache.org/manual/CoreTasks/exec.html and
http://ant.apache.org/manual/using.html#arg\)
When I use arg value, I have the following errors:
<<C:\Data\temp>fmpp "C:\data\temp\installing.en.ftl"
"-oC:\data\temp\out\installing.en.html"
"-D'lastGenerated: abc + online: false'"
Bad option: Syntax error in "data": Top-level entry
must be hash or directive

C:\Data\temp>fmpp "C:\data\temp\installing.en.ftl"
"-oC:\data\temp\out\installing.en.html"
'-D"lastGenerated: abc + online: false"'
Since you use output file option, you must give exactly
1 source file.>>

When I use the arg-line
<arg line="${in_file} -o${out_file} -D'lastGenerated:
abcd + online: false'"/>
I get <<build.xml:477: Execute failed:
java.io.IOException: CreateProcess: fmpp
C:\data\fmpp\installing.en.ftl
-oC:\data\fmpp\out\installing.en.html "-DlastGenerated:
abcd + online: false" error=2>>
So ant places the double quotes entirely different than
in the build.xml.

Als the next version unfortunately failed...
C:\Data\temp>fmpp "C:\data\temp\installing.en.ftl"
"-oC:\data\temp\out\installing.en.html"
-D'lastGenerated: abc + online: false'
Since you use output file option, you must give exactly
1 source file.

P.S.: I am aware that there are issues with arg in
general:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13678

Discussion

    • status: open --> closed
     
  • Logged In: YES
    user_id=546667

    In the first example, you have an two extra '-s. That would be
    "-
    DlastGenerated: abc + online: false"

    In the sond case, the
    problem is that you quote with apostrophe-quote character, but in Win
    terminal you should use ", and thus the line will be misinterpreted by the
    shell.

    These are the rules of the shell you use, and not the rules of
    fmpp. So I can't change these.

     
  • Logged In: YES
    user_id=546667

    In the first example, you have an two extra '-s. That would be
    "-
    DlastGenerated: abc + online: false"

    In the sond case, the
    problem is that you quote with apostrophe-quote character, but in Win
    terminal you should use ", and thus the line will be misinterpreted by the
    shell.

    These are the rules of the shell you use, and not the rules of
    fmpp. So I can't change these.

     
    • assigned_to: nobody --> ddekany