Heck, even in the Trek universe, war is the exception when it comes to storytelling about hostile powers. In TOS, the Federation had a number of enemies, but there was only one episode where a formal, declared state of war existed, "Errand of Mercy." And that was put to a stop pretty promptly, with the rest of the series depicting a Cold War scenario with the Klingons. Some episodes were about preventing an initial attack from heating up into open war, mainly "Balance of Terror" and "Arena." In TNG, we met the Cardassians a year after a peace treaty had been signed, and the stories involving them were mainly about espionage and political brinksmanship. Many Romulan episodes in TNG were about a risk of war being averted, about Cold War brinksmanship, about trying to make peace with those who wrongly saw you as an enemy. It wasn't until DS9 that we saw an actual, ongoing state of war between the Federation and another power. As for the books, we've got the Earth-Romulan War coming up in ENT, but aside from that and the Dominion War, I'm not aware of any other books featuring the Federation at war. (Conflicts with the Borg are not wars; you can't declare war on a hurricane.) Overwhelmingly, ST's depictions of relations between the UFP and its adversaries have not involved actual warfare.