Skip to content
This repository has been archived by the owner on Dec 22, 2022. It is now read-only.

Commit

Permalink
Changed project structure. Rule-viewer is now its own root-level proj…
Browse files Browse the repository at this point in the history
…ect. The examples have been moved to scala-rules/examples
  • Loading branch information
jhkuperus committed Sep 21, 2016
1 parent 26dee85 commit ecc0daa
Show file tree
Hide file tree
Showing 44 changed files with 17 additions and 184 deletions.
51 changes: 17 additions & 34 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,14 @@ lazy val commonSettings = Seq(

// *** Projects ***

lazy val ruleViewerRoot = (project in file("."))
lazy val ruleViewer = (project in file("."))
.settings(commonSettings: _*)
.settings(
name := "rule-viewer",
description := "Scala Rules Rule Viewer"
description := "Scala Rules Rule Viewer",
libraryDependencies ++= dependencies
)
.aggregate(webInterface)

lazy val exampleCalculations = (project in file("example-calculations"))
.settings(commonSettings: _*)
.settings(
name := "example-calculations",
description := "DSL Examples to use during development of rule viewer",
libraryDependencies ++= exampleCalculationsDependencies
)

lazy val webInterface = (project in file("web-interface"))
.settings(commonSettings: _*)
.settings(
name := "web-interface",
description := "Web Interface",
libraryDependencies ++= webInterfaceDependencies
)
.dependsOn(exampleCalculations)
.enablePlugins(PlayScala)
.enablePlugins(PlayScala, UniversalDeployPlugin)


// *** Dependencies ***
Expand All @@ -51,7 +34,7 @@ lazy val scalaTestVersion = "2.2.5"
lazy val jodaTimeVersion = "2.4"
lazy val jodaConvertVersion = "1.8"

lazy val commonDependencies = Seq(
lazy val dependencies = Seq(
"org.scala-rules" %% "rule-engine" % scalaRulesVersion,
"com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.7.2",
"com.fasterxml.jackson.jaxrs" % "jackson-jaxrs-json-provider" % "2.7.3",
Expand All @@ -62,14 +45,6 @@ lazy val commonDependencies = Seq(
"com.storm-enroute" %% "scalameter" % "0.7" % Test
)

lazy val webInterfaceDependencies = commonDependencies

lazy val exampleCalculationsDependencies = Seq(
"org.scala-rules" %% "finance-dsl" % scalaRulesVersion,
"org.scala-rules" %% "rule-engine-test-utils" % scalaRulesVersion % Test
) ++ commonDependencies


// *** Static analysis ***

lazy val staticAnalysisSettings = {
Expand All @@ -90,10 +65,6 @@ lazy val staticAnalysisSettings = {

addCommandAlias("verify", ";compileScalastyle;testScalastyle;coverage;test;coverageReport;coverageAggregate")

// This command alias allows IntelliJ to start the web interface as well (use it as the target for an SBT Task run configuration)
addCommandAlias("runWebInterface", ";project webInterface;run")


// *** Publishing ***

lazy val publishSettings = Seq(
Expand All @@ -110,6 +81,18 @@ lazy val publishSettings = Seq(
}
)

val packageDist = taskKey[File]("package-dist")

packageDist := (baseDirectory in Compile).value / "target" / "universal" / (name.value + "-" + version.value + ".tgz")

artifact in (Universal, packageDist) ~= { (art:Artifact) => art.copy(`type` = "tgz", extension = "tgz") }

addArtifact(artifact in (Universal, packageDist), packageDist in Universal)

publish <<= (publish) dependsOn (packageZipTarball in Universal)
publishM2 <<= (publishM2) dependsOn (packageZipTarball in Universal)
publishLocal <<= (publishLocal) dependsOn (packageZipTarball in Universal)

lazy val pom =
<developers>
<developer>
Expand Down
File renamed without changes.
File renamed without changes.

This file was deleted.

This file was deleted.

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

This file was deleted.

0 comments on commit ecc0daa

Please sign in to comment.