Yes. Islam means peace. But when Muslims came under aggression, they were allowed to fight back. This happened in Madina. The verses you say are violent are talking about self defending not attacking and transgressing( And do not offend, Indeed God doesn't like offenders) (If they resorted to peace, resort to peace) (God doses`t prevent you from being fair and dealing amicably with the Non-Muslim if they are not fighting you or driving you out of your houses) (Noble Quran addressing Mohammed and Muslims). Please pick a single verse supporting what you are saying
I'm trying to see how raiding caravans as a defensive move,that was just the beginning,he was the new kid on the block so to speak,3 sieges later and Medina was his.