如何配置我的 SBT 以使用帶有指定插件的插件? (How to configure my SBT to use a plugin with a specified plugin?)


問題描述

如何配置我的 SBT 以使用帶有指定插件的插件? (How to configure my SBT to use a plugin with a specified plugin?)

I want to use the lifty plugin, but failed to download it in SBT.

C:\Users\Freewind>sbt sbt‑version
[info] 0.12.3
> console
Welcome to Scala version 2.9.2 (Java HotSpot(TM) 64‑Bit Server VM, Java 1.7.0_04).

I followed the document of lifty, to insert the code to my project/plugins.sbt:

resolvers += Resolver.url("sbt‑plugin‑releases", 
    new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt‑plugin‑releases/"))(Resolver.ivyStylePatterns)

addSbtPlugin("org.lifty" % "lifty" % "1.7.4")

And to my build.sbt:

seq( Lifty.liftySettings : _*)

It reports warnings when I run sbt:

[warn]  module not found: org.lifty#lifty;1.7.4
[warn] ==== typesafe‑ivy‑releases: tried
[warn]   http://repo.typesafe.com/typesafe/ivy‑releases/org.lifty/lifty/scala_2.9.2/sbt_0.12/1.7.4/ivys/ivy.xml
[warn] ==== sbt‑plugin‑releases: tried
[warn]   http://scalasbt.artifactoryonline.com/scalasbt/sbt‑plugin‑releases/org.lifty/lifty/scala_2.9.2/sbt_0.12/1.7.4/ivys/ivy.xml
[warn] ==== local: tried
[warn]   X:\.sbt\local\org.lifty\lifty\scala_2.9.2\sbt_0.12\1.7.4\ivys\ivy.xml
[warn] ==== sbt‑plugin‑releases: tried
[warn]   http://scalasbt.artifactoryonline.com/scalasbt/sbt‑plugin‑releases/org.lifty/lifty/scala_2.9.2/sbt_0.12/1.7.4/ivys/ivy.xml
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/org/lifty/lifty_2.9.2_0.12/1.7.4/lifty‑1.7.4.pom

You can see it tries to find somewhere include lifty\scala_2.9.2\sbt_0.12

But from the resolver, I can find one valid url of:

http://scalasbt.artifactoryonline.com/scalasbt/sbt‑plugin‑releases/org.lifty/lifty/scala_2.9.1/sbt_0.11.2/1.7.4/

It only supports scala_2.9.1 and sbt‑0.11.2

How to change my configuration to use this specified version of lifty?


參考解法

方法 1:

They dont have a versino for scala 2.10 at the moment, so you can't use it with you configuration

方法 2:

In your sbt build definition file build.sbt change the scala version to 

scalaVersion := 2.9.1

that should work.

Also FYI,

lifty is not under development any more. https://github.com/Lifty/lifty

(by Freewind4lex1vRajesh Pitty)

參考文件

  1. How to configure my SBT to use a plugin with a specified plugin? (CC BY‑SA 3.0/4.0)

#Version #lift #Plugins #sbt #scala






相關問題

XCode4 Organizer - 由於 CFBundleVersion 錯誤,應用程序驗證失敗 (XCode4 Organizer - App fails validation due to CFBundleVersion error)

如何避免編譯iOS 4.0提供的常量,並內置到iOS 3.1的設備中 (How to avoid compiling the constant which is provided in iOS 4.0, and build into the device with iOS 3.1)

如何從 CLI 中查找 php 中內置模塊的版本號 (how to find the version numbers of built in modules in php from the CLI)

Tài liệu trực tuyến Ruby / GSL cho phiên bản sai? (Ruby/GSL online documentation for wrong version?)

如何配置我的 SBT 以使用帶有指定插件的插件? (How to configure my SBT to use a plugin with a specified plugin?)

安裝舊版本的 Python 以在 Mac OS X 上進行測試 (Install older versions of Python for testing on Mac OS X)

檢測/指紋手機品牌和型號的替代方法? (Alternative way to detect/fingerprint phone make and model?)

實體框架發布揭秘 (Entity Framework Releases Demystified)

android SDK 版本之間的差異 (Difference between android SDK versions)

如何檢索顯示上游狀態的 git 版本信息 (How do I retrieve git version info showing upstream state)

嘗試使用 get-PnPFile 從 OneDrive 獲取文件的所有版本時找不到文件 (File not found trying to get all versions of a file from OneDrive using get-PnPFile)

獲取.Net Core 3.1 單文件可執行版本號 (Get .Net Core 3.1 single-file executable version number)







留言討論