Troops participating in an 18-nation drill have staged mock exercises, including recapturing an international border and a ship seized by militants.