Discussion about war, especially when involving hadiths will be long and tedious. We try to compact by (only) cite 7 verses of the Quran that constitue the principles of war in Islam
1. The war is obliged due to self defence when moslemeen are attacked first by other parties. Examples of these are Palestinese and Moslem Ambonese:
- And fight in the way of Allah those who fight you, but do notexceed the limits. Trully Allah likes not the transgressors (Albaqara 2:190)
- And fight them until there is no more persecution (fitnah), and (all and every kind of) worship is for Allah (alone). But if they cease, let there be no transgression except against the opressors (AlBaqara 2:193).
2. War is obliged to the stronger Islamic Country when infidel countries are attacking other weaker Islamic countries and the Muslims and they can not protecting themself from the invasion. This is what the Prophet (peace be upon him) done when attacking the Roman and Persian, as they disrupt and conquer the muslims countries that adjacent with them
- And fight them until there is no more persecution (fitnah)  and worship should be only for Allah. But if they desist, certainly Allah is All-Seer of what they do (Al-Anfal 8:39)
 harassment against Muslims and Islam
3. War is obliged because the infidel countries are undermined the peace agreement held between them and the Muslims, except in the months of illegitimated. This happens when in any of those two cases above (1) and (2) , they, the infidel league asked for peace treaty, that Allah in the Quran require the muslims to accept such treaty, but after that they broke the agreement by attacking the muslims, such as practiced by Israel in 1973 on the war of Yonkipur up until now.
- But if they violate their oaths after their covenant, and attack your releigion with disapproval and criticism then fight (you) the leaders of disbelief –surely their oaths are nothing – so that the may desist (from their evil actions) (at-Tawba 9:12)
- Verily,the nmber of months with Allah is twelve months, so was it ordained by Allah on the day when He created the heavens and the earth; on them four are sacred. That is the right religion,so wrong not yourselves therein, and fight agaist the polytheists collectively, as they fight against you collectively. But know that Allah is with those who are pious (at-Tawba 9:36)
- Then when the sacred months have passed, then kill the idolater wherever you find them and capture them and besiege them, and prepare for them each and every ambush. But if they repent and perform the prayer and give zakah (pay the poor in islamicway), then leave their way free. Surely Alah is Oft-Forgiving, Most Merciful (at-Tawba 9:5)
4. War is obliged in general to the heathen for their submission and make a peace agreement with Islamic countries, or become Muslims. This is because they will always find ways to attack and harm the Muslims when they are not within the power of the Muslims or not to make a submission agreement. Whenever the infidel countries always make peace and never attacking any moslem countries, tthen there would be no such obligation
- Fight against those who (1) believe not in Allah, (2) nor in the Last Day, (3) nor forbid that which has been forbidden by Allah and His Messenger (4) and those who acknowedge not th religion of truth (Islam) among the People of the Scripture, until they pay the Jizyah (tax protection) with willing submission, and feel themselves subdued (at-Tawba 9:29)