1 Reply Latest reply on Aug 29, 2006 3:54 PM by klouise80

    Building with Ant

    vlad.wic
      Hi,

      I try to build my application using Ant. Here is the fragment from build.xml:

      <java jar="${flex.mxmlc.jar}" fork="true">
      <arg line="-file-specs ${src.dir}/${app.name}.mxml"/>
      <arg line="-load-config ${flex.dist.config}"/>
      </java>

      When I run this, I get this error:

      [java] command line: Error: default arguments may not be interspersed with other options

      [java] Use 'mxmlc -help' for information about using the command line.

      When I do not use "-load-config" option, I get following:

      [java] defaults: Error: unable to open './flex-config.xml'

      What is wrong?

      Thanks.
      .Vlad.
        • 1. Re: Building with Ant
          klouise80
          I wasn't able to reproduce the first error you got. But the second error happens for me.
          Somehow, invoking mxmlc.jar from a directory other than the flex frameworks directory leads to an error where it's looking for files relative to flex frameworks.

          I got around this by specifying a dir to invoke the VM in.
          i.e

          <property name="flex.dir" value="c:\flex\sdk" />
          <property name="flex.mxmlc.jar" value="${flex.dir}/lib\mxmlc.jar" />
          <java jar="${flex.mxmlc.jar}" dir="${flex.dir}/frameworks" fork="true">
          <arg line="-file-specs ${src.dir}/${app.name}.mxml"/>
          </java>