According to The Catholic Herald, there were originally only three conditions laid down by Thomas Aquinas for a just war. According to The Catholic Herald, “The Church later added two more rules, though St Thomas usually gets the credit for them (and why not?). The first is that the conflict must be a last resort. The Catholic Herald describes the last criterion of Catholic just war theory as follows: “Lastly, the war must be fought proportionally.
The full essay is at "The Evolution of Just War in Roman Catholic Social Ethics."