Remove the gammon from its packaging, cutting away the plastic wrap with scissors. Use a small sharp knife to score a diamond pattern through the top of the gammon without cutting all the way through. Place the gammon in the slow cooker and pour the cider or juice over it.
Add the star anise, cinnamon stick, bay leaves, and cloves to the slow cooker. Cover and set to cook on low or medium. Cook for 5 hours on medium. Refer to the notes for alternative cooking times.
To prepare the glaze, melt the honey and butter together in a small saucepan, stirring in the chopped rosemary if desired. Preheat the oven to 180°C (356°F).
After cooking, transfer the gammon to a baking tray. Brush or drizzle half of the glaze over the ham. Bake for 10 minutes, then apply the remaining glaze and return to the oven for another 5 minutes.
Let the gammon rest for 10 minutes before carving.
Serve with roast potatoes and your choice of vegetables.