For my write-up today of The Cambridge History of Judaism, Volume Three: The Early Roman Period, I will discuss an item on pages 195-197, which is in Morton Smith's "The Gentiles in Judaism 125 BCE-CE 66".
Deuteronomy 20:10-17 commands the Israelites to kill the inhabitants of Canaan. According to I Maccabees and Josephus, the Maccabees exterminated some populations in Palestine, drove out others, and permitted some to remain (such as the Idumeans and the Irutraeans) if they adopted Jewish practices. Regarding Deuteronomy 20:10-17, Smith states that the "Hasmoneans could interpret the Law to suit themselves and slaves were worth more than corpses, so enslavement, even of the resistant and of people from the territory biblically assigned to Israel, is indicated not only by Josephus' reports, but also by the fact that the Romans were later able to restore many of the gentile towns to (the descendants of) their former inhabitants..." So, according to Smith, the Hasmoneans interpreted the command to slaughter the inhabitants of Canaan in a manner to suit themselves, for the Hasmoneans preferred to take the Gentile inhabitants as slaves, not to kill them. Smith does not offer details about what the Hasmoneans' interpretation of Deuteronomy 20:10-17 was, but perhaps it viewed the passage solely in reference to Canaanite people-groups, not the Gentiles who inhabited Palestine in the time of the Maccabees. Shaye Cohen referred to rabbinic exegesis that said that the ban on intermarriage between Israelites and Canaanites pertained only to Israelites and Canaanites, not to Israelites marrying Gentiles in general.
The Hasmoneans also used Gentiles as mercenaries, even to put down Jewish opponents. Smith states: "Josephus' report that Hyrcanus introduced mercenaries follows almost immediately his report of the refusal to accept a Seleucid garrison in Jerusalem 'because (the Jews' principle of) keeping themselves apart did not permit them to associate with aliens', Ant. XIII.247, cf. 249. Mercenaries hired by rulers of small states were commonly stationed in the capital, and Hyrcanus' subsequent success in putting down his Jewish opponents suggests that his mercenaries were at hand in Jerusalem. However, as High Priest, he could interpret the law to suit the occasion. The need often to do so may have decided him to leave the tradition-bound Pharisees and go over to the Sadducees who reportedly held that nothing was binding save the letter of the text."
Smith does not detail what law was being violated, but he may be deducing a law against Jewish association with aliens from Josephus' statement that the Jews could not do so (and I'm sure that there's more to the issue of Jewish interaction with Gentiles than this). And yet, Gentiles were allowed to be in Jerusalem to serve as mercenaries. According to Smith, the Hasmonean High Priest went over to the Sadducees because interpreting the law primarily in reference to the text allowed for a degree of freedom. It's like the view of some rabbis that intermarriage was only prohibited between Israelites and Canaanites: if you stick solely with the text, then only what the text explicitly prohibits is what is banned. In that case, one can nitpick the text such that he can create more freedom for himself.