Package java.net

Examples of java.net.URI.resolve()


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


                    }
                    start = path.lastIndexOf(remove);
                }
            }
            path = path.substring(start);
            File target = new File(targetURI.resolve(path));
            if (!target.exists()) {
                if (path.endsWith("/")) {
                    if (!target.mkdirs()) {
                        log.error("Plugin install cannot create directory {}", target.getAbsolutePath());
                    }
View Full Code Here

            URL configurationBaseURL,
            ClassLoader classLoader) throws URISyntaxException, MalformedURLException, ResourceException {
        List<String> mappingFileNames = mappingFileNamesUntyped == null? NO_STRINGS: new ArrayList<String>(mappingFileNamesUntyped);
        this.persistenceUnitRoot = persistenceUnitRoot;
        URI configurationBaseURI = new File(configurationBaseURL.getFile()).toURI();
        URL rootURL = configurationBaseURI.resolve(persistenceUnitRoot).normalize().toURL();
        List<URL> jarFileUrls = NO_URLS;
        if (!excludeUnlistedClassesValue) {
            jarFileUrls = new ArrayList<URL>();
            for (String urlString: jarFileUrlsUntyped) {
                URL url = configurationBaseURI.resolve(urlString).normalize().toURL();
View Full Code Here

        URL rootURL = configurationBaseURI.resolve(persistenceUnitRoot).normalize().toURL();
        List<URL> jarFileUrls = NO_URLS;
        if (!excludeUnlistedClassesValue) {
            jarFileUrls = new ArrayList<URL>();
            for (String urlString: jarFileUrlsUntyped) {
                URL url = configurationBaseURI.resolve(urlString).normalize().toURL();
                jarFileUrls.add(url);
            }
        }
        if (managedClassNames == null) {
            managedClassNames = NO_STRINGS;
View Full Code Here

                    }
                    start = path.lastIndexOf(remove);
                }
            }
            path = path.substring(start);
            File target = new File(targetURI.resolve(path));
            if (!target.exists()) {
                if (path.endsWith("/")) {
                    if (!target.mkdirs()) {
                        log.error("Plugin install cannot create directory " + target.getAbsolutePath());
                    }
View Full Code Here

        URI uri = URI.create(contextPath);
        if (!uri.isAbsolute()) {
            Artifact parent = context.getArtifact();
            if (parent != null && parent.getURI() != null) {
                URI base = URI.create("/" + parent.getURI());
                uri = base.resolve(uri);
                // Remove the leading / to make artifact resolver happy
                if (uri.toString().startsWith("/")) {
                    uri = URI.create(uri.toString().substring(1));
                }
            }
View Full Code Here

                URI uri = URI.create(implementation.getLocation());
                Artifact parent = context.getArtifact();
                if (!uri.isAbsolute()) {
                    if (parent != null && parent.getURI() != null) {
                        URI base = URI.create("/" + parent.getURI());
                        uri = base.resolve(uri);
                        // Remove the leading / to make artifact resolver happy
                        if (uri.toString().startsWith("/")) {
                            uri = URI.create(uri.toString().substring(1));
                        }
                    }
View Full Code Here

            String newId = systemId;
            if (baseURI != null && systemId != null) {  //add additional systemId null check
                try {
                    URI uri = new URI(baseURI);
                    uri = uri.resolve(systemId);
                    newId = uri.toString();
                    if (newId.equals(systemId)) {
                        URL url = new URL(baseURI);
                        url = new URL(url, systemId);
                        newId = url.toExternalForm();
View Full Code Here

        if (!locURI.isAbsolute()) {
            try {
                String base = URIParserUtil.getAbsoluteURI(bindingFile);
                URI baseURI = new URI(base);
                locURI = baseURI.resolve(locURI);
            } catch (URISyntaxException e) {
                Message msg = new Message("NOT_URI", LOG, new Object[] {bindingFile});
                throw new ToolException(msg, e);
            }
View Full Code Here

                    }
                    start = path.lastIndexOf(remove);
                }
            }
            path = path.substring(start);
            File target = new File(targetURI.resolve(path));
            if (!target.exists()) {
                if (path.endsWith("/")) {
                    if (!target.mkdirs()) {
                        log.error("Plugin install cannot create directory {}", target.getAbsolutePath());
                    }
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.