Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,21 @@ protected Integer doExport() throws Exception {
}
}

// auto-detect application.properties and include it
{
String name = baseDir.resolve("application.properties").toString();
if (Files.exists(Paths.get(name)) && !files.contains(name)) {
files.add(name);
}
}
if (profile != null) {
// need to include profile application properties if exists
String name = baseDir.resolve("application-" + profile + ".properties").toString();
if (Files.exists(Paths.get(name)) && !files.contains(name)) {
files.add(name);
}
}

// application.properties
doLoadAndInitProfileProperties(baseDir.resolve("application.properties"));
if (profile != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,13 @@ private int run() throws Exception {
addDependencies(pomDependencies.toArray(new String[0]));
}

// auto-detect application.properties and include it
if (!empty && sourceDir == null) {
String appProps = baseDir.resolve("application.properties").toString();
if (Files.exists(Paths.get(appProps)) && !files.contains(appProps)) {
files.add(appProps);
}
}
if (profile != null) {
// need to include profile application properties if exists
String name = baseDir + "/application-" + profile + ".properties";
Expand Down
Loading