The only country that can take on the EU military is the US. And all potential enemies (China, India, Russia) are economically dependent on the EU (and the US).