In a saucepan over medium heat, bring all the ingredients to a boil. Simmer until the cranberries burst, about 10 minutes. Discard the cinnamon stick and star anise. Transfer the mixture to a bowl. Cover and refrigerate for 2 hours or until completely chilled.
Delicious served with roasted turkey with juniper and pearl onion sauce (see recipe). The cranberry confit will keep for 1 month in an airtight container in the refrigerator.