It is not impossible to get a mortgage with a CCJ but you may find that it excludes from the top mortgages available.
You said that you 'have' a CCJ so it might make sense to pay off the CCJ with the money you have as a deposit.
However, if it is a small CCJ (for example, less than �500) it may not matter. It may also be ignored depending on how long ago you had it (3 years ago or more).
We were refused a mortgage because I had a CCJ for �34! I was unaware of this as it was a catalogue account which I had paid to the agent but she didn't pay it to the catalogue company. I paid the �34 to clear the CCJ and we got the mortgage.