Rabbi J. David Bleich writes (Contemporary Halakhic Problems, Volume 3, Preemptive War in Jewish Law, p. 277):
"Not only does one search in vain for a ruling prohibiting military activity likely to result in the death of civilians, but, to this writer's knowledge, there exists no discussion in classical rabbinic sources that takes cognizance of the likelihood of causing civilian casualties in the course of hostilities legitimately undertaken as posing a halakhic or moral problem."
The article in the link also brings the opinion of the Maharal:
Still, why is war unique? Why does war create a shift in moral axioms? Maharal, Gur Aryeh, Bereishit 34:13 sees war in the context of the nation. As an individual, one person may not be responsible for the actions of another and, therefore, ethically protected from suffering because of the other’s actions. However, Maharal contends that as part of a nation, in war this individual is subsumed under the group. He/she, thus, halachically shares the fate of the group, even if he/she is personally not responsible for the actions of the perpetrator. This is an example of the shift in moral axioms that is part of war. But this case may also serve to help elucidate the nature of this shift. In war, we see the nation, not the individual. Similarly, in war, it may be that we assert the value of the broad principle and not the specific morality of each detailed case. With a declaration of war against terrorism, a general goal to eradicate this evil becomes paramount notwithstanding the cost in lives.