In the end, I made a batch file to extract CLASSPATH from the ant file, and then ran java directly using this:
In my build.xml file:
<target name="printclasspath"> <pathconvert property="classpathProp" refid="project.class.path"/> <echo>${classpathProp}</echo> </target>
In another script called "run.sh":
export CLASSPATH=$(ant -q printclasspath | grep echo | cut -d \ -f 7):build java "$@"
It is no longer cross-platform, but at least it is relatively easy to use, and you can provide a .bat file that does the same thing as run.sh. This is a very short batch of script. This is not like moving the entire assembly into batch files for a specific platform.
I think this is a shame, not some kind of option in ant, thanks to which you could do something like:
ant -- arg1 arg2 arg3
mpirun uses this type of syntax; ssh can also use this syntax, I think.
Hugh Perkins Oct 12 2018-12-12T00: 00Z
source share