ant command from powershell – dot used as delimiter for parameter?

Question:

I’m trying to run an ant task which I’m invoking from a powershell script:

The $testsuite variable is a string which includes a dot character, e.g. “systemTest.All”, so:

My problem is that the dot seems to be interpreted as a delimiter (by powershell? Invoking from cmd works just fine), hence the “All” part gets treated as a ant target (among with clean compile run).

(The use of a dot in the testsuite name is not one of mine doings so that part I can not affect)

Do I need to qoute the ant argument, escape the dot in some way?

Br,
Pete

Answer:

Try this (but I can’t test it), run this directly w/o invoke-Expression:

Source:

ant command from powershell – dot used as delimiter for parameter? by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply