The militia of this state shall consist of all able-bodied male persons residing in the state, between the agesof eighteen and forty-five years, except such as may be exempted by the laws of the United States or of this state. Persons whose religious tenets or conscientious scruples forbid them to bear arms shall not be compelled to do so in times of peace, but shall pay an equivalent for a personal service.