Jack of all trades and master of none is the complete saying which itself explain what you should do. It is not really possible for most of us to be master at different fields and it's not really necessary too as long as the one you are pursuing has future then concentrate on it completely but it doesn't mean you have to forfeit everything, you can try others as well but as I said everyone is not capable of reaching it.
If you have passion and love for something in your career, you'd just choose to be a specialist of it. But there's no fun eventually when you get older from there and that's why many chooses to be a jack of all trades and be a master of none.
I think it's changing the variance nowadays because even if they tell you that you're a master of none, you can master something that you're not fond of if you've been doing that for a long time.
What matters today is what's adaptable to you and will help you to survive.