Pikes and their phalanxes are close to useless since a few patches ago. Just aim your javelins at them and they're gone in seconds. Don't even need javeliners, or flanking for that matter, though, in many cases, even (good) sword infantry can beat pikes head on.