built.sbt 没有将 m2compatible 设置为 true 的 .repositories 文件
built.sbt without .repositories file with m2compatible set to true
我的场景是将工件发布到本地 Maven 存储库,同时包含 pom 文件和 ivy 文件。我试图通过将其视为常春藤回购来访问此存储库,因此,我必须设置 m2compatible=true 以便解析器可以正确识别路径模式。
sbt 允许通过以下属性覆盖默认的解析器列表:
-Dsbt.override.build.repos=true -Dsbt.repository.config=<path to sbt repository file>
存储库文件的格式如下所示,
[repositories]
local
my-artifacts: http://my.artifact.proxyserver.com/artifacts/,[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]
maven : http://my.artifact.proxyserver.com/artifactory/maven-central
我的问题是如何在上述文件中为解析器 "my-artifacts" 指定 m2compatible=true?因为没有那个设置,如果我依赖
com.google.common % guava % 23.1
解析器将查找路径:
com.google.common/guava/23.1
而不是
com/google/common/guava/23.1
sbt 允许在 ivy 解析器的末尾添加 mavenCompatible
。
我的场景是将工件发布到本地 Maven 存储库,同时包含 pom 文件和 ivy 文件。我试图通过将其视为常春藤回购来访问此存储库,因此,我必须设置 m2compatible=true 以便解析器可以正确识别路径模式。
sbt 允许通过以下属性覆盖默认的解析器列表:
-Dsbt.override.build.repos=true -Dsbt.repository.config=<path to sbt repository file>
存储库文件的格式如下所示,
[repositories]
local
my-artifacts: http://my.artifact.proxyserver.com/artifacts/,[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]
maven : http://my.artifact.proxyserver.com/artifactory/maven-central
我的问题是如何在上述文件中为解析器 "my-artifacts" 指定 m2compatible=true?因为没有那个设置,如果我依赖
com.google.common % guava % 23.1
解析器将查找路径:
com.google.common/guava/23.1
而不是
com/google/common/guava/23.1
sbt 允许在 ivy 解析器的末尾添加 mavenCompatible
。