Israeli military officials say troops had spotted the men attempting to plant bombs along the barrier .