War, as opposed to personal violence, is a product of group cohesion, which is in turn a product of needing other people in order to survive. War is encouraged by the development of group identity and of hatred, both of which are encouraged by having a bad and hard life.
We are on the cusp of the introduction of productive technologies that have the potential to make every individual rich without needing to obey another human being, at which point we might notice that our only real enemy is anyone who tries to force us to do something with the threat of force (physical or economic or emotional or spiritual).
At that point, the ability to get people to get together to fight wars will be strongly diminished. Some people will still probably arrange them because they are at heart bastards who enjoy other people's suffering, but I think this will be the exception rather than the rule it has been ever since we ran out of enough land to live well as hunter-gatherers (modern h-gs live on the margins in areas with very limited resources---their constant warring has nothing to do with how all our ancestors lived back before our success back-fired).