I believe the European Union is a good example of how a group of nations very prone to war over the centuries, understood the potential for destruction was becoming too great and chose to integrate instead. This became possible as modern technology brought them closer together both in terms of their ability to engage in mutual destruction and developing into a larger superstate.
With increased globalization resulting from major technological developments, the nations of the world are literally getting closer together so the same threats and opportunities seen by Europe could very well expand to the major nations of the world.
That would not preclude attacks by terrorist groups or similar clusters of disturbed individuals and the amount of destruction they could cause would be directly related to the power of their weapons -- but that is not 'war' and would probably not need 'war' to respond to and defend against.
Note: Attacks by terrorists and similar fringe groups are not new, people were blowing up tzars and princes in the 19th century, it was just their bombs weren't very powerful so the driver of the carriage died or was injured in the prince in the back seat of the carriage was fine.