Roman Catechism 28.7

Chapter 28 — Part III: The Decalogue — The Fifth Commandment

Section 7. Killing In A Just War — In like manner, the soldier is guiltless who, actuated not by motives of ambition or cruelty, but by a pure desire of serving the interests of his country, takes away the life of an enemy in a just war.