I had a problem that a certain step in Ant can only be performed if Java 1.5 is installed on the build computer. The jar file was used in the task definition, which was compiled using 1.5, so working with the 1.4 virtual machine will throw an IncompatibleClassVersion exception.
I have to find a solution, in the meantime, so that this task works on this particular project, which requires 1.4, but the question came to me. How can I avoid defining this task and completing this optional step if I don't have a specific version of java?
I can use "if" or "except" tags for the target tag, but they check if the property is set or not. I would also like to have a solution that does not require additional libraries, but I do not know if the built-in functions in the standard are enough for such a task.
source
share