The Old Testament does not set forth a consistent picture of war or battle. In Genesis, Abraham refuses any personal gain as victor after the battle at Siddim (Gen. 14). He also received what appears to be absolution of blood guilt from Melchizedek, the high priest of Jerusalem.
When Levi and Simeon used the rape of their sister Dinah as an excuse to decimate the male population of Shechem, Jacob objected (Gen. 34:30) and later Jacob pronounced a judgment on their evil deeds. “Cursed be their anger, for it is fierce, and their wrath, for it is cruel! I will divide them in Jacob and scatter them in Israel” (Gen. 49:7). This judgement on Levi and Simeon removes any ambiguity about their deeds. Their slaughter of the entire male population of Shechem was wrong, and their families suffer the consequences.
Some biblical writers present YHWH as a warrior who fights for Israel to install Israel as a kingdom. This meant uprooting the populations that already lived there and toppling the rulers who controlled Canaan. The accounts vary. In some, all the inhabitants and their livestock are to be destroyed (a holocaust). In some accounts, the women and children are taken captive and only the men are killed. The accounts in the book of Joshua of the Israelite victories are inconsistent. Joshua 11:11 claims that "None of the cities that stood on mounds did Israel burn, except Hazor only; that Joshua burned." However, Joshua 6:24 credits Joshua with burning Jericho, and Joshua 8:28 reports that he also burned Ai.
Israel Finklestein and other archaeologists question the Deuteronomist Historian's claim of the swift invasion of Canaan and the Israelite conquest and destruction of fortified cities such as Jericho and Hazor. The evidence of excavations at those sites does not support the claim. Hershel Shanks has written that archaeology "sometimes provides evidence that seems to refute the Biblical account. That is the case, for example, with the Israelite conquest of the land as described in the Book of Joshua. The various cities that the Israelites supposedly conquered simply cannot be lined up with the archaeological evidence." (BAR, July-August 2013, p. 6)