Ever heard about the war in Yugoslavia? The clock was reset about 20 years ago. Or about the continued involvment of many of its members in Irak, Afghanistan or more recently in Lybia? Or about their enduring support of the industry of armament? The UE never did anything to prevent wars or end them. That's where the joke is.
The EU did not end all wars everywhere and create world peace, but between it's members (and the members of the EEC before that) it sure did keep peace pretty well.