File buildDir = getBuildDir(); File webinf = new File(buildDir, "WEB-INF"); File webinfClasses = new File(webinf, "classes");
@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 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); } } }
/** * 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); } } }
File buildDir = getBuildDir(); File webinf = new File(buildDir, "WEB-INF"); webinf.mkdirs();
@Override protected void doBuild() throws IOException, EnunciateException { Enunciate enunciate = getEnunciate(); File buildDir = getBuildDir();