Recently sonatype enabled maven central to support https (background information). I've now added the following snippet to my pom.xml to force using https everywhere:
<!-- force https -->
<repositories>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
Questions:
- Is this sufficient? Or will there be still http involved somewhere?
- Is this the correct way of doing it? As I've read that I should do this in the settings.xml instead. But then others using my (open source) project won't use the secure connection.
Update
It does not look sufficient as for e.g. the assembly plugin still HTTP is used:
[INFO] --- maven-assembly-plugin:2.4:single (make-assembly) @ graphhopper-web ---
Downloading: http://repo.maven.apache.org/maven2/org/slf4j/slf4j-jdk14/1.5.6/slf4j-jdk14-1.5.6.jar
Surely you wouldn't be contributing to open source projects while you're supposed to be *working*, while being afraid your employer might inspect the packets, would you? Nothing to hide, nothing to fear, buddy!– corazza Aug 19 '14 at 21:33...thing is aarcastic remark about unencrypted traffic and potentially nosy employers, HTTPS is good for that too :)– corazza Aug 19 '14 at 21:36