Commit 643a2bf 1 parent 6c9351c commit 643a2bf Copy full SHA for 643a2bf
File tree 1 file changed +10
-18
lines changed
src/main/scala/com/typesafe/sbt/packager/archetypes/scripts
1 file changed +10
-18
lines changed Original file line number Diff line number Diff line change @@ -21,25 +21,17 @@ trait ApplicationIniGenerator {
21
21
val pathMapping = cleanApplicationIniPath(location)
22
22
// Do not use writeLines here because of issue #637
23
23
IO .write(configFile, (" # options from build" +: javaOptions).mkString(" \n " ))
24
- val filteredMappings = universalMappings.filter {
25
- case (`configFile`, `pathMapping`) =>
26
- // ignore duplicate application.ini mappings with identical contents
27
- // for example when using both the BASH and BAT plugin
28
- false
29
-
30
- case (_, `pathMapping`) =>
31
- // specified a custom application.ini file *and* JVM options
32
- // TODO: merge JVM options into the existing application.ini?
33
- log.warn(" --------!!! JVM Options are defined twice !!!-----------" )
34
- log.warn(
35
- " application.ini is already present in output package. Will be overridden by 'javaOptions in Universal'"
36
- )
37
- false
38
-
39
- case _ =>
40
- true
24
+ val hasConflict = universalMappings.exists {
25
+ case (file, path) => file != configFile && path == pathMapping
26
+ }
27
+ // Warn the user if he tries to specify options
28
+ if (hasConflict) {
29
+ log.warn(" --------!!! JVM Options are defined twice !!!-----------" )
30
+ log.warn(
31
+ " application.ini is already present in output package. Will be overridden by 'javaOptions in Universal'"
32
+ )
41
33
}
42
- (configFile -> pathMapping) +: filteredMappings
34
+ (configFile -> pathMapping) +: universalMappings
43
35
44
36
}
45
37
.getOrElse(universalMappings)
You can’t perform that action at this time.
0 commit comments