Pichuach Nefesh
All depends on the circumstances - it depends on one's assessment of the wantonness of the non-Jews in question. If people come from countries across the border to to plunder and pillage nowadays we are certainly obligated to go out and oppose them with weapons as the law of the kingdom demands, even on Shabbat, although they come merely for possessions....
You may have the thousand, O Solomon,
And the guards of the fruit two hundred!
(Shu”t Imrei Aish Y.D. siman 52.)
Shu”t Tzitz Eliezer cheilek 12 siman 57 and cheilek 13 siman 100.
(ה) רַבִּי נְחוּנְיָא בֶּן הַקָּנָה אוֹמֵר, כָּל הַמְקַבֵּל עָלָיו עֹל תּוֹרָה, מַעֲבִירִין מִמֶּנּוּ עֹל מַלְכוּת וְעֹל דֶּרֶךְ אֶרֶץ. וְכָל הַפּוֹרֵק מִמֶּנּוּ עֹל תּוֹרָה, נוֹתְנִין עָלָיו עֹל מַלְכוּת וְעֹל דֶּרֶךְ אֶרֶץ:
(5) Rabbi Nehunia ben Hakkanah said: whoever takes upon himself the yoke of the Torah, they remove from him the yoke of government and the yoke of worldly concerns, and whoever breaks off from himself the yoke of the Torah, they place upon him the yoke of government and the yoke of worldly concerns.
Rashi explains that this means he should not strengthen them to besiege the city.
Rabeinu Elchanan explains that this means that he should not become a soldier of this idolatrous group.
R. Itzchak Schochet
The official religion included those cults and rites which were compulsory for each soldier. They were the same not only for the whole military unit, but for all the troops throughout the Roman Empire. The military rites and ceremonies were strictly regulated and included various holidays, parades, military oaths etc. These activities did not occur as the result of much piety, but rather as acts of organized attestation of loyalty to the Emperor and the government....The unofficial religion was related to the personal religious preferences of each soldier, which in turn were mostly related to their ethnic background
Certain characteristics must also be taken into consideration: the ethnic composition of the Roman army was in a dynamic state and was constantly changing. In the 1st century BC legions were recruited solely from Roman citizens who were in most cases natives of the Apennine Peninsula, while during the 3rd century AD the army was considerably barbarian; following the introduction of local recruitment by Emperor Hadrian, the ethnic composition of the army, as a rule, was significantly affected by the territory to which the legions were moved.
[D]uring the period 2nd–3rd century AD, the Roman army in Lower Moesia had a heterogeneous ethnic composition. Among the dedicators were found individuals from almost all corners of the empire – from the Apennine Peninsula, the western provinces, the Balkans, Asia Minor, Africa and the eastern provinces. To a large extent, a relation is observed between the position occupied and the descent of the military personnel. This relation is not so much the result of discrimination, but it is conditioned by the level of affiliation to Roman culture and traditions.

