Skip to content

Commit

Permalink
Fix for sbt#644 (src/deploy in Ant classpath).
Browse files Browse the repository at this point in the history
  • Loading branch information
Simeon H.K. Fitch committed Aug 7, 2015
1 parent 2bfc959 commit b09a602
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ object JDKPackagerAntHelper {
*/
private[jdkpackager] def makeAntBuild(
antTaskLib: Option[File],
antExtraClasspath: Seq[File],
name: String,
sourceDir: File,
mappings: Seq[(File, String)],
Expand All @@ -170,7 +171,7 @@ object JDKPackagerAntHelper {
"""(antPackagerTasks in JDKPackager) := Some("C:\\Program Files\\Java\\jdk1.8.0_45\\lib\\ant-javafx.jar")""")
}

val taskClassPath = Seq(sourceDir.getAbsolutePath, antTaskLib.get, ".")
val taskClassPath = antTaskLib.get +: antExtraClasspath

val (jarFiles, supportFiles) = mappings.partition(_._2.endsWith(".jar"))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,7 @@ trait JDKPackagerKeys {

val writeAntBuild = taskKey[File](
"Write the Ant `build.xml` file to the jdkpackager target directory")

val antExtraClasspath = settingKey[Seq[File]](
"Additional classpath entries for the JavaFX Ant task beyond `antPackagerTasks`")
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ object JDKPackagerPlugin extends AutoPlugin {
jdkPackagerAssociations := Seq.empty
) ++ inConfig(JDKPackager)(
Seq(
sourceDirectory := sourceDirectory.value / dirname,
sourceDirectory := sourceDirectory.value / "deploy",
target := target.value / dirname,
mainClass := (mainClass in Runtime).value,
name := name.value,
Expand All @@ -52,8 +52,10 @@ object JDKPackagerPlugin extends AutoPlugin {
packageDescription := packageDescription.value,
mappings := (mappings in Universal).value,
antPackagerTasks := locateAntTasks(javaHome.value, sLog.value),
antExtraClasspath := Seq(sourceDirectory.value, target.value),
antBuildDefn := makeAntBuild(
antPackagerTasks.value,
antExtraClasspath.value,
name.value,
(stage in Universal).value,
mappings.value,
Expand Down

0 comments on commit b09a602

Please sign in to comment.