Say that Israel (like it did OTL) ends up in a war with the Arab league;
only instead of the Arab nations agreeing to peace rather quickly, they do a sort of USSR and do a build up while Israel makes headway into the many nation its at war with.
Given the situation if the war lasts for 5 maybe 10 years can Israel still win?
They have a rather small population and i'm just not sure if they can win a long war; but israel is not my area of expertise so can someone smarter than me answer?
Short answear, yes.
Longer version:
A war of 5-10 years is ASB, but at this point so is a war between Israel and the entire Arab world.
Now, nukes are off the table. There is simply no reason to use them. Maybe in a tactical sense, but I don't think it will even get to that.
A war between Israel and it's immediate neighbors will end rather quickly, as they all have in the past(assuming you ignore 1948, for a large number of reasons), with Israel in either the smae borders, or with new defensible borders.
But then you ask a rather odd question, can the Arab countries keep up the war effort? and another, can Israel?
In regards to the Arab nations: Those that do not share a border with Israel will send troops, supplies, money. But they have those in limited numbers. You cannot sent your entrie forces. What will be left behind? Ignoring "regime keeping forces" like someone mentioned earlier, those countries still share borders with other countries. Not to mention the logistics of it all.
Now to equipment, based on previous losses in wars, and the ability of the Israeli army to repair(The total number of tanks that were eliminated from the IDF stores in it's entire history is negligable, most were put back in service during the conflicts they were damaged in. The same cannot be said about the Arab armies) and my knowledge of current Russian wartime manufacturing capability, I don't think that even in a scenario of a year long conflict, the Arab armies could buy enough to replace losses. Egypt has a facility to manufacture spare parts for it's M1A1 fleet, but that would still be problematic, not to mention in range of IAF airstrikes.
Now of course Russia can send some of the many abandoned tanks it has just sitting in storage, but they require refurbeshing. Not to mention that new crews are to be trained, and that most are outdated and not in the same "wieght class" as the Israeli tanks. All this takes time. Time you don't have during a modern war.
Buying tanks from the US isn't going to happen, nor from the EU. Maybe some second hand western tanks from non NATO nations, but I don't see many purchases like that happenning.
The only weak point for Israel is replacing lost aircraft. Though that can happen faster then one might think. Lost ships is another problem, but no one is going to carry a D-Day style invasion of Israel, and naval blockade is easier said then done.
Now to ammunition. Again from personal knowledge, Israel has enough in storage. Not to mention Israel's arms industry. The Arab armies can purchase and make enough aswell though.
Now to the war economy: To all who said that Israel cannot stay in a war long enough due to it's economy, that is pure myth. Yes, the Israeli economy will take a nosedive, just like it did in 1967 and 1973, when reservists had to stay for months after the wars in case hostilities were to start again. The world economies took decades to pay for WW1 and WW2. Last time Israel was at total war was 1948, when children passed messages, and women carried guns. The same effect will be felt in many Arab countries, when those engage in a conflict they cannot win and keep throwing money and men at it.
Seeing your economy will go to shit is not always a good enough reason to avoid war, more so when this scenario was an Arab combined attack on Israel. Also, nukes are not, have not, and hopefully will not be the first reaction of Israel to a combined Arab assault. Not much is known about the Israeli nuclear policy, but the preconditions for the use of nuclear weapons are a little more tough then simply being attacked from all directiones. You have to be also losing.
Hopes this helps