org.eclipse.aether.impl.VersionResolver Maven / Gradle / Ivy
/*******************************************************************************
* Copyright (c) 2010, 2014 Sonatype, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
package org.eclipse.aether.impl;
import org.eclipse.aether.RepositorySystem;
import org.eclipse.aether.RepositorySystemSession;
import org.eclipse.aether.resolution.VersionRequest;
import org.eclipse.aether.resolution.VersionResolutionException;
import org.eclipse.aether.resolution.VersionResult;
/**
* Evaluates artifact meta/pseudo versions.
*
* @provisional This type is provisional and can be changed, moved or removed without prior notice.
*/
public interface VersionResolver
{
/**
* Resolves an artifact's meta version (if any) to a concrete version. For example, resolves "1.0-SNAPSHOT" to
* "1.0-20090208.132618-23" or "RELEASE"/"LATEST" to "2.0".
*
* @param session The repository session, must not be {@code null}.
* @param request The version request, must not be {@code null}
* @return The version result, never {@code null}.
* @throws VersionResolutionException If the metaversion could not be resolved.
* @see RepositorySystem#resolveVersion(RepositorySystemSession, VersionRequest)
*/
VersionResult resolveVersion( RepositorySystemSession session, VersionRequest request )
throws VersionResolutionException;
}