There are strong rules about how and where war can be fought, who is to be protected and who can fight. War had to be fought in an equitable and fair manner and using open means -Bhaskar Dasgupta
The avoidance of evil and the fight against inner desires is clearly a route to Brahman or the ultimate Godhead. In other words, if one removes all desires, one is undistinguishable from the Godhead.
Then come the Puranas, which is a corpus of texts, mainly in the form of stories; talking about the history of the world, the stories of the Gods, their genealogies and their deeds, the people and events. Based upon the concept of avatars or incarnations of Gods on earth, these incarnations emerge on earth to fight against evil, to carry out Just War against the disturbers of the divine order. Thus, by analogy and examples, the shape, size and type of evil is explained. The fight against evil is also described by means of divine intervention.
But the knowledge of the Vedas and Upanishads was distilled into the Mahabharata, the gigantic and profound Hindu epic and one can legitimately claim that the Mahabharata was itself distilled into the Srimad Bhagwat Gita. This is the story of the time when Sri Krishna (himself an incarnation of Vishnu as explained in the Vishnu Purana and other documents) explains the concept of divine destiny; the use (or rather prohibition) of weapons such as Brahmasashtra and Pasupatastra; how the divine godhead will come to the assistance of the just; how fighting has to be done for the sake of fighting and not for the sake of emotional reasons such as happiness or jealousy etc.
See the crucial difference? This just war concept is to fight evil and not to spread Hinduism. This aspect to be remembered is that the Hindu concept of Just War is clearly distinguishable from the Christian/Islamic concept of Just War, which includes war against the outsider/foreigner/other religion or persons from different faiths. The basis of Hinduism is Dharma, or cosmic order. Whatever or whoever disturbs this cosmic order or acts against the Dharma is considered to be a target, irrespective of their demographics. But the concept was much wider than that, you cannot just go about waging Just War haphazardly. There are strong rules about how and where war can be fought, who is to be protected and who can fight. War had to be fought in an equitable and fair manner and using open means. (See an excellent treatment of this issue by Arthur Eyffinger in his book The International Court of Justice 1946-1996 (http://www.allbookstores.com/book/9789041102218/Arthur_Eyffinger/Internatio nal_Court_Of_Justice_1946-1996.html), where he delves deep into the background of our international laws relating to war and other references to the religious books are from Kane's seminal work Dharmashastra http://en.wikipedia.org/wiki/History_of_Dharmasastra_(P.V._Kane)).
Another book, Arthshastra, has to be mentioned. Arthshastra written by Kautilya (http://www.amazon.co.uk/Kautilya-Exposition-Social-Poltical-Theory/dp/81753 6386X/ref=sr_1_4?ie=UTF8&s=books&qid=1207601429&sr=8-4) is a body of knowledge relating to political science, government and its administration, international relations, including spying etc. One can call it the first political science text book of the realist school. One has bear that in mind that Arthshastra is totally independent from any moral philosophy as expounded in the epics and Dharmashastras mentioned above. While nobody will claim that Arthshastra is part of Hindu religion, it indeed is part of Hindu politics and culture and one can clearly see the roots of secularism inherent in this body of knowledge. This also explains the difference between law and religion. Hinduism is universalistic and humanistic in nature. One can almost call it the perfect religion for the secular humanists. Unlike other religions, there is a clear cut difference between law and religion. While religion and by correspondence faith is immutable, laws have to change given changed circumstances, which make Hinduism inherently flexible and dynamic in nature as man matures and changes.
War as a means of public policy is also the last strategy to be adopted when reconciliation, gift giving, threats and diplomacy do not work. (One can see these guidelines in the Smiritis such as the Manusmriti, as well as in the Shastras, such as the Arthshastra). Rules have to be followed in terms of declaration of war, how to determine if one is the King of Kings, etc. Rules can be determined in terms of ban on poison arrows; ban on killing the elderly, women, sleepy people, peaceful citizens, the insane, musicians, retreating soldiers; ban on destroying gardens, temples and places of worship; and so on and so forth. Not only that, but war can only be carried out by a particular class of people, the Kshatriyas. All other classes of people are not to be involved in warfare, which is again just and fair. Only those people who are trained fight, not just anybody.
So as one can see, a full corpus of Just War theory and practise, with a history dating back to almost 4,500 years ago which has then been further developed and enriched since then. One of the modern guru's of Just War theory, Michael Waltzer, said that the Indo-Pakistani war of 1971 is perhaps one of the very few wars of modern times that can be called as a Just War. I am not surprised at that, and the military philosophy of the Indian Army is heavily based around this concept. Are you also surprised that the Indian Army is one of the largest troop contributors to United Nations Peace Keeping Missions? One can quibble about quite a lot of Indian Army actions, but India has a proud history and philosophy of Just War. The world can do worse than to take those concepts on board.