메뉴 건너뛰기

Cloudera, BigData, Semantic IoT, Hadoop, NoSQL

Cloudera CDH/CDP 및 Hadoop EcoSystem, Semantic IoT등의 개발/운영 기술을 정리합니다. gooper@gooper.com로 문의 주세요.


lagom lagom-windows용 build.sbt파일 내용

총관리자 2017.10.12 17:13 조회 수 : 2949

organization in ThisBuild := "com.example"

scalaVersion in ThisBuild := "2.11.8"

EclipseKeys.projectFlavor in Global := EclipseProjectFlavor.Java


lazy val root = (project in file("."))
  .settings(name := "online-auction-java")
  .aggregate(
    tools, testkit, security,
    itemApi, itemImpl,
    biddingApi, biddingImpl,
    userApi, userImpl,
    transactionApi, transactionImpl,
    searchApi, searchImpl,
    webGateway)
  .settings(commonSettings: _*)

lazy val security = (project in file("security"))
  .settings(commonSettings: _*)
  .settings(
    version := "1.0-SNAPSHOT",
    libraryDependencies ++= Seq(
      lagomJavadslApi,
      lagomJavadslServer % Optional
    )
  )


lazy val testkit = (project in file("testkit"))
  .settings(commonSettings: _*)
  .settings(
    version := "1.0-SNAPSHOT",
    libraryDependencies ++= Seq(
      lagomJavadslApi,
      lagomJavadslPersistenceCassandra
    )
  )
  .dependsOn(tools)

lazy val itemApi = (project in file("item-api"))
  .settings(commonSettings: _*)
  .settings(
    version := "1.0-SNAPSHOT",
    libraryDependencies ++= Seq(
      lagomJavadslApi,
      lombok
    )
  )
  .dependsOn(security, tools)

lazy val itemImpl = (project in file("item-impl"))
  .settings(commonSettings: _*)
  .settings(kafkaSettings: _*)
  .enablePlugins(LagomJava)
  .settings(
    version := "1.0-SNAPSHOT",
    libraryDependencies ++= Seq(
      lagomJavadslPersistenceCassandra,
      lagomJavadslTestKit,
      lagomJavadslKafkaBroker,
      cassandraExtras
    )
  )
  .settings(lagomForkedTestSettings: _*)
  .dependsOn(
    tools,
    testkit % "test",
    itemApi,
    biddingApi
  )

lazy val biddingApi = (project in file("bidding-api"))
  .settings(commonSettings: _*)
  .settings(
    version := "1.0-SNAPSHOT",
    libraryDependencies ++= Seq(
      lagomJavadslApi,
      lombok
    )
  )
  .dependsOn(security)

lazy val biddingImpl = (project in file("bidding-impl"))
  .settings(commonSettings: _*)
  .settings(kafkaSettings: _*)
  .enablePlugins(LagomJava)
  .dependsOn(biddingApi, itemApi)
  .settings(
    version := "1.0-SNAPSHOT",
    libraryDependencies ++= Seq(
      lagomJavadslPersistenceCassandra,
      lagomJavadslTestKit,
      lagomJavadslKafkaBroker
    ),
    maxErrors := 10000

  )

lazy val searchApi = (project in file("search-api"))
  .settings(commonSettings: _*)
  .settings(
    version := "1.0-SNAPSHOT",
    libraryDependencies ++= Seq(
      lagomJavadslApi,
      lombok
    )
  )
  .dependsOn(security, tools)

lazy val searchImpl = (project in file("search-impl"))
  .settings(commonSettings: _*)
  .settings(kafkaSettings: _*)
  .enablePlugins(LagomJava)
  .settings(
    version := "1.0-SNAPSHOT",
    libraryDependencies ++= Seq(
      lagomJavadslTestKit,
      lagomJavadslKafkaClient,
      lombok
    ),
    testOptions in Test += Tests.Argument(TestFrameworks.JUnit, elasticsearch)
  )
  .dependsOn(tools, searchApi, itemApi, biddingApi)

lazy val tools = (project in file("tools"))
  .settings(commonSettings: _*)
  .settings(
    version := "1.0-SNAPSHOT",
    libraryDependencies ++= Seq(
      lagomJavadslApi,
      lombok
    )
  )


lazy val transactionApi = (project in file("transaction-api"))
  .settings(commonSettings: _*)
  .settings(
    version := "1.0-SNAPSHOT",
    libraryDependencies ++= Seq(
      lagomJavadslApi,
      lombok
    )
  )
  .dependsOn(security, itemApi)

lazy val transactionImpl = (project in file("transaction-impl"))
  .settings(commonSettings: _*)
  .settings(kafkaSettings: _*)
  .enablePlugins(LagomJava)
  .dependsOn(
    transactionApi,
    itemApi,
    tools,
    testkit % "test"
  ).settings(
  version := "1.0-SNAPSHOT",
  libraryDependencies ++= Seq(
    lagomJavadslPersistenceCassandra,
    lagomJavadslTestKit,
    lagomJavadslKafkaBroker,
    cassandraExtras
  )
)

lazy val userApi = (project in file("user-api"))
  .settings(commonSettings: _*)
  .settings(
    version := "1.0-SNAPSHOT",
    libraryDependencies ++= Seq(
      lagomJavadslApi,
      lombok
    )
  )
  .dependsOn(security, tools)

lazy val userImpl = (project in file("user-impl"))
  .settings(commonSettings: _*)
  .settings(kafkaSettings: _*)
  .enablePlugins(LagomJava)
  .dependsOn(userApi, tools,
    testkit % "test"
  )
  .settings(
    version := "1.0-SNAPSHOT",
    libraryDependencies ++= Seq(
      lagomJavadslPersistenceCassandra,
      lagomJavadslTestKit,
      "de.svenkubiak" % "jBCrypt" % "0.4",
      lagomJavadslKafkaBroker,
      cassandraExtras,
      lombok
    )
  )

lazy val webGateway = (project in file("web-gateway"))
  .settings(commonSettings: _*)
  .enablePlugins(PlayJava && LagomPlay)
  .disablePlugins(PlayLayoutPlugin) // use the standard sbt layout... src/main/java, etc.
  .dependsOn(tools, transactionApi, biddingApi, itemApi, searchApi, userApi, searchApi)
  .settings(
    version := "1.0-SNAPSHOT",
    libraryDependencies ++= Seq(
      lagomJavadslClient,
      "org.ocpsoft.prettytime" % "prettytime" % "3.2.7.Final",
      "org.webjars" % "foundation" % "6.2.3",
      "org.webjars" % "foundation-icon-fonts" % "d596a3cfb3"
    ),

    PlayKeys.playMonitoredFiles ++= (sourceDirectories in (Compile, TwirlKeys.compileTemplates)).value,

    // Workaround for https://github.com/lagom/online-auction-java/issues/22
    // Uncomment the commented out line and remove the Scala line when issue #22 is fixed
    EclipseKeys.projectFlavor in Global := EclipseProjectFlavor.Scala,
    // EclipseKeys.createSrc := EclipseCreateSrc.ValueSet(EclipseCreateSrc.ManagedClasses, EclipseCreateSrc.ManagedResources)
    EclipseKeys.preTasks := Seq(compile in Compile)
  )

val lombok = "org.projectlombok" % "lombok" % "1.16.10"
val cassandraExtras = "com.datastax.cassandra" % "cassandra-driver-extras" % "3.0.0"

def elasticsearch: String = {
  val enableElasticsearch = sys.props.getOrElse("enableElasticsearch", default = "false")
  if (enableElasticsearch == "true") {
    "--include-categories=com.example.auction.search.impl.ElasticsearchTests"
  } else {
    "--exclude-categories=com.example.auction.search.impl.ElasticsearchTests"
  }
}

def commonSettings: Seq[Setting[_]] = eclipseSettings ++ Seq(
  javacOptions in Compile ++= Seq("-encoding", "UTF-8", "-source", "1.8"),
  javacOptions in(Compile, compile) ++= Seq("-Xlint:unchecked", "-Xlint:deprecation", "-parameters")
)

// Include this into impl projects that use the message broker API
// It overrides the production configuration to use a hardcoded Kafka broker
// host and port rather than looking it up from the service locator.
// See docs/running-in-conductr.md for details.
def kafkaSettings: Seq[Setting[_]] = Seq(
  BundleKeys.startCommand ++= Seq(
    "-Dlagom.broker.kafka.service-name=''",
    // You may have to edit this list if your Kafka
    // server is not listening on 127.0.0.1:9092
    //"-Dlagom.broker.kafka.brokers='127.0.0.1:9092'"

    "-Dlagom.broker.kafka.brokers='gsda1:9092'"
  )
)

lagomCassandraCleanOnStart in ThisBuild := false

// ------------------------------------------------------------------------------------------------

// register 'elastic-search' as an unmanaged service on the service locator so that at 'runAll' our code
// will resolve 'elastic-search' and use it. See also com.example.com.ElasticSearch
lagomUnmanagedServices in ThisBuild += ("elastic-search" -> "http://127.0.0.1:9200")

// service locator port
lagomServiceLocatorPort in ThisBuild := 10030

// service gateway port
lagomServiceGatewayPort in ThisBuild := 10040

// 내부 kafka를 기동하지 않고 외부의 kafka를 사용함
lagomKafkaEnabled in ThisBuild := false
//lagomKafkaAddress in ThisBuild := "gsda1:9092,gsda2:9092,gsda3:9092"
lagomKafkaAddress in ThisBuild := "gsda1:9092"

// 내부 Cassandra를 기동하지 않고 외부 Cassandra를 사용함
lagomCassandraEnabled in ThisBuild := false
lagomUnmanagedServices in ThisBuild := Map("cas_native" -> "http://gsda3:9042")

libraryDependencies ++= Seq(lagomJavadslPersistence)


번호 제목 날짜 조회 수
530 index생성, 삭제, 활용 2014.04.25 4490
529 [Hadoop Encryption] Encryption Zone 생성/설정시 User:hadoop not allowed to do 'DECRYPT_EEK' ON 'testkey' 오류 발생 조치 사항 2023.06.28 4489
528 hue.desktop_document2의 type의 종류 2020.02.10 4485
527 [Cloudera Agent] Metadata-Plugin throttling_logger INFO (713 skipped) Unable to send data to nav server. Will try again. 2022.05.16 4484
526 postgresql-9.4에서 FATAL: remaining connection slots are reserved for non-replication superuser connections가 나올때 조치 2018.08.16 4481
525 Query Status: Sender xxx.xxx.xxx.xxx timed out waiting for receiver fragment instance: 1234:cdsf, dest node: 10 의 오류 원인및 대응방안 2021.11.03 4478
524 ExWordCount jar파일 file 2013.03.06 4477
523 우분투 root 패스워드 설정하기 2013.03.04 4476
522 secureCRT에서 backspace키가 작동하지 않는 경우 해결방법 2015.05.11 4474
521 DataNode를 기동할때 "Block pool ID needed, but service not yet registered with NN" 오류 발생에 따른 조치사항 2018.05.28 4471
520 cloudera(python 2.7.5)에서 anaconda3로 설치한 외부 python(3.6.6)을 이용하여 pyspark를 사용하는 설정 2018.09.14 4466
519 "File /user/hadoop/share/lib does not exist" 오류 해결방법 2015.06.07 4462
518 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable원인 2015.04.27 4462
517 apt-get install mysql-server수행시 "404 Not Found" 오류발생시 조치방법 2014.09.10 4462
516 ubuntu에 hadoop 2.0.5설치하기 2013.12.16 4462
515 Cannot create /var/run/oozie/oozie.pid: Directory nonexistent오류 2014.06.03 4451
514 Error: Could not find or load main class nodemnager 가 발생할때 해결하는 방법 2015.06.05 4450
513 Hadoop Clsuter에 이미 포함된 host의 hostname변경시 처리 절차 2023.03.24 4448
512 source의 type을 spooldir로 하는 경우 해당 경로에 파일이 들어오면 파일단위로 전송함 2014.05.20 4445
511 HBase 0.98.12(1.2.5) for hadoop2 설치-5대에 완전분산모드 (HDFS HA상테) 2015.04.29 4438
위로