Then he called for Solomon his son, and charged him to build a house for Yahweh, the God of Israel.
"Thou hast shed blood abundantly"  (1 Chronicles 22:8).  Great significance attaches to this verse.  It presupposes that war is sinful, wrong, contrary to God's will.  This cannot mean that David's wars were not justified.  God commanded his people to fight wars; but here shines the eternal truth that bloodshed is inherently evil, no matter how necessary it may be at times.