Samsung Galaxy Nexus doesn't detect charger
This sounds like a loose usb port on the phone. The microUSB port on smartphones are delicate things and can easily become loose and no longer reliably charge. If you use your phone or leave it connected but with the power connection taut (like if it's plugged into the wall and fully extended so the power cord is putting pressure on the microUSB port), over time this can and WILL loosen (or even break) the solder joints that connect the MicroUSB port to the circuit board. Eventually leading to a scenario like you're seeing now.

Hopefully your phone is still under warranty, as a mainboard replacement is likely in order here...Unless you're VERY skilled at micro-soldering work, then you could take the phone apart and see if you can re-solder the loose/broken connects.