Source:
protected void installLooseConfigApp() throws Exception { setAppsDirectory(); if (getAppsDirectory().equalsIgnoreCase("apps") && !isApplicationConfigured()) { addAppConfiguration(project.getBuild().getFinalName()); } File destDir = new File(serverDirectory, getAppsDirectory()); File looseConfigFile = new File(destDir, getLooseConfigFileName(project)); LooseConfigData config = new LooseConfigData(); log.info(MessageFormat.format(messages.getString("info.install.app"), getLooseConfigFileName(project))); File dir = new File(project.getBasedir() + "/src/main/webapp"); if (dir.exists()) { config.addDir(dir.getCanonicalPath(), "/"); } dir = new File(project.getBuild().getOutputDirectory()); if (dir.exists()) { config.addDir(dir.getCanonicalPath(), "/WEB-INF/classes"); } else { throw new MojoExecutionException(MessageFormat.format(messages.getString("error.project.not.compile"), project.getId())); } List<Artifact> libraries = getDependentLibraries(); if (!libraries.isEmpty()) { List<String> eclipseModules = getEclipseDependentMods(); if (eclipseModules.isEmpty()) { addLibraries(libraries, config); } else { for (Artifact library : libraries) { if (library.getFile() == null || !eclipseModules.contains(getFileName(library.getFile()))) { addLibraryFromM2(library, config); } else { File classDir = new File(project.getBasedir() + "/../" + library.getArtifactId() + "/target/classes"); log.debug("sibling module target class directory pathname: " + classDir.getCanonicalPath()); if (classDir.exists()) { config.addArchive(classDir.getCanonicalPath(), "/WEB-INF/lib/" + getFileName(library.getFile())); } else { addLibraryFromM2(library, config); } } } } } config.toXmlFile(looseConfigFile); }

Target:
protected void installLooseConfigApp() throws Exception { String appsDir = getAppsDirectory(); if (appsDir.equalsIgnoreCase("apps") && !isAppConfigInTargetServerXml()) { String fileName = getApplicationFilename(); if (fileName != null && fileName.endsWith(".war")) { addAppConfiguration(fileName.substring(0, fileName.length() - 4), "war"); } } else if (appsDir.equalsIgnoreCase("dropins") && isAppConfigInTargetServerXml()) throw new MojoExecutionException(messages.getString("error.install.app.dropins.directory")); File destDir = new File(serverDirectory, appsDir); File looseConfigFile = new File(destDir, getLooseConfigFileName(project)); LooseConfigData config = new LooseConfigData(); log.info(MessageFormat.format(messages.getString("info.install.app"), getLooseConfigFileName(project))); File dir = getWarSourceDirectory(); if (dir.exists()) { config.addDir(dir.getCanonicalPath(), "/"); } dir = new File(project.getBuild().getOutputDirectory()); if (dir.exists()) { config.addDir(dir.getCanonicalPath(), "/WEB-INF/classes"); } else { throw new MojoExecutionException(MessageFormat.format(messages.getString("error.project.not.compile"), project.getId())); } List<Artifact> libraries = getDependentLibraries(); if (!libraries.isEmpty()) { List<String> eclipseModules = getEclipseDependentMods(); if (eclipseModules.isEmpty()) { addLibraries(libraries, config); } else { for (Artifact library : libraries) { if (library.getFile() == null || !eclipseModules.contains(getFileName(library.getFile()))) { addLibraryFromM2(library, config); } else { File classDir = new File(project.getBasedir() + "/../" + library.getArtifactId() + "/target/classes"); log.debug("sibling module target class directory pathname: " + classDir.getCanonicalPath()); if (classDir.exists()) { config.addArchive(classDir.getCanonicalPath(), "/WEB-INF/lib/" + getFileName(library.getFile())); } else { addLibraryFromM2(library, config); } } } } } config.toXmlFile(looseConfigFile); }