@Override protected boolean postHandles(ReadableArchive archive) throws IOException { //check the main-class attribute if (getMainClassName(archive.getManifest()) != null) { return true; } return false; }
/** * perform any post deployment descriptor reading action * * @param descriptor the deployment descriptor for the module * @param archive the module archive */ @Override protected void postOpen(ApplicationClientDescriptor descriptor, ReadableArchive archive) throws IOException { super.postOpen(descriptor, archive); postValidate(descriptor, archive); }
@Override public void readRuntimeDeploymentDescriptor(ReadableArchive archive, ApplicationClientDescriptor descriptor) throws IOException, SAXParseException { super.readRuntimeDeploymentDescriptor(archive, descriptor, false); } }
try { AppClientArchivist acArchivist = new AppClientArchivist(); if (acArchivist.hasStandardDeploymentDescriptor(subArchive) || acArchivist.hasRuntimeDeploymentDescriptor(subArchive) || acArchivist.getMainClassName(subArchive.getManifest()) != null) {
/** * writes the content of an archive to a JarFile * * @param in the input archive * @param out the archive output stream to write to * @param entriesToSkip the files to not write from the original archive */ @Override protected void writeContents(ReadableArchive in, WritableArchive out, Vector entriesToSkip) throws IOException { // prepare the manifest file to add the main class entry if (manifest == null) { manifest = new Manifest(); } manifest.getMainAttributes().put(Attributes.Name.MANIFEST_VERSION, MANIFEST_VERSION_VALUE); manifest.getMainAttributes().put(Attributes.Name.MAIN_CLASS, ((ApplicationClientDescriptor) getDescriptor()).getMainClassName()); super.writeContents(in, out, entriesToSkip); }
/** * perform any post deployment descriptor reading action * * @param descriptor the deployment descriptor for the module * @param archive the module archive */ @Override protected void postOpen(ApplicationClientDescriptor descriptor, ReadableArchive archive) throws IOException { super.postOpen(descriptor, archive); runValidations(descriptor, archive); }
try { AppClientArchivist acArchivist = new AppClientArchivist(); if (acArchivist.hasStandardDeploymentDescriptor(subArchive) || acArchivist.hasRuntimeDeploymentDescriptor(subArchive) || acArchivist.getMainClassName(subArchive.getManifest()) != null) {
/** * writes the content of an archive to a JarFile * * @param in the input archive * @param out the archive output stream to write to * @param entriesToSkip the files to not write from the original archive */ @Override protected void writeContents(ReadableArchive in, WritableArchive out, Vector entriesToSkip) throws IOException { // prepare the manifest file to add the main class entry if (manifest == null) { manifest = new Manifest(); } manifest.getMainAttributes().put(Attributes.Name.MANIFEST_VERSION, MANIFEST_VERSION_VALUE); manifest.getMainAttributes().put(Attributes.Name.MAIN_CLASS, ((ApplicationClientDescriptor) getDescriptor()).getMainClassName()); super.writeContents(in, out, entriesToSkip); }
@Override protected boolean postHandles(ReadableArchive archive) throws IOException { //check the main-class attribute if (getMainClassName(archive.getManifest()) != null) { return true; } return false; }
/** * perform any action after all standard DDs is read * * @param descriptor the deployment descriptor for the module * @param archive the module archive * @param extensions map of extension archivists */ @Override protected void postStandardDDsRead(ApplicationClientDescriptor descriptor, ReadableArchive archive, Map<ExtensionsArchivist, RootDeploymentDescriptor> extensions) throws IOException { super.postStandardDDsRead(descriptor, archive, extensions); // look for MAIN_CLASS if (mainClassNameToRun == null) { Manifest m = archive.getManifest(); mainClassNameToRun = getMainClassName(m); } descriptor.setMainClassName(mainClassNameToRun); }
/** * perform any action after all standard DDs is read * * @param descriptor the deployment descriptor for the module * @param archive the module archive * @param extensions map of extension archivists */ @Override protected void postStandardDDsRead(ApplicationClientDescriptor descriptor, ReadableArchive archive, Map<ExtensionsArchivist, RootDeploymentDescriptor> extensions) throws IOException { super.postStandardDDsRead(descriptor, archive, extensions); // look for MAIN_CLASS if (mainClassNameToRun == null) { Manifest m = archive.getManifest(); mainClassNameToRun = getMainClassName(m); } descriptor.setMainClassName(mainClassNameToRun); }