【问题标题】:Why the directory layout is different between publish and publishLocal为什么发布和发布本地的目录布局不同
【发布时间】:2016-09-20 21:46:58
【问题描述】:

context : 我的人工制品是一个 SBT 插件,我发布到我公司的 Nexus 存储库。

为什么发布(到 Nexus 存储库)和 publishLocal 之间的目录布局不同:

使用 publishLocal

/Users/yamo/.ivy2/local/a.b.c/xxx/scala_2.10/sbt_0.13/1.0.0-SNAPSHOT/jars/xxx.jar

有发布

http://mvnrepo/nexus/content/repositories/snapshots/a/b/c/xxx_2.10_0.13/1.0.0-SNAPSHOT/xxx-1.0.0-SNAPSHOT.jar

有没有办法查看inspect 命令使用的模式?

inspect publishTo只返回url

我想了解这一点,因为当我发布到 Nexus 时,我无法从另一个项目使用此依赖项(未解决)(当我在本地发布时它可以工作)。

【问题讨论】:

    标签: sbt publish


    【解决方案1】:

    publishLocal 使用 ivy 样式发布到本地 ivy2 仓库。

    publish 使用 maven 样式发布到 Nexus。

    似乎有一个约定以常春藤风格发布 sbt 插件,但我在发布到我的公司 repo 时使用了默认值。

    反正我在另一个项目上加了Pattern,现在依赖解决了。

    resolvers += Resolver.url("nexus-snapshots", url("http://mvnrepo/nexus/content/repositories/snapshots/"))(Patterns(Resolver.mavenStyleBasePattern))
    

    由于未知原因,这不起作用

    resolvers += Resolver.url("nexus-snapshots", url("http://mvnrepo/nexus/content/repositories/snapshots/"))(Resolver.mavenStylePatterns)
    

    【讨论】:

      猜你喜欢
      • 2015-02-07
      • 2013-11-28
      • 1970-01-01
      • 1970-01-01
      • 2012-07-06
      • 2018-09-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多