The state Supreme Court rejected Tuesday a Blue Hill farmer’s challenge of regulations requiring him to spend thousands of dollars to be licensed to sell raw milk at his farm stand. The farmer, Dan Brown, wanted to continue selling milk the way he had for years based on his understanding from state officials that he did not need a license. The state later reversed its position, and Brown was issued a civil summons in 2011 for selling milk without state licenses. The Maine Supreme Judicial Court rejected Brown’s arguments, including his contention that a Blue Hill ordinance had exempted him from state licensing requirements.