private URI clientURI(final ReadableArchive archive, final ApplicationClientDescriptor acDesc) throws IOException { if (archive instanceof MultiReadableArchive) { /* * Getting the manifest from a MultiReadableArchive returns the * manifest from the facade. */ final Manifest facadeMF = archive.getManifest(); final Attributes facadeMainAttrs = facadeMF.getMainAttributes(); final URI clientRelativeURI = URI.create( facadeMainAttrs.getValue(AppClientArchivist.GLASSFISH_APPCLIENT)); if (isDeployedClientAlsoStandAlone(facadeMainAttrs)) { return clientRelativeURI; } /* * We need the relative URI to the developer's client JAR within * the download directory. */ final URI absURIToClient = ((MultiReadableArchive) archive).getURI(1); final String relativeURIPathToAnchorDir = facadeMainAttrs.getValue(AppClientArchivist.GLASSFISH_ANCHOR_DIR); final URI absURIToAnchorDir = archive.getURI().resolve(relativeURIPathToAnchorDir); return absURIToAnchorDir.relativize(absURIToClient); } return archive.getURI(); }
private URI clientURI(final ReadableArchive archive, final ApplicationClientDescriptor acDesc) throws IOException { if (archive instanceof MultiReadableArchive) { /* * Getting the manifest from a MultiReadableArchive returns the * manifest from the facade. */ final Manifest facadeMF = archive.getManifest(); final Attributes facadeMainAttrs = facadeMF.getMainAttributes(); final URI clientRelativeURI = URI.create( facadeMainAttrs.getValue(AppClientArchivist.GLASSFISH_APPCLIENT)); if (isDeployedClientAlsoStandAlone(facadeMainAttrs)) { return clientRelativeURI; } /* * We need the relative URI to the developer's client JAR within * the download directory. */ final URI absURIToClient = ((MultiReadableArchive) archive).getURI(1); final String relativeURIPathToAnchorDir = facadeMainAttrs.getValue(AppClientArchivist.GLASSFISH_ANCHOR_DIR); final URI absURIToAnchorDir = archive.getURI().resolve(relativeURIPathToAnchorDir); return absURIToAnchorDir.relativize(absURIToClient); } return archive.getURI(); }
addScanURI(scanURI(((MultiReadableArchive) archive).getURI(1)));
addScanURI(scanURI(((MultiReadableArchive) archive).getURI(1)));