Q:

Motivating developers in a project perceived as dull?

As a manager, I can't always end up generating work that'd be cutting edge. Some of the projects do run on maintenance mode, and generate a healthy free cash flow for the company. 
As a developer what would it take for you to stick around in this project? I have been thinking of re-branding the work, but I could do with a lot of help here.
EDIT: Thank you all for the suggestions. So far here's what we've got: 

Rotation of work as per developer interest
Flexible working environment
Allot time to work on pet projects
Socials and fun 
Branding of the project 
Use this as a stepping stone for other projects

A:

You need offer them something to occupy their time. Projects in maintenance mode often don't require 40 hours a week from each developer. If it does then there is probably something wrong with software, but based on the way you asked the question, I am assuming that you are looking for idea's to occupy your developers while there isn't a whole lot to do. I don't know what your financial budget is, but I think some incentives like sending them to a software conference might be helpful. Another suggestion might include explicitly allowing them to explore their own interests for say 15 hours a week. Someone might be interested in exploring say sorting algorithms or database design. It might not be directly related to your business, but I can't image that you wouldn't benefit from their increased knowledge in the end. Just don't force them to be at work with nothing to do. Allow them to occupy their time with something else if there is not a lot of work to do. I think it fair to ask for a summary of what they are doing to make sure they are not just browsing the web randomly, but let them explore a bit.  

A:

For projects in maintenance mode, think about what comes next. What will eventually make them unattractive to your customers? To avoid obsolescence, do they need new features, better performance, or to be simplified? If you start over, can some projects be merged? Should they be built with different tools, languages, or processes? Are there improvements or directions that no one's considered? Have your developers answer some of these questions. Build prototypes. Try a new language or framework. Give a project a new mobile interface.
It's easier to experiment with alternatives when there's no looming deadline. Use the dull times to out-maneuver your competitors.

A:

Make it fun to work on the project.
In fact interesting projects are pretty rare. And studies shows that employees happiness heavily depend on social and fun. They massively mention colleagues when they are asked why they wouldn't leave their current job.
That's why you should always be happy when you hear laughing in your building instead of yelling.

