Perhaps its a good time for a recap. The question was whether Starfleet is a military. By current convention a military is synonomous with a designation of "armed forces". There is an exemption for law-enforcement who can carry arms, wear uniforms, have a chain of command and yet be considered Paramilitary according to the laws of war (and thus be treated as civilians).
However any participation in the conduct of war revokes and claim of being a paramilitary law enforcement organization.
Since Starfleet exactly fits the definition of what an armed force is according to the laws of armed conflict, the only way they could say they were not military is if they claimed they were law enforcement and the Federation did not include them in their "armed forces" (assuming there was another military organization within the Federation).
But since they regularly engage in the conduct of war they would have no standing to make any such claim even if the Federation did try and declare Starfleet as a law enforcement only organization.
Thus Starfleet would unequivocably have to be considered a military organization no matter what other roles they fulfill within the Federation Government.