OK, so we may be converging to the same points.
1. A state that clearly sponsors terrorist groups would face at least the possibility of war, if other means don't work. But other means can probably work against most states except a couple of big powers (if you include blockade and such-like in other means) as long as "the international community" knows what it wants and why?
2. A group that operates without direct state support still lives in some state (like Awlaki in Yemen). Either that state takes care of him (which may take us to 1 if they don't) or if they don't have the capacity, then someone or something (these days, thing more likely than one) goes and blows him up? Is that what you are saying?
3. In both cases, occupation is not the first or even the tenth choice.

So what to do about occupations already in progress?
and what if other considerations set aside 1 and 2?
Does the US still occupy countries to get oil or bases or copper mines (or better terms for United Fruit)? This is not a rhetorical question. I am genuinely curious. Coming from a left-liberal universe, we were always exposed to the idea that those are primary goals in most interventions. Some (like the United Fruit business) obviously happened, but maybe events in small banana republics in the home hemisphere were never typical of worldwide US actions (i.e., the Left used them for propaganda even where it was not remotely true). In any case, is that the case any longer? does the US ever intervene militarily for these reasons? and if so, how can it ever pass a cost-benefit analysis? and if not, then what was the thought process behind, say, the occupation of Iraq? Just one of those things that happen (as in "#### happens"). Perhaps because it IS profitable for a number of individuals and companies even if it is a huge loss for everyone else?
I personally lean more towards the last two sentences, but am genuinely open to being convinced otherwise.