/** * Copy this archivist to a new abstract archive * @param a the deployment descriptor for an application * @param source the source archive * @param target the target archive */ public void copyInto(Application a, ReadableArchive source, WritableArchive target) throws IOException { copyInto(a, source, target, true); }
/** * Copy this archivist to a new abstract archive * @param a the deployment descriptor for an application * @param source the source archive * @param target the target archive */ public void copyInto(Application a, ReadableArchive source, WritableArchive target) throws IOException { copyInto(a, source, target, true); }
/** * Copy this archivist to a new abstract archive * @param source the archive to copy from * @param target the new archive to use to copy our contents into */ public void copyInto(ReadableArchive source, WritableArchive target) throws IOException { try { Application a = readStandardDeploymentDescriptor(source); copyInto(a, source, target); } catch(SAXParseException spe) { DOLUtils.getDefaultLogger().log(Level.SEVERE, "enterprise.deployment.backend.fileCopyFailure", spe); } }
/** * Copy this archivist to a new abstract archive * @param source the archive to copy from * @param target the new archive to use to copy our contents into */ public void copyInto(ReadableArchive source, WritableArchive target) throws IOException { try { Application a = readStandardDeploymentDescriptor(source); copyInto(a, source, target); } catch(SAXException spe) { DOLUtils.getDefaultLogger().log(Level.SEVERE, "enterprise.deployment.backend.fileCopyFailure", spe); } }
protected void handleDeploymentPlan(File deploymentPlan, Archivist archivist, ReadableArchive sourceArchive, ApplicationHolder holder) throws IOException { //Note in copying of deployment plan to the portable archive, //we should make sure the manifest in the deployment plan jar //file does not overwrite the one in the original archive if (deploymentPlan != null) { DeploymentPlanArchive dpa = new DeploymentPlanArchive(); dpa.setParentArchive(sourceArchive); dpa.open(deploymentPlan.toURI()); // need to revisit for ear case WritableArchive targetArchive = archiveFactory.createArchive( sourceArchive.getURI()); if (archivist instanceof ApplicationArchivist) { ((ApplicationArchivist)archivist).copyInto(holder.app, dpa, targetArchive, false); } else { archivist.copyInto(dpa, targetArchive, false); } } }