Search code examples
shellantcygwin

How to set the ant property "output.root" in shell?


I need to specify the ant property output.root from the Cygwin shell, as I'm unable to edit the build.xml. Currently, I am trying to export an environment variable, like

export output.root="/d/output".

But that gives me an error:

export: `output.root=/d/output': not a valid identifier

What am I doing wrong?


Solution

  • You must remove . from the variable name or replace it with _.

    Update

    Ant properties are not shell variables. You must specify ant properties in the command line of ant using -D:

    ant -Doutput.root="/d/output" target1