6 Then he called for Solomon his son and charged him to build a house for the Lord, the God of Israel. 7 David said to Solomon, “My son, I had it in my heart to build a house to the name of the Lord my God. 8 But the word of the Lord came to me, saying, ‘You have shed much blood and have waged great wars. You shall not build a house to my name, because you have shed so much blood before me on the earth (1 Chron 22:6-8).
Muslims sometimes defend religious violence by appealing to the OT. Christians often respond by pointing out that we live under the new covenant. Another response is to distinguish between jihad and OT holy war.
These are both legitimate responses. But I'd like to make another point: even in the "bad old days" of the old covenant, David was not allowed to build the temple because he had too much blood on his hands. A life of violence, even in God's service, disqualified him. Although violence is sometimes necessary, it's nothing to glory in.