强迫 maven 对 maven 中心使用 HTTPS 的正确方法是什么?
最近,sonatype启用了maven central来支持https(背景信息)。我现在已将以下代码段添加到我的 pom.xml强制在任何地方使用 https:
<!-- 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>
问题:
- 这就够了吗?还是还会在某个地方涉及http?
- 这是正确的方法吗?正如我所读到的,我应该在设置中执行此操作.xml相反。但是,使用我的(开源)项目的其他人将不会使用安全连接。
更新
它看起来还不够,例如,仍然使用HTTP的汇编插件:
[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