I am trying to compile the canonical metamodel classes for some JPA entities using an ant script. I am using OpenJPA. I would like the generated files to be located in a subdirectory which, according to the OpenJPA documentation, I can do by specifying the -s option for javac. The way I am trying to do this right now is like this:
<compilerarg value="-s c:\buildfiles"/>
However, I keep getting an error that says:
javac: invalid flag: -s
Usage: javac <options> <source files>
If I do:
<compilerarg value="-version"/>
it tells me that I am using 1.6. And if I do:
<compilerarg value="-help"/>
it lists -s as a valid option. Does anybody have any advice on what I can do to accomplish what I'm trying to do? Thank you!
You have two args in there, with a space between them. You just need to separate them:
At the moment you're parsing the single arg "-s c:\buildfiles". If you run
you can verify this - you'll see something like: