我正在努力使SBT与IPFS协同工作。我想将工件发布到IPFS,然后在另一个项目中依赖它们。
在依赖项目中,我正在使用此SBT解析器:
resolvers += "ipfs-iscpif" at "https://ipfs.iscpif.fr/ipns/QmXTLZWz1VQqv9nFKersuNnRgPmMEkiHuRnS8i1c8A9XSF/ivy"
除了在每次更新时下载依赖项或者干净;否则一切正常。编译。常春藤缓存根本不起作用。
> ;clean;compile
[success] Total time: 0 s, completed 19 sept. 2016 13:19:41
[info] Updating {file:/tmp/test/}test...
[info] Resolving fr.iscpif.gridscale#http_2.11;1.88-SNAPSHOT ...
[warn] Unable to reparse fr.iscpif.gridscale#http_2.11;1.88-SNAPSHOT from ipfs-iscpif, using Mon Sep 19 13:19:43 CEST 2016
[info] Resolving fr.iscpif.gridscale#gridscale_2.11;1.88-SNAPSHOT ...
[warn] Unable to reparse fr.iscpif.gridscale#gridscale_2.11;1.88-SNAPSHOT from ipfs-iscpif, using Mon Sep 19 13:19:43 CEST 2016
[info] Resolving jline#jline;2.12.1 ...
[info] downloading https://ipfs.iscpif.fr/ipns/QmXTLZWz1VQqv9nFKersuNnRgPmMEkiHuRnS8i1c8A9XSF/ivy/fr/iscpif/gridscale/http_2.11/1.88-SNAPSHOT/http_2.11-1.88-20160919.103956-1.jar ...
[info] [SUCCESSFUL ] fr.iscpif.gridscale#http_2.11;1.88-SNAPSHOT!http_2.11.jar (86ms)
[info] downloading https://ipfs.iscpif.fr/ipns/QmXTLZWz1VQqv9nFKersuNnRgPmMEkiHuRnS8i1c8A9XSF/ivy/fr/iscpif/gridscale/gridscale_2.11/1.88-SNAPSHOT/gridscale_2.11-1.88-20160919.103953-1.jar ...
[info] [SUCCESSFUL ] fr.iscpif.gridscale#gridscale_2.11;1.88-SNAPSHOT!gridscale_2.11.jar (92ms)
[info] Done updating.
[success] Total time: 3 s, completed 19 sept. 2016 13:19:44
> ;clean;compile
[success] Total time: 0 s, completed 19 sept. 2016 13:19:45
[info] Updating {file:/tmp/test/}test...
[info] Resolving fr.iscpif.gridscale#http_2.11;1.88-SNAPSHOT ...
[warn] Unable to reparse fr.iscpif.gridscale#http_2.11;1.88-SNAPSHOT from ipfs-iscpif, using Mon Sep 19 13:19:45 CEST 2016
[info] Resolving fr.iscpif.gridscale#gridscale_2.11;1.88-SNAPSHOT ...
[warn] Unable to reparse fr.iscpif.gridscale#gridscale_2.11;1.88-SNAPSHOT from ipfs-iscpif, using Mon Sep 19 13:19:45 CEST 2016
[info] Resolving jline#jline;2.12.1 ...
[info] downloading https://ipfs.iscpif.fr/ipns/QmXTLZWz1VQqv9nFKersuNnRgPmMEkiHuRnS8i1c8A9XSF/ivy/fr/iscpif/gridscale/http_2.11/1.88-SNAPSHOT/http_2.11-1.88-20160919.103956-1.jar ...
[info] [SUCCESSFUL ] fr.iscpif.gridscale#http_2.11;1.88-SNAPSHOT!http_2.11.jar (86ms)
[info] downloading https://ipfs.iscpif.fr/ipns/QmXTLZWz1VQqv9nFKersuNnRgPmMEkiHuRnS8i1c8A9XSF/ivy/fr/iscpif/gridscale/gridscale_2.11/1.88-SNAPSHOT/gridscale_2.11-1.88-20160919.103953-1.jar ...
[info] [SUCCESSFUL ] fr.iscpif.gridscale#gridscale_2.11;1.88-SNAPSHOT!gridscale_2.11.jar (93ms)
[info] Done updating.
[success] Total time: 1 s, completed 19 sept. 2016 13:19:46
每次都会下载jar。经过长时间的调查,似乎是由于http标题“Last-Modified”。 IPFS协议没有修改时间的概念,因此该头部由网关设置为当前日期。是否有可能让SBT考虑在元数据中发布的发布时间(ivy的ivy.xml或maven的maven-metdata.xml)而不是这个http头?
最好的问候, 罗曼
编辑1: 基于IPFS的SBT回购将非常好。但是我认为它不适用于当前的SBT和IPFS状态。 SBT依赖于http标头Last-Modified,它设置为IPNS的当前日期,IPFS不存在。这意味着快照依赖关系在每次更新时都会更新,或者永远不会更新。我花了最近24小时讨论这个主题,我认为现在没有解决方案将快照工件发布到IPFS。
答案 0 :(得分:0)
刚发现这个问题。将信息添加到上次发布记录时的名称API应该不难,这样您就可以在http标头上获得该信息。那就是说,你找到了https://github.com/magik6k/sbt-publish-ipfs吗?