debug("%s is a known include because it contains the entry META-INF/enunciate/preserve-in-war.", file); debug("%s is a known exclude because it appears to be tools.jar.", file); debug("%s is a known exclude because it appears to be apt-jelly.", file); debug("%s is a known exclude because it appears to be the apt-jelly-freemarker libs.", file); debug("%s is a known exclude because it appears to be the freemarker libs.", file); debug("%s is a known exclude because it appears to be the enunciate core jar.", file); debug("%s is a known exclude because it appears to be the servlet api.", file); debug("%s is a known exclude because it appears to be the enunciated xfire client tools jar.", file); debug("%s is a known exclude because it appears to be dt.jar.", file); debug("%s is a known exclude because it appears to be htmlconverter.jar.", file); return true; debug("%s is a known exclude because it appears to be jconsole.jar.", file); return true; debug("%s is a known exclude because it appears to be sa-jdi.jar.", file); return true; debug("%s is a known exclude because it appears to be charsets.jar.", file); return true;
/** * Copy the post base. */ protected void copyPostBase() throws IOException { Enunciate enunciate = getEnunciate(); File buildDir = getBuildDir(); //extract a post base if specified. WebAppConfig webAppConfig = getWebAppConfig(); if ((webAppConfig != null) && (webAppConfig.getPostBase() != null)) { File postBase = enunciate.resolvePath(webAppConfig.getPostBase()); if (postBase.isDirectory()) { debug("Copying postBase directory %s to %s...", postBase, buildDir); enunciate.copyDir(postBase, buildDir); } else { debug("Extracting postBase zip file %s to %s...", postBase, buildDir); enunciate.extractBase(new FileInputStream(postBase), buildDir); } } }
@Override protected void doPackage() throws EnunciateException, IOException { if (getWebAppConfig() == null || getWebAppConfig().isDoPackage()) { File buildDir = getBuildDir(); File warFile = getWarFile(); Enunciate enunciate = getEnunciate(); if (!enunciate.isUpToDate(buildDir, warFile)) { if (!warFile.getParentFile().exists()) { warFile.getParentFile().mkdirs(); } debug("Creating %s", warFile.getAbsolutePath()); enunciate.zip(warFile, buildDir); } else { info("Skipping war file creation as everything appears up-to-date..."); } enunciate.addArtifact(new FileArtifact(getName(), "war.file", warFile)); } else { debug("Packaging has been disabled. No packaging will be performed."); } }
/** * Copy the pre base. */ protected void copyPreBase() throws IOException { Enunciate enunciate = getEnunciate(); File buildDir = getBuildDir(); WebAppConfig webAppConfig = getWebAppConfig(); if ((webAppConfig != null) && (webAppConfig.getPreBase() != null)) { File preBase = enunciate.resolvePath(webAppConfig.getPreBase()); if (preBase.isDirectory()) { debug("Copying preBase directory %s to %s...", preBase, buildDir); enunciate.copyDir(preBase, buildDir); } else { debug("Extracting preBase zip file %s to %s...", preBase, buildDir); enunciate.extractBase(new FileInputStream(preBase), buildDir); } } }
debug("No include patterns have been specified. Using the implicit '%s' pattern.", starPattern); includePatterns.add(starPattern); debug("Using the Enunciate classpath as the initial list of libraries to be passed through the include/exclude filter."); debug("Library '%s' passed the include filter. It matches pattern '%s'.", libFile.getAbsolutePath(), includePattern); includedLibs.add(libFile); break; debug("Library '%s' did NOT match include pattern '%s'.", includePattern); if ((excludeLibs.getFile() != null) && (excludeLibs.getFile().equals(toBeIncluded))) { exclude = true; debug("%s was explicitly excluded.", toBeIncluded); debug("%s was excluded because it matches pattern '%s'", toBeIncluded, pattern); debug("'%s' will be included in the manifest classpath.", toBeIncluded.getName()); debug("Adding the contents of %s to WEB-INF/classes.", includedLib); enunciate.copyDir(includedLib, webinfClasses); debug("Including %s in WEB-INF/lib.", includedLib); enunciate.copyFile(includedLib, includedLib.getParentFile(), webinfLib);
debug("Merged %s and %s into %s...", webXmlToMerge, webXML, mergeTarget); mergedWebXml = mergeTarget; debug("web.xml transform has been specified as %s.", transformURL); try { StreamSource source = new StreamSource(transformURL.openStream()); Transformer transformer = TransformerFactory.newInstance().newTransformer(source); debug("Transforming %s to %s.", mergedWebXml, destWebXML); transformer.transform(new StreamSource(new FileReader(mergedWebXml)), new StreamResult(destWebXML));
Enunciate enunciate = getEnunciate(); if (getWebAppConfig() != null && !getWebAppConfig().isDoCompile()) { debug("Compilation has been disabled. No server-side classes will be compiled, nor will any resources be copied."); return;