I think a point raised in this thread bears thinking about... What constitutes a military has changed often over the span of human history. During many periods many nations had no standing military and levied one at a time of war. Military forces are also fashioned out of different organizations. In both the UK and US during WW2, the "core" military became the backbone of a citizens army of vastly larger size and composition. Indeed, most of the generals of the US in WW2 were generals of the Army of the United States fighting the war, while holding their lower rank in the army proper they came from (the much smaller prewar org). And non-warfighting organizations are often put into military service as required, such as the merchant marine.
Then look at the missions Starfleet regularly undertakes in peacetime: Border patrols, escort, reconnaissance, intelligence... They are at the very least a paramilitary organization.
What's very hopeful for the future, is the idea that a military organization would consider peaceful exploration to be its primary mission. But when the time comes, having those engineers "who can turn rocks into replicators" goes from exploration and colonization to beating your ass back across the galaxy.
Then look at the missions Starfleet regularly undertakes in peacetime: Border patrols, escort, reconnaissance, intelligence... They are at the very least a paramilitary organization.
What's very hopeful for the future, is the idea that a military organization would consider peaceful exploration to be its primary mission. But when the time comes, having those engineers "who can turn rocks into replicators" goes from exploration and colonization to beating your ass back across the galaxy.