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

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


        // when
        final MavenVersionRangeResult versionRangeResult = Maven.configureResolver()
                .fromFile(fakeSettings)
                .resolveVersionRange("org.jboss.shrinkwrap.test:test-deps-b:[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(2, versions.size());
        assertEquals(lowest, versions.get(0));
        assertEquals(highest, versions.get(1));
    }
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:(,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

    public void defaultPackagingType() {
        final String groupId = "groupId";
        final String artifactId = "artifactId";
        final String version = "version";
        final String classifier = "classifier";
        final MavenCoordinate coordinate = new MavenCoordinateImpl(groupId, artifactId, version, null, classifier);
        Assert.assertEquals(PackagingType.JAR, coordinate.getPackaging());
    }
View Full Code Here

        final String highestCoordinate = lowestCoordinate;

        // when
        final MavenVersionRangeResult versionRangeResult = Maven.resolver().offline()
            .resolveVersionRange("org.jboss.shrinkwrap.test:test-deps-b:(,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(1, versions.size());
        assertEquals(lowest, versions.get(0));
    }
View Full Code Here

        final String groupId = "groupId";
        final String artifactId = "artifactId";
        final PackagingType packaging = PackagingType.of("ejb");
        final String version = "version";
        final MavenCoordinate coordinate = new MavenCoordinateImpl(groupId, artifactId, version, packaging, null);
        Assert.assertEquals(PackagingType.EJB, coordinate.getPackaging());
        Assert.assertEquals("jar", coordinate.getPackaging().getExtension());
    }
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]");
        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:[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(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,)");
        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));
        assertEquals(highest, versions.get(0));
    }
View Full Code Here

        // given

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

        // then
        assertNull(lowest);
        assertNull(highest);
View Full Code Here

        // given

        // 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(0, versions.size());
    }
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.