Starfleet is, we are told again and again, not a military organization. That being said, they are the group that the Federation turns to in times of war, and they have gone to war on several significant occasions, sometimes during terribly destructive and prolonged conflicts.
But in these times of war, it seems like we only ever hear of starships and away teams doing battle, never dedicated infantry combat. The answers to other questions on this site indicate that Starfleet includes all branches of the "Federation military," and the M.A.C.O. units do imply some land-based forces, but even they seem like a very small force for a (proto-)galactic civilization.
Has there ever been any mention of a protracted land war in Federation history? Do they simply not need a large-scale army, given the capabilities of their starships? Or have land battles been mentioned, and we are left to wonder how exactly they were waged?