Package java.net

Examples of java.net.URI.resolve()


        if (!excludeUnlistedClassesValue) {
            jarFileUrls = new ArrayList<URL>();
            // Per the EJB3.0 Persistence Specification section 6.2.1.6,
            // the jar-file should be related to the Persistence Unit Root, which is the jar or directory where the persistence.xml is found            
            for (String urlString : jarFileUrlsUntyped) {
                URL url = new URL ("jar:"+ rootUri.resolve(urlString)+"!/");
                if (url != null) {
                    jarFileUrls.add(url);
                } else {
                    log.warn("jar file {} not found in bundle: {}", urlString, bundle.toString());
                }
View Full Code Here


            return wsdlURI.toString();
        }

        public InputSource getImportInputSource(String parentLocation, String relativeLocation) {
            URI parentURI = URI.create(parentLocation);
            latestImportURI = parentURI.resolve(relativeLocation);
            InputStream importInputStream;
            try {
                ZipEntry entry = moduleFile.getEntry(latestImportURI.toString());
                importInputStream = moduleFile.getInputStream(entry);
                try {
View Full Code Here

                        if (!file.getName().endsWith(".jar")) {
                            log.debug("Only jar files are added to classpath, file [" + file.getAbsolutePath() + "] is ignored");
                            continue;
                        }
                        classPath.add(targetUri.resolve(file.getName()).getPath());
                    }
                } else {
                    if (!pathUri.getPath().endsWith(".jar")) {
                        continue;
                    }
View Full Code Here

                        if (!file.getName().endsWith(".jar")) {
                            log.debug("Only jar files are added to classpath, file [" + file.getAbsolutePath() + "] is ignored");
                            continue;
                        }
                        addToClassPath(moduleBaseUri, resolutionUri, targetUri.resolve(file.getName()), classpath, exclusions, factory, problems);
                    }
                } else {
                    if (!pathUri.getPath().endsWith(".jar")) {
                        continue;
                    }
View Full Code Here

                        }
                        if (!file.getName().endsWith(".jar")) {
                            log.debug("Only jar files are added to classpath, file [" + file.getAbsolutePath() + "] is ignored");
                            continue;
                        }
                        addToClassPath(moduleBaseUri, resolutionUri, targetUri.resolve(file.getName()), classpath, exclusions, factory, problems);
                    }
                } else {
                    if (!pathUri.getPath().endsWith(".jar")) {
                        if (manifestClassLoaderMode == MFCP_STRICT) {
                            problems.add(new DeploymentException(printInfo(
View Full Code Here

    }

    static URI invertURI(URI baseUri) {
        URI resolutionUri = URI.create(".");
        for (URI test = baseUri; !test.equals(RELATIVE_MODULE_BASE_URI); test = test.resolve(RELATIVE_MODULE_BASE_URI)) {
            resolutionUri = resolutionUri.resolve(RELATIVE_MODULE_BASE_URI);
        }
        return resolutionUri;
    }

    protected String getSpecDDAsString(WebModule module) throws JAXBException {
View Full Code Here

        getWebClassPath(earContext, webModule);
        URI[] webClassPath = webModule.getWebClasspath();
        URI baseUri = earContext.getBaseDir().toURI();
        URL baseUrl = null;
        try {
            baseUrl = baseUri.resolve(webModule.getTargetPathURI()).toURL();
        } catch (MalformedURLException e) {
            throw new DeploymentException("Invalid module location: " + webModule.getTargetPathURI() + ", baseUri: " + baseUri);
        }
        URL[] webClassPathURLs = new URL[webClassPath.length];
        for (int i = 0; i < webClassPath.length; i++) {
View Full Code Here

        if (configurationBaseUrl.getProtocol().equalsIgnoreCase("file")) {
            root = new URI("file", configurationBaseUrl.getPath(), null);
        } else {
            root = URI.create(configurationBaseUrl.toString());
        }
        this.webAppRoot = root.resolve(relativeWebAppRoot);
        this.container = container;
        this.originalSpecDD = originalSpecDD;

        this.setDocBase(this.webAppRoot.getPath());
        this.virtualServer = virtualServer;
View Full Code Here

    //the share folder is needed during indexing, save this on DFS
    if (Files.getFileSystemName(ApplicationSetup.TERRIER_SHARE).equals("local"))
    {
      Path tempTRShare = makeTemporaryFile(jobConf, "terrier.share");
      propertiesDuringJob.setProperty("terrier.share", remoteFSURI.resolve(tempTRShare.toUri()).toString());
      if (Files.exists(ApplicationSetup.TERRIER_SHARE))
      {
        jobConf.set("terrier.share.copied", remoteFSURI.resolve(tempTRShare.toUri()).toString());
        //logger.info("Copying terrier share/ directory ("+ApplicationSetup.TERRIER_SHARE+") to shared storage area ("+remoteFSURI.resolve(tempTRShare.toUri()).toString()+")");
        FileUtil.copy(
View Full Code Here

    {
      Path tempTRShare = makeTemporaryFile(jobConf, "terrier.share");
      propertiesDuringJob.setProperty("terrier.share", remoteFSURI.resolve(tempTRShare.toUri()).toString());
      if (Files.exists(ApplicationSetup.TERRIER_SHARE))
      {
        jobConf.set("terrier.share.copied", remoteFSURI.resolve(tempTRShare.toUri()).toString());
        //logger.info("Copying terrier share/ directory ("+ApplicationSetup.TERRIER_SHARE+") to shared storage area ("+remoteFSURI.resolve(tempTRShare.toUri()).toString()+")");
        FileUtil.copy(
            FileSystem.getLocal(jobConf), new Path(ApplicationSetup.TERRIER_SHARE),
            remoteFS, tempTRShare,
            false, false, jobConf);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.