Add water to raise the moisture level and add a liberal quantity of garden lime to where the ants are gathering. This should discourage them. To eradicate vinegar flies, slow your rate of feeding to what the worms will eat on a daily basis. Should you experience any influx of maggots, it will most likely be the soldier fly or vinegar fly larvae. The soldier fly larvae grow up to an inch big starting out white but soon turning dark gray with distinct ribbing bands.
Fishermen say they make great bait.
Don't be too alarmed if they appear. They are actually beneficial to the waste breakdown. If you want to remove them though, do so by liberally applying lime, or placing bread soaked in milk on the surface of the compost. Larvae love bread and should infest it. Remove the bread after 2-3 days and dispose of it.