Here’s a nice post by Bill Vallicella arguing, correctly in my opinion, that it can sometimes be morally obligatory for a government to wage war even if doing so brings about the deaths of noncombatants.
The key point is that we must not confuse the norms of private morality (the Golden Rule, turning the other cheek, etc.) with the norms of public morality – the duties that governments qua governments have to protect their citizens.
Fear God, and give glory to him; for the hour of his judgment is come: and worship him that made heaven, and earth, and the sea, and the fountains of waters.