메뉴 건너뛰기

Cloudera, BigData, Semantic IoT, Hadoop, NoSQL

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


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

총관리자 2017.10.12 17:12 조회 수 : 1485

gooper@gsda1:/home/gooper/online-auction-java$ cat build.sbt
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,
    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 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,
      "com.datastax.cassandra" % "cassandra-driver-extras" % "3.0.0"
    )
  )
  .settings(lagomForkedTestSettings: _*)
  .dependsOn(tools, 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(
      lagomJavadslPersistenceCassandra,
      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,
      lagomJavadslTestKit,
      lombok
    ) ++ lagomJUnitDeps
  )


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

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

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

lazy val userImpl = (project in file("user-impl"))
  .settings(commonSettings: _*)
  .enablePlugins(LagomJava)
  .dependsOn(userApi)
  .settings(
    version := "1.0-SNAPSHOT",
    libraryDependencies += lagomJavadslPersistenceCassandra
  )

lazy val webGateway = (project in file("web-gateway"))
  .settings(commonSettings: _*)
  .enablePlugins(PlayJava && LagomPlay)
  .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"
    ),
    // 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"

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")

lagomServiceLocatorPort in ThisBuild := 10030
lagomServiceGatewayPort in ThisBuild := 10040

lagomKafkaEnabled in ThisBuild := false
//lagomKafkaAddress in ThisBuild := "gsda1:9092,gsda2:9092,gsda3:9092"
lagomKafkaAddress in ThisBuild := "gsda1:9092"


lagomCassandraEnabled in ThisBuild := false
//lagomUnmanagedServices in ThisBuild := Map("cas_native" -> "http://gsda1:9042,http://gsda3:9042")
lagomUnmanagedServices in ThisBuild := Map("cas_native" -> "http://gsda3:9042")

libraryDependencies ++= Seq(lagomJavadslPersistence)

번호 제목 날짜 조회 수
461 Windows7 64bit 환경에서 ElasticSearch 5.6.3설치하기 2017.10.13 1044
460 windows 혹은 mac에서 docker설치하기 위한 파일 2017.10.13 203
459 lagom-windows용 build.sbt파일 내용 2017.10.12 254
» lagom-linux용 build.sbt파일 내용 2017.10.12 1485
457 lagom의 online-auction-java프로젝트 실행시 외부의 kafka/cassandra를 사용하도록 설정하는 방법 2017.10.12 837
456 lagom의 online-auction-java프로젝트 실행시 "Could not find Cassandra contact points, due to: ServiceLocator is not bound" 경고 발생시 조치사항 2017.10.12 391
455 Hadoop 2.7.x에서 사용할 수 있는 파일/디렉토리 관련 util성 클래스 파일 2017.09.28 194
454 python3.5에서 numpy버젼에 따른 문제점을 조치하는 방법및 pymysql import할때 오류 발생시 조치사항 2017.09.28 703
453 fuseki에서 제공하는 script중 s-post를 사용하는 예문 2017.09.15 1002
452 core 'gc_shard3_replica2' is already locked라는 오류가 발생할때 조치사항 2017.09.14 614
451 editLog의 문제로 발생하는 journalnode 기동 오류 발생시 조치사항 2017.09.14 439
450 halyard 1.3의 console을 이용하여 100억건의 데이타에 대한 쿼리수행시 ScannerTimeoutException 발생시 조치사항 2017.09.06 925
449 hadoop cluster구성된 노드를 확인시 Capacity를 보면 색이 붉은색으로 표시되어 있는 경우나 Unhealthy인 경우 처리방법 2017.08.30 427
448 파일은 남겨두고 파일 내용만 지우고자 할 때. 2017.08.30 476
447 RDF4J의 RESTFul API처리 클래스 소스 파악(web module위주) 2017.08.30 431
446 RDF4J의 rdf4j-server.war가 제공하는 RESTFul API를 이용한 CRUD테스트(트랜잭션처리) 2017.08.30 967
445 RDF4J의 rdf4j-server.war가 제공하는 RESTFul API를 이용하여 repository에 CRUD테스트 2017.08.30 899
444 DeviceType이 o:motion-sensor_33 이거나 o:motion-sensor_32 경우의 sparql문장은 다음과 같다. 2017.08.16 976
443 [oneM2M]Ontologies used for oneM2M 2017.08.02 868
442 Windows7 64bit 환경에서 Apache Spark 2.2.0 설치하기 2017.07.26 916
위로