The 5th commandment  said "thou shalt not murder," but as illustrated in the Old Testament, that was not an absolute.  The Israelites, on God's orders, murdered civilians, men, women, children, babies, throughout their conquest of the Promised Land.  From that, we can extrapolate that God allows murder when convenient or expedient, so the Church's various war theories, as well as the Church's various wars were, because the One True Church is Infallible, Just.