Of course, TNG changed it's direction on the Federation's military past more than once. In S2 with Peak Performance Pikar and Riker have to all but be forced into war games because they think exploration and diplomacy are Starfleet's mission and no one's really gone to war in so long that they don't see the point. Later on, there's various wars the Federation have been in that are mentioned like one with the Cardassians, the one with the Tzenkethi, any number of past brushfire wars and border conflicts, etc. And for an organization that seems to moved past war, their ships seem very well armed.