I install a little battery tender plug on all my bikes and ATV's. On my CBR and VFR, I ran a extension up to the yoke and also use it for powering my GPS.
Odd that your battery was dead so soon, but I've got a couple bikes that the batteries didn't last for very long, and others that are still going. My 06 and 07 CBR/VFR are still on original batteries. My 06 F4i (sold) had to have a new battery after two years, it just flat out had a short of some sort in it after a period of time. It'd start like a new battery one time and be completely dead another, other times it caused the bike to run erratic. My 06 CRF250x is still on its original battery, and its a tiny little thing.