Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/elixir/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Scala 如何使用maven的sbt为存储库指定凭据?_Scala_Maven_Sbt - Fatal编程技术网

Scala 如何使用maven的sbt为存储库指定凭据?

Scala 如何使用maven的sbt为存储库指定凭据?,scala,maven,sbt,Scala,Maven,Sbt,我有以下maven配置。 如何将其转换为SBT1.x? 我尝试在~/.sbt/1.0/plugins/credentials.sbt文件中添加凭据,但失败。 如何正确地将其转换为sbt ~/.m2/settings.xml <servers> <server> <id>PLATFORM_REPO</id> <username>myuser</username> <password>mypa

我有以下maven配置。 如何将其转换为SBT1.x? 我尝试在~/.sbt/1.0/plugins/credentials.sbt文件中添加凭据,但失败。 如何正确地将其转换为sbt

~/.m2/settings.xml

<servers>
<server>
    <id>PLATFORM_REPO</id>
    <username>myuser</username>
    <password>mypass</password>
</server>
</servers>

平台回购
我的用户
我的通行证
pom.xml

<repositories>
<repository>
    <releases>
        <enabled>true</enabled>
    </releases>
    <snapshots>
        <enabled>false</enabled>
    </snapshots>
    <id>PLATFORM_REPO</id>
    <name>Platform Repository</name>
    <url>https://my.platform.com/artifactory/myrepo</url>
</repository>
</repositories>

真的
假的
平台回购
平台存储库
https://my.platform.com/artifactory/myrepo

它不是一个插件,而是混合到您的构建中的东西。因此,如果您想让这些信息在全球范围内可用,它们应该位于
~/.sbt/1.0/credentials.sbt
(不在
插件
子目录中):

然后在
build.sbt
中:

publishTo := Some("Platform Repository" at 
  "https://my.platform.com/artifactory/myrepo")

另请参见:

可能的不完全重复。因为这个问题需要使用SBT1.x翻译maven pom.xml
publishTo := Some("Platform Repository" at 
  "https://my.platform.com/artifactory/myrepo")