Fix ant build target to prevent infinite loops