Preheat the oven to 190°C/fan 170°C/gas mark 5. Score the gammon fat, then mix the sugar and mustard together and rub into the score marks. Place in a large, deep roasting tin with the cloves and cinnamon stick, then pour the cider into the tin around the gammon. Cover with foil and roast according to the instructions on the packet.
An hour before the end of cooking time, add the onions, apples and carrots to the tin. Recover with the foil and cook for 30 minutes, removing the foil for the final 30 minutes. Remove the gammon and veg from the tin, cover with foil and leave to rest.
For the gravy, place the tin of pan juices on the hob over a high heat and whisk in the flour. Add the stock and bring to the boil. Cook for 2 minutes, then remove the cinnamon stick and cloves. Slice the gammon and serve with the veg and gravy.