Preheat the oven to 200C/400F/Gas 6.
In a bowl, mix together the treacle and maple syrup. Add the bacon and leave to marinade for at least four hours.
To a large pot, add the apple juice, onion studded with the cloves, the bay, star anise and peppercorns. Finally place the gammon joint in the liquid and simmer with a lid on for 1 hour and 30 minutes.
Meanwhile cut the pumpkin half in half again.
Place the pumpkin on an oven dish, skin-side down, and trickle olive oil over. Season with salt and freshly ground black pepper, add a knob of butter in each pumpkin slice and bake in the oven for 45 minutes. When cooked set aside under foil to keep warm.
When the gammon has cooked, remove from the liquid, place on a baking tray, and then layer the treacle bacon over the top.
Bake for a further 15 minutes, or until the bacon is crisp.
Carve the gammon and serve with scoops of soft pumpkin flesh.