1

I'm trying to build an eclipse plugin from console which works fine. Now I want to add a parameter to the ant script. I looked it up and and read here that I can pass an arbitary parameter like this:

 -D{paramName} {paramValue}

Also the official documentation says I can put it after the -application parameter. It states:

Note that the parameters appearing after the application are the parameters that are passed to Ant.

This is my build script which runs fine if I do not specify the additional custom -DeclipseLocation parameter.

java
-jar C:\Eclipse_3.7.2_WIN32\plugins\org.eclipse.equinox.launcher_1.2.0.v20110502.jar
-application org.eclipse.ant.core.antRunner -DeclipseLocation "D:\Program Files\Eclipse_3.7.2_WIN32" -buildfile  D:\build.xml

When running I get the an error message that says

Unknown Argument: -DeclipseLocation
Unknown Target: "D:\Program Files\Eclipse_3.7.2_WIN32
No known target specified

So what am I doing wrong. How can I pass custom parameters to my ant build here?

Community
  • 1
  • 1
Markus
  • 1,452
  • 2
  • 21
  • 47

1 Answers1

1

The format is

-D{paramName}={paramValue}

You must have an '=' between the name and the value

greg-449
  • 109,219
  • 232
  • 102
  • 145