The short answer is – yes, you can. However, you have to make sure that all of the components are from the same generation. Also, you need to make sure that the parts can work with each other. For example, you can’t pair a short-cage rear mech with a wide-range cassette. So, the long answer is – it depends.