Package org.jboss.shrinkwrap.resolver.api.maven.coordinate

Examples of org.jboss.shrinkwrap.resolver.api.maven.coordinate.MavenCoordinate


        final String highestCoordinate = "org.jboss.shrinkwrap.test:test-deps-b:jar:2.0.0";

        // when
        final MavenVersionRangeResult versionRangeResult = Maven.resolver().offline()
            .resolveVersionRange("org.jboss.shrinkwrap.test:test-deps-b:[1.0.0,2.0.0]");
        final MavenCoordinate lowest = versionRangeResult.getLowestVersion();
        final MavenCoordinate highest = versionRangeResult.getHighestVersion();
        final List<MavenCoordinate> versions = versionRangeResult.getVersions();

        // then
        assertEquals(lowestCoordinate, lowest.toCanonicalForm());
        assertEquals(highestCoordinate, highest.toCanonicalForm());
        assertEquals(2, versions.size());
        assertEquals(lowest, versions.get(0));
        assertEquals(highest, versions.get(1));
    }
View Full Code Here


        final String highestCoordinate = lowestCoordinate;

        // when
        final MavenVersionRangeResult versionRangeResult = Maven.resolver().offline()
            .resolveVersionRange("org.jboss.shrinkwrap.test:test-deps-b:(,1.0.0],[2.1.0,)");
        final MavenCoordinate lowest = versionRangeResult.getLowestVersion();
        final MavenCoordinate highest = versionRangeResult.getHighestVersion();
        final List<MavenCoordinate> versions = versionRangeResult.getVersions();

        // then
        assertEquals(lowestCoordinate, lowest.toCanonicalForm());
        assertEquals(highestCoordinate, highest.toCanonicalForm());
        assertEquals(1, versions.size());
        assertEquals(lowest, versions.get(0));
    }
View Full Code Here

        final String highestCoordinate = lowestCoordinate;

        // when
        final MavenVersionRangeResult versionRangeResult = Maven.resolver().offline()
            .resolveVersionRange("org.jboss.shrinkwrap.test:test-deps-b:(,1.0.0),(1.0.0,)");
        final MavenCoordinate lowest = versionRangeResult.getLowestVersion();
        final MavenCoordinate highest = versionRangeResult.getHighestVersion();
        final List<MavenCoordinate> versions = versionRangeResult.getVersions();

        // then
        assertEquals(lowestCoordinate, lowest.toCanonicalForm());
        assertEquals(highestCoordinate, highest.toCanonicalForm());
        assertEquals(1, versions.size());
        assertEquals(lowest, versions.get(0));
    }
View Full Code Here

        final String highestCoordinate = "org.jboss.shrinkwrap.test:test-deps-b:jar:2.0.0";

        // when
        final MavenVersionRangeResult versionRangeResult = Maven.resolver().offline()
            .resolveVersionRange("org.jboss.shrinkwrap.test:test-deps-b:(,)");
        final MavenCoordinate lowest = versionRangeResult.getLowestVersion();
        final MavenCoordinate highest = versionRangeResult.getHighestVersion();
        final List<MavenCoordinate> versions = versionRangeResult.getVersions();

        // then
        assertEquals(lowestCoordinate, lowest.toCanonicalForm());
        assertEquals(highestCoordinate, highest.toCanonicalForm());
        assertEquals(2, versions.size());
        assertEquals(lowest, versions.get(0));
        assertEquals(highest, versions.get(1));
    }
View Full Code Here

            throw new IllegalArgumentException("There must be at least one coordinate specified to be rejected.");
        }

        final Set<MavenDependency> bannedDependencies = new HashSet<MavenDependency>(coordinates.length);
        for (final String coords : coordinates) {
            final MavenCoordinate coordinate = MavenCoordinates.createCoordinate(coords);
            final MavenDependency dependency = MavenDependencies.createDependency(coordinate, ScopeType.COMPILE, false);
            bannedDependencies.add(dependency);
        }
        this.bannedDependencies = Collections.unmodifiableSet(bannedDependencies);
        this.rejectTransitives = rejectTransitives;
View Full Code Here

TOP

Related Classes of org.jboss.shrinkwrap.resolver.api.maven.coordinate.MavenCoordinate

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.