Skip to content

Commit

Permalink
Revert "fix duplicate application.ini mappings when both BASH and BAT…
Browse files Browse the repository at this point in the history
… are used (#1056)"

This reverts commit 6c9351c.
  • Loading branch information
muuki88 authored Oct 29, 2017
1 parent 6c9351c commit 643a2bf
Showing 1 changed file with 10 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,17 @@ trait ApplicationIniGenerator {
val pathMapping = cleanApplicationIniPath(location)
//Do not use writeLines here because of issue #637
IO.write(configFile, ("# options from build" +: javaOptions).mkString("\n"))
val filteredMappings = universalMappings.filter {
case (`configFile`, `pathMapping`) =>
// ignore duplicate application.ini mappings with identical contents
// for example when using both the BASH and BAT plugin
false

case (_, `pathMapping`) =>
// specified a custom application.ini file *and* JVM options
// TODO: merge JVM options into the existing application.ini?
log.warn("--------!!! JVM Options are defined twice !!!-----------")
log.warn(
"application.ini is already present in output package. Will be overridden by 'javaOptions in Universal'"
)
false

case _ =>
true
val hasConflict = universalMappings.exists {
case (file, path) => file != configFile && path == pathMapping
}
// Warn the user if he tries to specify options
if (hasConflict) {
log.warn("--------!!! JVM Options are defined twice !!!-----------")
log.warn(
"application.ini is already present in output package. Will be overridden by 'javaOptions in Universal'"
)
}
(configFile -> pathMapping) +: filteredMappings
(configFile -> pathMapping) +: universalMappings

}
.getOrElse(universalMappings)
Expand Down

0 comments on commit 643a2bf

Please sign in to comment.