Examples of VersionRangeRequest


Examples of org.eclipse.aether.resolution.VersionRangeRequest

    private Artifact getLatestVersion0(String coords, String type) {
        try {
            final Artifact artifact = coordsToArtifact(coords, type);
            final String version;
            if (isVersionRange(artifact.getVersion())) {
                final VersionRangeRequest request = new VersionRangeRequest().setRepositories(repos).setArtifact(artifact);
                final VersionRangeResult result = system.resolveVersionRange(session, request);
                final Version highestVersion = result.getHighestVersion();
                version = highestVersion != null ? highestVersion.toString() : null;
            } else {
                final VersionRequest request = new VersionRequest().setRepositories(repos).setArtifact(artifact);
View Full Code Here

Examples of org.eclipse.aether.resolution.VersionRangeRequest

    private Artifact getLatestVersion0(String coords, String type) {
        try {
            final Artifact artifact = coordsToArtifact(coords, type);
            final String version;
            if (isVersionRange(artifact.getVersion())) {
                final VersionRangeRequest request = new VersionRangeRequest().setRepositories(repos).setArtifact(artifact);
                final VersionRangeResult result = system.resolveVersionRange(session, request);
                final Version highestVersion = result.getHighestVersion();
                version = highestVersion != null ? highestVersion.toString() : null;
            } else {
                final VersionRequest request = new VersionRequest().setRepositories(repos).setArtifact(artifact);
View Full Code Here

Examples of org.eclipse.aether.resolution.VersionRangeRequest

         Artifact artifact = new DefaultArtifact(toMavenCoords(AddonId.from(addonName, version)));

         List<RemoteRepository> repositories = MavenRepositories.getRemoteRepositories(container, settings);

         VersionRangeRequest rangeRequest = new VersionRangeRequest(artifact, repositories, null);

         VersionRangeResult rangeResult = system.resolveVersionRange(session, rangeRequest);
         return rangeResult;
      }
      catch (Exception e)
View Full Code Here

Examples of org.eclipse.aether.resolution.VersionRangeRequest

    }

    private Artifact getLatestVersion0(String coords) {
        try {
            final Artifact artifact = coordsToArtifact(coords, "jar");
            final VersionRangeRequest versionRangeRequest = new VersionRangeRequest().setRepositories(repos).setArtifact(artifact);
            final VersionRangeResult versionRangeResult = system.resolveVersionRange(session, versionRangeRequest);
            final Version highestVersion = versionRangeResult.getHighestVersion();
            if (highestVersion == null)
                throw new RuntimeException("Could not find any version of artifact " + coords + " (looking for: " + artifact + ")");
            return artifact.setVersion(highestVersion.toString());
View Full Code Here

Examples of org.eclipse.aether.resolution.VersionRangeRequest

    }

    private Artifact getLatestVersion0(String coords) {
        try {
            final Artifact artifact = coordsToArtifact(coords, "jar");
            final VersionRangeRequest versionRangeRequest = new VersionRangeRequest().setRepositories(repos).setArtifact(artifact);
            final VersionRangeResult versionRangeResult = system.resolveVersionRange(session, versionRangeRequest);
            final Version highestVersion = versionRangeResult.getHighestVersion();
            if (highestVersion == null)
                throw new RuntimeException("Could not find any version of artifact " + coords + " (looking for: " + artifact + ")");
            return artifact.setVersion(highestVersion.toString());
View Full Code Here

Examples of org.eclipse.aether.resolution.VersionRangeRequest

    }

    private Artifact getLatestVersion(String coords) {
        try {
            final Artifact artifact = coordsToArtifact(coords, "jar");
            final VersionRangeRequest versionRangeRequest = new VersionRangeRequest().setRepositories(repos).setArtifact(artifact);
            final VersionRangeResult versionRangeResult = system.resolveVersionRange(session, versionRangeRequest);
            final Version highestVersion = versionRangeResult.getHighestVersion();
            if (highestVersion == null)
                throw new RuntimeException("Could not find any version of artifact " + coords + " (looking for: " + artifact + ")");
            return artifact.setVersion(highestVersion.toString());
View Full Code Here

Examples of org.eclipse.aether.resolution.VersionRangeRequest

         Artifact artifact = MavenConvertUtils.coordinateToMavenArtifact(dep);
         List<RemoteRepository> remoteRepos = MavenConvertUtils.convertToMavenRepos(query.getDependencyRepositories(),
                  settings);
         remoteRepos.addAll(MavenRepositories.getRemoteRepositories(container, settings));

         VersionRangeRequest rangeRequest = new VersionRangeRequest(artifact, remoteRepos, null);

         VersionRangeResult rangeResult = maven.resolveVersionRange(session, rangeRequest);
         return rangeResult;
      }
      catch (Exception e)
View Full Code Here

Examples of org.sonatype.aether.resolution.VersionRangeRequest

    private Artifact resolveLatestVersionRange(RepositorySystemSession session, Artifact artifact)
            throws VersionRangeResolutionException {
        if (artifact.getVersion().equals("LATEST")) {
            artifact = artifact.setVersion(LATEST_VERSION_RANGE);

            VersionRangeResult versionResult = m_repoSystem.resolveVersionRange(session, new VersionRangeRequest(artifact, m_remoteRepos, null));
            if (versionResult != null) {
                Version v = versionResult.getHighestVersion();
                if (v != null) {

                    artifact = artifact.setVersion(v.toString());
View Full Code Here

Examples of org.sonatype.aether.resolution.VersionRangeRequest

         Artifact artifact = coordinateToMavenArtifact(dep);

         List<RemoteRepository> remoteRepos = convertToMavenRepos(query.getDependencyRepositories(), settings);
         remoteRepos.addAll(container.getEnabledRepositoriesFromProfile(settings));

         VersionRangeRequest rangeRequest = new VersionRangeRequest(artifact, remoteRepos, null);

         VersionRangeResult rangeResult = maven.resolveVersionRange(session, rangeRequest);
         return rangeResult;
      }
      catch (Exception e)
View Full Code Here

Examples of org.sonatype.aether.resolution.VersionRangeRequest

         Artifact artifact = new DefaultArtifact(toMavenCoords(AddonId.from(addonName, version)));

         List<RemoteRepository> repositories = MavenRepositories.getRemoteRepositories(container, settings);

         VersionRangeRequest rangeRequest = new VersionRangeRequest(artifact, repositories, null);

         VersionRangeResult rangeResult = system.resolveVersionRange(session, rangeRequest);
         return rangeResult;
      }
      catch (Exception e)
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.