Source:
<code><START> private void installLooseApplication(MavenProject proj, File looseConfigFile) throws Exception { <END> String looseConfigFileName = getLooseConfigFileName(proj); String application = looseConfigFileName.substring(0, looseConfigFileName.length() - 4); LooseConfigData config = new LooseConfigData(); switch (proj.getPackaging()) { case "war": validateAppConfig(application, proj.getArtifactId()); log.info(MessageFormat.format(messages.getString("info.install.app"), looseConfigFileName)); installLooseConfigWar(proj, config); deleteApplication(new File(serverDirectory, "apps"), looseConfigFile); deleteApplication(new File(serverDirectory, "dropins"), looseConfigFile); config.toXmlFile(looseConfigFile); break; case "ear": validateAppConfig(application, proj.getArtifactId()); log.info(MessageFormat.format(messages.getString("info.install.app"), looseConfigFileName)); installLooseConfigEar(proj, config); deleteApplication(new File(serverDirectory, "apps"), looseConfigFile); deleteApplication(new File(serverDirectory, "dropins"), looseConfigFile); config.toXmlFile(looseConfigFile); break; case "liberty-assembly": if (mavenWarPluginExists(proj) || new File(proj.getBasedir(), "src/main/webapp").exists()) { validateAppConfig(application, proj.getArtifactId()); log.info(MessageFormat.format(messages.getString("info.install.app"), looseConfigFileName)); installLooseConfigWar(proj, config); deleteApplication(new File(serverDirectory, "apps"), looseConfigFile); deleteApplication(new File(serverDirectory, "dropins"), looseConfigFile); config.toXmlFile(looseConfigFile); } else { log.debug("The liberty-assembly project does not contain the maven-war-plugin or src/main/webapp does not exist."); } break; default: log.info(MessageFormat.format(messages.getString("info.loose.application.not.supported"), proj.getPackaging())); installApp(proj.getArtifact()); break; } }</code><technical_language>couple lines of code looseConfigFileName application name proj. passed in looseConfigFile parameter for that</technical_language>

Target:
private void installLooseApplication(MavenProject proj, File looseConfigFile) throws Exception { String looseConfigFileName = looseConfigFile.getName(); String application = looseConfigFileName.substring(0, looseConfigFileName.length() - 4); LooseConfigData config = new LooseConfigData(); switch (proj.getPackaging()) { case "war": validateAppConfig(application, proj.getArtifactId()); log.info(MessageFormat.format(messages.getString("info.install.app"), looseConfigFileName)); installLooseConfigWar(proj, config); deleteApplication(new File(serverDirectory, "apps"), looseConfigFile); deleteApplication(new File(serverDirectory, "dropins"), looseConfigFile); config.toXmlFile(looseConfigFile); break; case "ear": validateAppConfig(application, proj.getArtifactId()); log.info(MessageFormat.format(messages.getString("info.install.app"), looseConfigFileName)); installLooseConfigEar(proj, config); deleteApplication(new File(serverDirectory, "apps"), looseConfigFile); deleteApplication(new File(serverDirectory, "dropins"), looseConfigFile); config.toXmlFile(looseConfigFile); break; case "liberty-assembly": if (mavenWarPluginExists(proj) || new File(proj.getBasedir(), "src/main/webapp").exists()) { validateAppConfig(application, proj.getArtifactId()); log.info(MessageFormat.format(messages.getString("info.install.app"), looseConfigFileName)); installLooseConfigWar(proj, config); deleteApplication(new File(serverDirectory, "apps"), looseConfigFile); deleteApplication(new File(serverDirectory, "dropins"), looseConfigFile); config.toXmlFile(looseConfigFile); } else { log.debug("The liberty-assembly project does not contain the maven-war-plugin or src/main/webapp does not exist."); } break; default: log.info(MessageFormat.format(messages.getString("info.loose.application.not.supported"), proj.getPackaging())); installApp(proj.getArtifact()); break; } }