1

I have a following command to build ProjectA;

build.bat release -Dinclude.dir="X/Source/Private/ProjectA/ivy.xml"

Where build.bat internally calls 'ant release -Dinclude.dir="X/Source/Private/ProjectA/ivy.xml"' and its WORKS OK.

Now as soon as I update above into following to pick all IVY projects from X directory it stops working and ANT throws error;

build.bat release -Dinclude.dir="X/**/ivy.xml"

Missing value for property include.dir

I debugged a little in batch script and it seems my batch is calling ant as follows if I apply error command;

ant release -Dinclude.dir=

Somehow batch/shell (same things happens if run on Linux with build.sh) are not able to interpret the value which contains '*' in them?

Am I missing anything?

SJunejo
  • 1,316
  • 4
  • 23
  • 39

1 Answers1

0

Here you go..

echo ^*^*
pause

and yields..

**
Press any key to continue

Change your line to be:

build.bat release -Dinclude.dir="X/^*^*/ivy.xml"

I think you maybe asking for the following ...

Pass, escape and recognize Special Character in Windows Batch File

If not...

I think you are running into a little known issue with Windows (DOS) wildcards..

Where you have:

build.bat release -Dinclude.dir="X/**/ivy.xml"

I think you need to replace with:

build.bat release -Dinclude.dir="X/??/ivy.xml"

With the ?? it is only two exact placeholders with wildcards. The asterisk is more all-encompassing. If you have more like a date, year, you need to do something like: ????-??-?? where it would represent: 2015-03-09 as an example... Hope this helps!

Community
  • 1
  • 1
Leptonator
  • 3,379
  • 2
  • 38
  • 51