Sahih Muslim 31:5917 and 31:5918 say that the Muslims should fight but here it is not for self defence.
"Fight with them until they bear testimony to the fact that there is no god but Allah and Muhammad is his Messenger, and when they do that then their blood and their riches are inviolable from your hands but what is justified by law and their reckoning is with Allah."
Normally wars are fought in self defence not like this. Is there a specific reason were they kaafir who may have stolen something? If the prophet wanted to guide them did it have to be done through war and violence?