Copy springBoot application to devc hidden folder in container mode
@@ -120,11 +120,16 @@ public class DeployMojo extends DeployMojoSupport {
String appsDirName = getAppsDirectory();
File archiveTarget = null;
File appsDir = null;
+ String rootDirectory = serverDirectory;
+
+ if (project.getProperties().containsKey("container")) {
+ rootDirectory = new File(project.getBuild().getDirectory(), DevUtil.DEVC_HIDDEN_FOLDER);
+ }
if("apps".equals(appsDirName)){
- appsDir = new File(serverDirectory, appsDirName);
+ appsDir = new File(rootDirectory, appsDirName);
} else if ("dropins".equals(appsDirName)) {
- appsDir = new File(serverDirectory, appsDirName+"/spring");
+ appsDir = new File(rootDirectory, appsDirName+"/spring");
}
archiveTarget = new File(appsDir, "thin-" + archiveSrc.getName());
return archiveTarget;
