Package org.jboss.shrinkwrap.resolver.api

Examples of org.jboss.shrinkwrap.resolver.api.CoordinateParseException


                else if (realAllowedScopes.contains(artifact.scope)) {
                    files.add(artifact.filename());
                }
            }
        } catch (final IOException e) {
            throw new CoordinateParseException(MessageFormat.format(
                "Unable to load dependency tree from {0} to verify", dependencyTree));
        } finally {
            if (input != null) {
                try {
                    input.close();
View Full Code Here


    public static Artifact asArtifact(MavenCoordinate coordinate, ArtifactTypeRegistry registry) throws CoordinateParseException {
        try {
            return new DefaultArtifact(coordinate.getGroupId(), coordinate.getArtifactId(),
                    coordinate.getClassifier(), coordinate.getPackaging().getExtension(), coordinate.getVersion(), registry.get(coordinate.getPackaging().getId()));
        } catch (IllegalArgumentException e) {
            throw new CoordinateParseException("Unable to create artifact from invalid coordinates "
                    + coordinate.toCanonicalForm());
        }
    }
View Full Code Here

        static MavenCoordinateParser parse(final String coordinates) throws CoordinateParseException {

            final Matcher m = DEPENDENCY_PATTERN.matcher(coordinates);
            if (!m.matches()) {
                throw new CoordinateParseException("Bad artifact coordinates"
                    + ", expected format is <groupId>:<artifactId>[:<packagingType>[:<classifier>]]:(<version>|'?'), got: "
                    + coordinates);
            }

            final MavenCoordinateParser parser = new MavenCoordinateParser();
View Full Code Here

            PackagingType parsedPackagingType = null;
            try {
                parsedPackagingType = PackagingType.of(type);
            } catch (final IllegalArgumentException iae) {
                // Exception translate
                throw new CoordinateParseException(iae.getMessage());
            }
            return parsedPackagingType;
        }
View Full Code Here

        try {
            groupId = tokenizer.nextToken();
            artifactId = tokenizer.nextToken();
        } catch (final NoSuchElementException nsee) {
            // Exception translate
            throw new CoordinateParseException("Canonical form must be \"groupId:artifactId\"; got: " + canonicalForm);
        }
        // Ensure there isn't *more* defined than we need
        if (tokenizer.hasMoreTokens()) {
            throw new CoordinateParseException("Canonical form must be \"groupId:artifactId\"; got: " + canonicalForm);
        }
        final MavenDependencyExclusion exclusion = createExclusion(groupId, artifactId);
        return exclusion;
    }
View Full Code Here

                else if (realAllowedScopes.contains(artifact.scope)) {
                    files.add(artifact.filename());
                }
            }
        } catch (final IOException e) {
            throw new CoordinateParseException(MessageFormat.format(
                "Unable to load dependency tree from {0} to verify", dependencyTree));
        } finally {
            if (input != null) {
                try {
                    input.close();
View Full Code Here

TOP

Related Classes of org.jboss.shrinkwrap.resolver.api.CoordinateParseException

Copyright © 2018 www.massapicom. 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.