You asked

How long should I breastfeed?

Breastmilk is perfect for your baby, covering all the nutritional needs, and it changes as your baby develops, so there is no risk of it being nutritionally 'incorrect' for your baby.The health of your breast milk is dependant on your own health and nutritional intake. There are other health benefits for both you and your baby, as far as breastfeeding goes. Your child is less likely to become sick from illnesses that affect the ears, bowels and lungs. Breastfeeding helps prevent obesity, allergies and diabetes ilater on in your child's life.
In the short-term, breastmilk prevents severe cases of diarrhoea. There are benefits for mothers too. It reduces the incidences of certain cancers and may prevent hip fractures in later life. The hormones that are produced from breastfeeding also help your body return to normal quicker after pregnancy.
Most experts agree that you should feed your child exclusively with breast milk for at least the first six months and then gradually introduce solid foods. Breastfeeding can continue, with solid food supplementing nutritional intake, from six months onwards. If breastfeeding is problematic at the beginning, or becomes a problem, seek help from the nurses in your hospital, your local health nurse or one of many breastfeeding support groups around the country.  
(Article amended following comments below and from other community members).

More questions

Mums understand the benefits of breastfeeding and some may be tempted by online sources if they're reluctant to breastfeed themselves or are having problems.
Babies can often be fussy in the evenings and you may find it difficult to nurse or settle them. 
Here are ways to know if your baby is getting enough milk
Breastfeeding and medication: what you need to know
What's the difference between breastmilk and formula?
Breastmilk has plenty of iron to last your baby at least the first six months of his life. 
Nipple shields are used if baby wont take the breast or for sore nipples
As of February 21st 2011 the HSE is recommending that all babies, including babies that are breastfed be given 5 micrograms of vitamin D3 a day. This is because recent studies have shown that mothers and...
Spitting up is very common and most young babies spit up at least once a day. This is because their digestive systems are immature which makes it very easy for their stomach contents to come back up their...