"Profitable" is a problem here. It would always come down to "for whom"? For a large-scale arms dealer every war is profitable.
It seems to be quite the pattern that the 'greatness of a country' does usually not translate to real world material benefit for its inhabitants as a whole and at most individual levels. (Cf. Paul Collier: "Doing Well out of War", The World Bank, 1999. PDF Gerald Schneider & Vera Eva Troeger: "The Winners and Losers of War: Stock Market Effects of Armed
Conflict, 1990-2000", Estudio/Working Paper 2004/205.
… new evidence for the benefits of war to firms centrally involved in the war economy and on the nature of interactions between the state and the business sector during this period.
… at Armstrongs it implied returns to quity of over 15%, as compared with the 10.4% published, with 1916 (26%) and 1917 (15%) being the most profitable years)
AJ Arnold: ""In the Service of the State"? Profitability in the British Armaments Industry, 1914-1924", Journal of European Economic History; Rome Vol 27, No 2, (Fall 1998): 285.
Then an implicit assumption seems to be: "profitable for the aggressor", or instigator of the war, as if that would always be a one-sided affair with a clear culprit. But "first shot fired" for example is not a reliable indicator to declare a "guilty party".
It is further a problem of calculation in general. Was the British Empire a net loss, purely financially for the British economy? It would almost seem so.
At the height of the British Empire, most people in the slums of London would hardly be able to name an advantage that Empire status afforded to them.
A counterfactual thought: if wars haven't been "profitable" for quite some time now, why are they still fought, very frequently?
Equally "short term" would need a harder cut-off date set. When Iraq reunified with the lost province of Kuwait that looks "profitable" to me, and the International Coalition took its time to react. While after the second World War it looked quite bleak for Germany but in a historically short time at least the elites of the Western part began to enjoy quite a good time and ample profits from reconstruction and a booming economy.
But how has war once again become a distinctly lucrative affair? It must be recalled that waging war has not always been a loss-making business. On the contrary, at various times in European history, when the circumstances were right, the raising of private armies could be perfectly profitable.[…]
On the contrary, the long-term consequences of an internal war are im- mense — the destruction of the infrastructure, the devastation of the country- side, the roads and fields infested with mines, the growing up of a generation of children who have no experience of anything but war and violence.10 However, these costs do not have to be borne by the protagonists of the war. To adapt an old phrase, it could be said that the warlords and militia leaders have managed in an absolutely outrageous way to privatize the profits of the wars they wage and to nationalize the costs.
Apart from oil and strategic raw materials such as ores and minerals, gold and diamonds, the warlords use above all illegal or fraudu- lently certified goods to finance their wars and frequently to accumulate enormous fortunes. Trafficking in drugs and increasingly in young women has also proved extremely lucrative because of the high level of demand in the affluent countries. The economic entities of the OECD countries are not entirely blameless for the renewed profitability of war.
Herfried Münkler: "The Wars of the 21st Century", RICR Mars IRRC March 2003 Vol. 85 N 849.
If we accept the premise that "a country gaining land as a result of war" counts as fulfillment of criteria, then we have options to consider:
After World War 2.0 the assumed international consensus is often read is "no more wars —— of this kind". No aggressive wars, no territorial changes achieved by war, etc.
So, given the current conditions and prerequisites of the question: at the international "country profits", in terms of "land, spoils" etc, the examples for this should be non-existant.
But there seems to be a quite prominent exception to this:
From the 6-Day-War of 1967:
Territorial changes: Israel captures and occupies the Gaza Strip and the Sinai Peninsula from Egypt, the West Bank (including East Jerusalem) from Jordan, and the Golan Heights from Syria.
Even later, the "American War" led to the formation of Vietnam in 1975.
In the case of the 6-Day-War Israel kept the entire city of Jerusalem. Israel gave back Sinai to Egypt, albeit much later, and 'kept' Golan, Gaza, and the West-Bank territories didn't return to Jordan neither. Strategically all of these are seen as valuable assets (although politically or even financially there is 'debate' about this).
Some theoretical problems or considerations that cast a shadow on this:
A war fought to influence expectations about the outcome of a contest in which states try to disarm each other can also be represented by a costly lottery. However, I have shown that such a lottery need bear little resemblance to one representing a war that could lead to the disarmament of one side or the other-it is even possible for a state to improve the expected outcome of peace negotiations by losing battles, if in so doing it alters its opponent's expectations concerning the costs that would be associated with a fight to the finish.
It is the difference between the two types of costly lottery that is the source of confusion and error, a confusion that characterizes not only the theoretical literature on war but the empirical literature as well. For example, Stam (1996) does not distinguish between military stalemates and negotiated settlements in coding the outcomes of wars, nor does he distinguish the information conveyed by military operations from their effect on the relative power of the combatants, which makes his empirical results hard to interpret. Similarly, Walter, in an influential article on civil wars, does not distinguish between military defeats and outcomes in which one side or the other simply agreed to cease fighting and disband (1997, 344-345).
This seems to imply that if, in a civil war, a government unilaterally instituted political reforms which deprived a rebel group of its support so that it stopped fighting, this outcome would be coded as a "decisive victory" rather than a "successful settlement' which makes her empirical results difficult to interpret as well. […]
Ideally we might want to make it easy for states to agree to a compromise settlement as an alternative to war, but have political leaders believe that starting a war is very dangerous. Unfortunately it is not possible for both to be true. Thus the possibility of negotiated settlements calls into question at least one version of the obsolescence of war thesis (like strikes, the fact that the last war was horrible in retrospect does not imply that the next war will seem horrible in prospect), as well as many discussions of deterrence, which often assume that states rcsan make take-it-or-leave-it offers.
R. Harrison Wagner: "Bargaining and War", American Journal of Political Science, Vol. 44, No. 3 (Jul., 2000), pp. 469-484. (link)