2016-06-21 14 views
1

ich ein build.sbt für mein Projekt bin die Schaffung und es hat erwähnt, Abhängigkeiten wieWie kann ich eine Variable in sbt

libraryDependencies ++= Seq(
         "com.typesafe.akka"   % "akka-actor_2.11"       % "2.3.15", 
         "org.scalaz"     % "scalaz-core_2.11"      % "7.2.0", 
         "org.scalactic"    % "scalactic_2.11"       % "2.2.6" , 
         "org.scalatest"    % "scalatest_2.11"       % "2.2.6" % "test", 
         "org.scalamock"    % "scalamock-scalatest-support_2.11"  % "3.2.2" % "test", 
         "org.springframework" % "spring-context" % "4.1.6.RELEASE", 
         "org.springframework" % "spring-beans" % "4.1.6.RELEASE", 
         "org.springframework" % "spring-core" % "4.1.6.RELEASE", 
         "org.springframework" % "spring-context" % "4.1.6.RELEASE", 
         "org.springframework" % "spring-web" % "4.1.6.RELEASE", 
         "com.google.guava" % "guava" % "14.0.1", 
         "com.google.code.gson" % "gson" % "2.3", 
         "commons-lang" % "commons-lang" % "2.5", 
         "net.sf.opencsv" % "opencsv" % "2.3", 
         "com.thoughtworks.xstream" % "xstream" % "1.4.8", 
         "commons-io" % "commons-io" % "1.4", 
         "commons-codec" % "commons-codec" % "1.6", 
         "commons-collections" % "commons-collections" % "3.2.2", 
         "commons-logging" % "commons-logging" % "1.1.1", 
         "org.apache.httpcomponents" % "httpclient" % "4.3.3", 
         "org.apache.httpcomponents" % "httpmime" % "4.3.3", 
         "jmdns" % "jmdns" % "0.2", 
         "com.sun.mail" % "javax.mail" % "1.5.4", 
         "junit" % "junit" % "4.12" % "test" 
    ) 

ich die Versionen anderer Stelle als Variablen angeben möchten und beziehen sich auf die (Variablen) in den Abhängigkeiten. Kann das wie in Großbuchstaben gemacht werden?

+1

SBT Build ist nur ein Code, so dass Sie alles tun können. Z.B. Lesen Sie einige Datei- oder env-Variablen und verwenden Sie sie einfach in 'libraryDependencies' – amorfis

Antwort

Verwandte Themen