Lets first review how war weariness worked in civ4 (because a lot of the comments here show complete ignorance on that matter):
In civ4, you would gain wear weariness from participating in combat actions outside you cultural borders.*
+1.5% for losing an offensive battle
+0.5% for winning an offensive battle
+1% for each defensive battle (win or lose)
+3% for capturing a city.
(some stuff related to nuking/being nuked)
So, even in civ4, you would not have a problem with war weariness in a purely defensive war.
*Our more specifically, from combat actions taking place on tiles where you were not the dominant culture. So, this could include some tiles within your borders, if they had belonged to an eliminated civ for a long time.
War weariness + (nearly) permanent war with everyone if you declare more than once = very stupid system, no?
One of the main functions of a war weariness system is to prevent permanent wars. One of the main reasons civ5 has permanent wars, is because there is no penalty for staying at war.
Personally, not a fan of war exhaustion. It works well in Europa Universalis, as it tries to be much more realistic than Civilization. Civ is kind of an educational fantasy game, if that makes any sense. As mentioned earlier in this thread, I'd rather there be some kind of international trade, and quite lucrative with nations who are in good relations with you. Will give a benefit for peace and take it away when you are at war with them, and have a reason to fill in the gaps in the map with roads.
International trade works well to prevent wars and encourage the fostering of friendships. (This is especially true, if the value of trade increases for extended periods of peace.)
It does not work so well, to stimulate the end of wars. The reason for this, is that the penalty for war (no international trade) does not increase as the war lingers on. This is especially tricky for the AI, since once they decide going to war is worth sufferring the penalty, it is hard to get them to reconsider if this penalty stays flat over time. (In general, AI decision making is greatly helped by systems with a more continuous progression. This for example is a reason why the AI in civ5 is not very good in dealing with global happiness system, because the consequences are very discrete.)