2012-04-23 10 views
2

私はsbt 0.7.xビルドスクリプトをsbt 0.11.2に変換しています。サブプロジェクトからさまざまなJARをまとめて収集する作業を書いています。古いビルドでは、タスクの一部が以下を実行します。sbtサブプロジェクトのmanagedClasspathへのアクセス

deployedProjects.foreach { 
    p: BasicScalaProject => 
    p.managedClasspath(config("compile")) --- p.managedClasspath(config("provided")) 
    // etc 
} 

sbt 0.11で同等の処理を行うにはどうすればよいですか?特に

を::

  • どうやって設定/タスクのリストに依存して、タスクを書くことができますか?追記

    たとえば、すべてのmanagedClasspathに依存するタスクをサブプロジェクトのリストから作成するには(すべてをタプルにまとめずに)

  • "提供された"とマークされている、またはマークされていない管理されたjarを取得する特定の範囲はありますか? SBTでは

答えて

0

0.11.xタスクmanagedClasspathがあります:

例えば、あなたは、様々な構成に適用範囲この作業をすることができていることがわかり、デリゲートを見てみると
> inspect managed-classpath 
[info] Task: scala.collection.Seq[sbt.Attributed[java.io.File]] 
[info] Description: 
[info] The classpath consisting of external, managed library dependencies. 
[info] Provided by: 
[info] {file:/Users/heiko/tmp/test/}default-f3fb6c/compile:managed-classpath 
[info] Dependencies: 
[info] compile:classpath-configuration 
[info] compile:classpath-types 
[info] compile:update 
[info] Reverse dependencies: 
[info] compile:external-dependency-classpath 
[info] Delegates: 
[info] compile:managed-classpath 
[info] *:managed-classpath 
[info] {.}/compile:managed-classpath 
[info] {.}/*:managed-classpath 
[info] */compile:managed-classpath 
[info] */*:managed-classpath 
[info] Related: 
[info] test:managed-classpath 
[info] runtime:managed-classpath 

> show compile:managed-classpath 
[info] Updating {file:/Users/heiko/tmp/test/}default-f3fb6c... 
[info] Resolving org.scala-lang#scala-library;2.9.1 ... 
[info] Done updating. 
[info] ArraySeq(Attributed(/Users/heiko/.sbt/boot/scala-2.9.1/lib/scala-library.jar)) 
+0

おかげで、私はまだ後に私が何であったかを正確に達成するかどうかはわかりません - 私は、より正確には質問を更新しました:コンパイルします。 –

関連する問題