diff --git a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/applications/DeployMojo.java b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/applications/DeployMojo.java index a78ab20e4..56cdfcd1c 100644 --- a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/applications/DeployMojo.java +++ b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/applications/DeployMojo.java @@ -196,6 +196,7 @@ private void installLooseApplication(MavenProject proj) throws Exception { String application = looseConfigFileName.substring(0, looseConfigFileName.length() - 4); File destDir = new File(serverDirectory, getAppsDirectory()); File looseConfigFile = new File(destDir, looseConfigFileName); + File applicationFullPath = new File(destDir, application); File devcDestDir = new File(new File(project.getBuild().getDirectory(), DevUtil.DEVC_HIDDEN_FOLDER), getAppsDirectory()); File devcLooseConfigFile = new File(devcDestDir, looseConfigFileName); @@ -204,7 +205,7 @@ private void installLooseApplication(MavenProject proj) throws Exception { switch (proj.getPackaging()) { case "war": - validateAppConfig(application, proj.getArtifactId()); + validateAppConfig(applicationFullPath.getCanonicalPath(), application, proj.getArtifactId()); log.info(MessageFormat.format(messages.getString("info.install.app"), looseConfigFileName)); installLooseConfigWar(proj, config, false); installAndVerifyApp(config, looseConfigFile, application); @@ -216,7 +217,7 @@ private void installLooseApplication(MavenProject proj) throws Exception { } break; case "ear": - validateAppConfig(application, proj.getArtifactId()); + validateAppConfig(applicationFullPath.getCanonicalPath(), application, proj.getArtifactId()); log.info(MessageFormat.format(messages.getString("info.install.app"), looseConfigFileName)); installLooseConfigEar(proj, config, false); installAndVerifyApp(config, looseConfigFile, application); @@ -229,7 +230,7 @@ private void installLooseApplication(MavenProject proj) throws Exception { break; case "liberty-assembly": if (mavenWarPluginExists(proj) || new File(proj.getBasedir(), "src/main/webapp").exists()) { - validateAppConfig(application, proj.getArtifactId()); + validateAppConfig(applicationFullPath.getCanonicalPath(), application, proj.getArtifactId()); log.info(MessageFormat.format(messages.getString("info.install.app"), looseConfigFileName)); installLooseConfigWar(proj, config, false); installAndVerifyApp(config, looseConfigFile, application); diff --git a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/applications/DeployMojoSupport.java b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/applications/DeployMojoSupport.java index 700dbee4b..135a4272d 100644 --- a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/applications/DeployMojoSupport.java +++ b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/applications/DeployMojoSupport.java @@ -381,10 +381,6 @@ private boolean containsJavaSource(File dir) { return false; } - protected void validateAppConfig(String fileName, String artifactId) throws Exception { - validateAppConfig(null, fileName, artifactId, false); - } - protected void validateAppConfig(String fullyQualifiedFileName, String fileName, String artifactId) throws Exception { validateAppConfig(fullyQualifiedFileName, fileName, artifactId, false); }