Skip to content

Commit

Permalink
Tidy up a little
Browse files Browse the repository at this point in the history
  • Loading branch information
earldouglas committed Nov 16, 2015
1 parent 3ca0ae1 commit 1eca153
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/main/scala/com/earldouglas/xwp/WebappPlugin.scala
Expand Up @@ -49,10 +49,11 @@ object WebappPlugin extends AutoPlugin {
} yield out
}).apply(in)

val (art, file) = (packagedArtifact in (Compile, packageBin)).value
val webappSrcDir = (sourceDirectory in webappPrepare).value
val webappTarget = (target in webappPrepare).value
val classpath = (fullClasspath in Runtime).value
val webInfDir = webappTarget / "WEB-INF"
val webappLibDir = webInfDir / "lib"

cacheify(
"webapp",
Expand All @@ -66,9 +67,6 @@ object WebappPlugin extends AutoPlugin {
(webappSrcDir ** "*").get.toSet
)

val webInfDir = webappTarget / "WEB-INF"
val webappLibDir = webInfDir / "lib"

if (webappWebInfClasses.value) {
// copy this project's classes directly to WEB-INF/classes
cacheify(
Expand Down Expand Up @@ -102,7 +100,8 @@ object WebappPlugin extends AutoPlugin {
if dir.isDirectory
artEntry <- cpItem.metadata.entries find { e => e.key.label == "artifact" }
cpArt = artEntry.value.asInstanceOf[Artifact]
if cpArt != art
artifact = (packagedArtifact in (Compile, packageBin)).value._1
if cpArt != artifact
files = (dir ** "*").get flatMap { file =>
if (!file.isDirectory)
IO.relativize(dir, file) map { p => (file, p) }
Expand Down

0 comments on commit 1eca153

Please sign in to comment.