NEW YORK — Macy’s and Martha Stewart Living Omnimedia say they have settled a breach-of-contract lawsuit involving J.C. Penney.

But Macy’s said the settlement does not impact its lawsuit against J.C. Penney Co., which is still ongoing.

Macy’s Inc. and Martha Stewart Living Omnimedia Inc. said Thursday that their settlement terms are confidential and not material to their businesses.

Macy’s has had an exclusive merchandising contract with Martha Stewart since 2006, including items such as bedding and bath products. Stewart’s company and Penney signed a merchandising deal in December 2011 to develop mini Martha Stewart shops. That prompted Macy’s to sue both companies for violating its exclusive agreement with Martha Stewart.

Martha Stewart Living Omnimedia and J.C. Penney have already scaled back their partnership. In October, the department store chain said it would no longer sell a broad range of home and bath products designed by Martha Stewart Living Omnimedia but would continue to sell a smaller batch of Martha Stewart items.