In the specific case of Ukraine, a people's war of national liberation is a pretty classic form of nation building. That's how a lot of nations came about. The Taliban are a particularly bad analogy, because they represent regionalist resistance against central government in Afghanistan. Countries like Italy, the USA, or Vietnam were formed in this manner.