A Bar Harbor man who robbed the Bar Harbor Rite-Aid last November and made off with prescription medication has pleaded no contest to the crime.