pax_global_header 0000666 0000000 0000000 00000000064 11670505567 0014526 g ustar 00root root 0000000 0000000 52 comment=6955c106032de70e19ed4bbb94e23cbe358a9081
aether-1.13.1/ 0000775 0000000 0000000 00000000000 11670505567 0013061 5 ustar 00root root 0000000 0000000 aether-1.13.1/.gitignore 0000664 0000000 0000000 00000000104 11670505567 0015044 0 ustar 00root root 0000000 0000000 target/
.project
.classpath
.settings/
bin/
.idea
*.iml
*.ipr
*.iws
aether-1.13.1/README.md 0000664 0000000 0000000 00000002247 11670505567 0014345 0 ustar 00root root 0000000 0000000 Homepage
========
Wiki
====
Issue Tracker
=============
Mailing Lists
=============
- Development of Aether:
to post mails
to subscribe to the list or unsubscribe from it
- Usage of Aether:
to post mails
to subscribe to the list or unsubscribe from it
Contribution
============
When submitting patches, please follow the existing code style. The corresponding formatter settings for some IDEs can
be taken from the [Maven Code Style](http://maven.apache.org/developers/committer-environment.html#Maven_Code_Style)
page.
Any patches submitted will need to be accompanied by a signed Contributor License Agreement (CLA). If you have not
aleady signed this CLA, please download the [Sonatype Contributor License Agreement](http://www.sonatype.org/SonatypeCLA.pdf)
and follow its instructions.
License
=======
- [Eclipse Public License, v1.0](http://www.eclipse.org/legal/epl-v10.html)
aether-1.13.1/aether-api/ 0000775 0000000 0000000 00000000000 11670505567 0015100 5 ustar 00root root 0000000 0000000 aether-1.13.1/aether-api/pom.xml 0000664 0000000 0000000 00000002542 11670505567 0016420 0 ustar 00root root 0000000 0000000
4.0.0org.sonatype.aetheraether1.13.1aether-apiAether :: API
The application programming interface for the repository system.
junitjunittestorg.codehaus.mojoanimal-sniffer-maven-pluginorg.codehaus.mojoclirr-maven-plugin
aether-1.13.1/aether-api/src/ 0000775 0000000 0000000 00000000000 11670505567 0015667 5 ustar 00root root 0000000 0000000 aether-1.13.1/aether-api/src/main/ 0000775 0000000 0000000 00000000000 11670505567 0016613 5 ustar 00root root 0000000 0000000 aether-1.13.1/aether-api/src/main/java/ 0000775 0000000 0000000 00000000000 11670505567 0017534 5 ustar 00root root 0000000 0000000 aether-1.13.1/aether-api/src/main/java/org/ 0000775 0000000 0000000 00000000000 11670505567 0020323 5 ustar 00root root 0000000 0000000 aether-1.13.1/aether-api/src/main/java/org/sonatype/ 0000775 0000000 0000000 00000000000 11670505567 0022165 5 ustar 00root root 0000000 0000000 aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/ 0000775 0000000 0000000 00000000000 11670505567 0023435 5 ustar 00root root 0000000 0000000 aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/AbstractRepositoryListener.java 0000664 0000000 0000000 00000004074 11670505567 0031656 0 ustar 00root root 0000000 0000000 package org.sonatype.aether;
/*******************************************************************************
* Copyright (c) 2010-2011 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
*******************************************************************************/
/**
* A skeleton implementation for custom repository listeners. The callback methods in this class do nothing.
*
* @author Benjamin Bentmann
*/
public abstract class AbstractRepositoryListener
implements RepositoryListener
{
public void artifactDeployed( RepositoryEvent event )
{
}
public void artifactDeploying( RepositoryEvent event )
{
}
public void artifactDescriptorInvalid( RepositoryEvent event )
{
}
public void artifactDescriptorMissing( RepositoryEvent event )
{
}
public void artifactDownloaded( RepositoryEvent event )
{
}
public void artifactDownloading( RepositoryEvent event )
{
}
public void artifactInstalled( RepositoryEvent event )
{
}
public void artifactInstalling( RepositoryEvent event )
{
}
public void artifactResolved( RepositoryEvent event )
{
}
public void artifactResolving( RepositoryEvent event )
{
}
public void metadataDeployed( RepositoryEvent event )
{
}
public void metadataDeploying( RepositoryEvent event )
{
}
public void metadataDownloaded( RepositoryEvent event )
{
}
public void metadataDownloading( RepositoryEvent event )
{
}
public void metadataInstalled( RepositoryEvent event )
{
}
public void metadataInstalling( RepositoryEvent event )
{
}
public void metadataInvalid( RepositoryEvent event )
{
}
public void metadataResolved( RepositoryEvent event )
{
}
public void metadataResolving( RepositoryEvent event )
{
}
}
aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/ConfigurationProperties.java 0000664 0000000 0000000 00000020412 11670505567 0031163 0 ustar 00root root 0000000 0000000 package org.sonatype.aether;
/*******************************************************************************
* Copyright (c) 2010-2011 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
*******************************************************************************/
import java.util.Map;
/**
* The keys and defaults for common configuration properties.
*
* @author Benjamin Bentmann
* @see RepositorySystemSession#getConfigProperties()
*/
public final class ConfigurationProperties
{
private static final String PREFIX_AETHER = "aether.";
private static final String PREFIX_CONNECTOR = PREFIX_AETHER + "connector.";
/**
* A flag indicating whether interaction with the user is allowed.
*
* @see #DEFAULT_INTERACTIVE
*/
public static final String INTERACTIVE = PREFIX_AETHER + "interactive";
/**
* The default interactive mode if {@link #INTERACTIVE} isn't set.
*/
public static final boolean DEFAULT_INTERACTIVE = false;
/**
* The user agent that repository connectors should report to servers.
*
* @see #DEFAULT_USER_AGENT
*/
public static final String USER_AGENT = PREFIX_CONNECTOR + "userAgent";
/**
* The default user agent to use if {@link #USER_AGENT} isn't set.
*/
public static final String DEFAULT_USER_AGENT = "Aether";
/**
* The timeout (in milliseconds) to wait for a successful connection to a remote server. Non-positive values
* indicate no timeout.
*
* @see #DEFAULT_CONNECT_TIMEOUT
*/
public static final String CONNECT_TIMEOUT = PREFIX_CONNECTOR + "connectTimeout";
/**
* The default connect timeout to use if {@link #CONNECT_TIMEOUT} isn't set.
*/
public static final int DEFAULT_CONNECT_TIMEOUT = 10 * 1000;
/**
* The timeout (in milliseconds) to wait for a response from a remote server. Non-positive values indicate no
* timeout.
*
* @see #DEFAULT_REQUEST_TIMEOUT
*/
public static final String REQUEST_TIMEOUT = PREFIX_CONNECTOR + "requestTimeout";
/**
* The default request timeout to use if {@link #REQUEST_TIMEOUT} isn't set.
*/
public static final int DEFAULT_REQUEST_TIMEOUT = 60 * 1000;
/**
* The request headers to use for HTTP-based repository connectors. The headers are specified using a
* {@code Map}, mapping a header name to its value. Besides this general key, clients may also
* specify headers for a specific remote repository by appending the suffix {@code .} to this key when
* storing the headers map. The repository-specific headers map is supposed to be complete, i.e. is not merged with
* the general headers map.
*/
public static final String HTTP_HEADERS = PREFIX_CONNECTOR + "http.headers";
/**
* The encoding/charset to use when exchanging credentials with HTTP servers. Besides this general key, clients may
* also specify the encoding for a specific remote repository by appending the suffix {@code .} to this key
* when storing the charset name.
*
* @see #DEFAULT_HTTP_CREDENTIAL_ENCODING
*/
public static final String HTTP_CREDENTIAL_ENCODING = PREFIX_CONNECTOR + "http.credentialEncoding";
/**
* The default encoding/charset to use if {@link #HTTP_CREDENTIAL_ENCODING} isn't set.
*/
public static final String DEFAULT_HTTP_CREDENTIAL_ENCODING = "ISO-8859-1";
private ConfigurationProperties()
{
// hide constructor
}
/**
* Gets the specified configuration property.
*
* @param properties The configuration properties to read, must not be {@code null}.
* @param key The property to read, must not be {@code null}.
* @param defaultValue The default value to return in case the property isn't set, may be {@code null}.
* @return The property value or {@code null} if none.
* @deprecated As of version 1.12, use {@code org.sonatype.aether.util.ConfigUtils} instead.
*/
@Deprecated
public static String get( Map, ?> properties, String key, String defaultValue )
{
Object value = properties.get( key );
if ( !( value instanceof String ) )
{
return defaultValue;
}
return (String) value;
}
/**
* Gets the specified configuration property.
*
* @param session The repository system session from which to read the configuration property, must not be
* {@code null}.
* @param key The property to read, must not be {@code null}.
* @param defaultValue The default value to return in case the property isn't set, may be {@code null}.
* @return The property value or {@code null} if none.
* @deprecated As of version 1.12, use {@code org.sonatype.aether.util.ConfigUtils} instead.
*/
@Deprecated
public static String get( RepositorySystemSession session, String key, String defaultValue )
{
return get( session.getConfigProperties(), key, defaultValue );
}
/**
* Gets the specified configuration property.
*
* @param properties The configuration properties to read, must not be {@code null}.
* @param key The property to read, must not be {@code null}.
* @param defaultValue The default value to return in case the property isn't set.
* @return The property value.
* @deprecated As of version 1.12, use {@code org.sonatype.aether.util.ConfigUtils} instead.
*/
@Deprecated
public static int get( Map, ?> properties, String key, int defaultValue )
{
Object value = properties.get( key );
if ( value instanceof Number )
{
return ( (Number) value ).intValue();
}
try
{
return Integer.valueOf( (String) value );
}
catch ( Exception e )
{
return defaultValue;
}
}
/**
* Gets the specified configuration property.
*
* @param session The repository system session from which to read the configuration property, must not be
* {@code null}.
* @param key The property to read, must not be {@code null}.
* @param defaultValue The default value to return in case the property isn't set.
* @return The property value.
* @deprecated As of version 1.12, use {@code org.sonatype.aether.util.ConfigUtils} instead.
*/
@Deprecated
public static int get( RepositorySystemSession session, String key, int defaultValue )
{
return get( session.getConfigProperties(), key, defaultValue );
}
/**
* Gets the specified configuration property.
*
* @param properties The configuration properties to read, must not be {@code null}.
* @param key The property to read, must not be {@code null}.
* @param defaultValue The default value to return in case the property isn't set.
* @return The property value.
* @deprecated As of version 1.12, use {@code org.sonatype.aether.util.ConfigUtils} instead.
*/
@Deprecated
public static boolean get( Map, ?> properties, String key, boolean defaultValue )
{
Object value = properties.get( key );
if ( value instanceof Boolean )
{
return ( (Boolean) value ).booleanValue();
}
else if ( !( value instanceof String ) )
{
return defaultValue;
}
return Boolean.parseBoolean( (String) value );
}
/**
* Gets the specified configuration property.
*
* @param session The repository system session from which to read the configuration property, must not be
* {@code null}.
* @param key The property to read, must not be {@code null}.
* @param defaultValue The default value to return in case the property isn't set.
* @return The property value.
* @deprecated As of version 1.12, use {@code org.sonatype.aether.util.ConfigUtils} instead.
*/
@Deprecated
public static boolean get( RepositorySystemSession session, String key, boolean defaultValue )
{
return get( session.getConfigProperties(), key, defaultValue );
}
}
aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/RepositoryCache.java 0000664 0000000 0000000 00000004540 11670505567 0027406 0 ustar 00root root 0000000 0000000 package org.sonatype.aether;
/*******************************************************************************
* Copyright (c) 2010-2011 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
*******************************************************************************/
/**
* Caches auxiliary data used during repository access like already processed metadata. The data in the cache is meant
* for exclusive consumption by the repository system and is opaque to the cache implementation. Note:
* Actual cache implementations must be thread-safe.
*
* @author Benjamin Bentmann
*/
public interface RepositoryCache
{
/**
* Puts the specified data into the cache. It is entirely up to the cache implementation how long this data will be
* kept before being purged, i.e. callers must not make any assumptions about the lifetime of cached data.
* Warning: The cache will directly save the provided reference. If the cached data is mutable,
* i.e. could be modified after being put into the cache, the caller is responsible for creating a copy of the
* original data and store the copy in the cache.
*
* @param session The repository session during which the cache is accessed, must not be {@code null}.
* @param key The key to use for lookup the data with, must not be {@code null}.
* @param data The data to store in the cache, may be {@code null}.
*/
void put( RepositorySystemSession session, Object key, Object data );
/**
* Gets the specified data from the cache. Warning: The cache will directly return the saved
* reference. If the cached data is to be modified after its retrieval, the caller is responsible to create a copy
* of the returned data and use this instead of the cache record.
*
* @param session The repository session during which the cache is accessed, must not be {@code null}.
* @param key The key to use for lookup of the data, must not be {@code null}.
* @return The requested data or {@code null} if none was present in the cache.
*/
Object get( RepositorySystemSession session, Object key );
}
aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/RepositoryEvent.java 0000664 0000000 0000000 00000007107 11670505567 0027466 0 ustar 00root root 0000000 0000000 package org.sonatype.aether;
/*******************************************************************************
* Copyright (c) 2010-2011 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
*******************************************************************************/
import java.io.File;
import java.util.List;
import org.sonatype.aether.artifact.Artifact;
import org.sonatype.aether.metadata.Metadata;
import org.sonatype.aether.repository.ArtifactRepository;
/**
* An event describing an action performed by the repository system. Note that events which indicate the end of an
* action like {@link EventType#ARTIFACT_RESOLVED} are generally fired in both the success and the failure case. Use
* {@link #getException()} to check whether an event denotes success or failure.
*
* @author Benjamin Bentmann
* @see RepositoryListener
*/
public interface RepositoryEvent
{
/**
* The type of the repository event.
*/
enum EventType
{
ARTIFACT_DESCRIPTOR_INVALID,
ARTIFACT_DESCRIPTOR_MISSING,
METADATA_INVALID,
ARTIFACT_RESOLVING,
ARTIFACT_RESOLVED,
METADATA_RESOLVING,
METADATA_RESOLVED,
ARTIFACT_DOWNLOADING,
ARTIFACT_DOWNLOADED,
METADATA_DOWNLOADING,
METADATA_DOWNLOADED,
ARTIFACT_INSTALLING,
ARTIFACT_INSTALLED,
METADATA_INSTALLING,
METADATA_INSTALLED,
ARTIFACT_DEPLOYING,
ARTIFACT_DEPLOYED,
METADATA_DEPLOYING,
METADATA_DEPLOYED
}
/**
* Gets the type of the event.
*
* @return The type of the event, never {@code null}.
*/
EventType getType();
/**
* Gets the repository system session during which the event occurred.
*
* @return The repository system session during which the event occurred, never {@code null}.
*/
RepositorySystemSession getSession();
/**
* Gets the artifact involved in the event (if any).
*
* @return The involved artifact or {@code null} if none.
*/
Artifact getArtifact();
/**
* Gets the metadata involved in the event (if any).
*
* @return The involved metadata or {@code null} if none.
*/
Metadata getMetadata();
/**
* Gets the file involved in the event (if any).
*
* @return The involved file or {@code null} if none.
*/
File getFile();
/**
* Gets the repository involved in the event (if any).
*
* @return The involved repository or {@code null} if none.
*/
ArtifactRepository getRepository();
/**
* Gets the exception that caused the event (if any). As a rule of thumb, an event accompanied by an exception
* indicates a failure of the corresponding action. If multiple exceptions occurred, this method returns the first
* exception.
*
* @return The exception or {@code null} if none.
*/
Exception getException();
/**
* Gets the exceptions that caused the event (if any). As a rule of thumb, an event accompanied by exceptions
* indicates a failure of the corresponding action.
*
* @return The exceptions, never {@code null}.
*/
List getExceptions();
/**
* Gets the trace information about the request during which the event occurred.
*
* @return The trace information or {@code null} if none.
*/
RequestTrace getTrace();
}
aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/RepositoryException.java 0000664 0000000 0000000 00000002322 11670505567 0030335 0 ustar 00root root 0000000 0000000 package org.sonatype.aether;
/*******************************************************************************
* Copyright (c) 2010-2011 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
*******************************************************************************/
/**
* The base class for exceptions thrown by the repository system.
*
* @author Benjamin Bentmann
*/
public class RepositoryException
extends Exception
{
public RepositoryException( String message )
{
super( message );
}
public RepositoryException( String message, Throwable cause )
{
super( message, cause );
}
public static String getMessage( String prefix, Throwable cause )
{
String msg = "";
if ( cause != null )
{
msg = cause.getMessage();
if ( msg == null || msg.length() <= 0 )
{
msg = cause.getClass().getSimpleName();
}
msg = prefix + msg;
}
return msg;
}
}
aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/RepositoryListener.java 0000664 0000000 0000000 00000004222 11670505567 0030165 0 ustar 00root root 0000000 0000000 package org.sonatype.aether;
/*******************************************************************************
* Copyright (c) 2010-2011 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
*******************************************************************************/
import org.sonatype.aether.transfer.TransferListener;
/**
* A listener being notified of events from the repository system. In general, the system sends events upon termination
* of an operation like {@link #artifactResolved(RepositoryEvent)} regardless whether it succeeded or failed so
* listeners need to inspect the event details carefully. Also, the listener may be called from an arbitrary thread.
* Note: Implementors are strongly advised to inherit from {@link AbstractRepositoryListener} instead of
* directly implementing this interface.
*
* @author Benjamin Bentmann
* @see TransferListener
*/
public interface RepositoryListener
{
void artifactDescriptorInvalid( RepositoryEvent event );
void artifactDescriptorMissing( RepositoryEvent event );
void metadataInvalid( RepositoryEvent event );
void artifactResolving( RepositoryEvent event );
void artifactResolved( RepositoryEvent event );
void metadataResolving( RepositoryEvent event );
void metadataResolved( RepositoryEvent event );
void artifactDownloading( RepositoryEvent event );
void artifactDownloaded( RepositoryEvent event );
void metadataDownloading( RepositoryEvent event );
void metadataDownloaded( RepositoryEvent event );
void artifactInstalling( RepositoryEvent event );
void artifactInstalled( RepositoryEvent event );
void metadataInstalling( RepositoryEvent event );
void metadataInstalled( RepositoryEvent event );
void artifactDeploying( RepositoryEvent event );
void artifactDeployed( RepositoryEvent event );
void metadataDeploying( RepositoryEvent event );
void metadataDeployed( RepositoryEvent event );
}
aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/RepositorySystem.java 0000664 0000000 0000000 00000031735 11670505567 0027675 0 ustar 00root root 0000000 0000000 package org.sonatype.aether;
/*******************************************************************************
* Copyright (c) 2010-2011 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
*******************************************************************************/
import java.util.Collection;
import java.util.List;
import org.sonatype.aether.artifact.Artifact;
import org.sonatype.aether.collection.CollectRequest;
import org.sonatype.aether.collection.CollectResult;
import org.sonatype.aether.collection.DependencyCollectionException;
import org.sonatype.aether.deployment.DeployRequest;
import org.sonatype.aether.deployment.DeployResult;
import org.sonatype.aether.deployment.DeploymentException;
import org.sonatype.aether.graph.DependencyFilter;
import org.sonatype.aether.graph.DependencyNode;
import org.sonatype.aether.installation.InstallRequest;
import org.sonatype.aether.installation.InstallResult;
import org.sonatype.aether.installation.InstallationException;
import org.sonatype.aether.metadata.Metadata;
import org.sonatype.aether.repository.LocalRepository;
import org.sonatype.aether.repository.LocalRepositoryManager;
import org.sonatype.aether.resolution.ArtifactDescriptorException;
import org.sonatype.aether.resolution.ArtifactDescriptorRequest;
import org.sonatype.aether.resolution.ArtifactDescriptorResult;
import org.sonatype.aether.resolution.ArtifactRequest;
import org.sonatype.aether.resolution.ArtifactResolutionException;
import org.sonatype.aether.resolution.ArtifactResult;
import org.sonatype.aether.resolution.DependencyRequest;
import org.sonatype.aether.resolution.DependencyResolutionException;
import org.sonatype.aether.resolution.DependencyResult;
import org.sonatype.aether.resolution.MetadataRequest;
import org.sonatype.aether.resolution.MetadataResult;
import org.sonatype.aether.resolution.VersionRangeRequest;
import org.sonatype.aether.resolution.VersionRangeResolutionException;
import org.sonatype.aether.resolution.VersionRangeResult;
import org.sonatype.aether.resolution.VersionRequest;
import org.sonatype.aether.resolution.VersionResolutionException;
import org.sonatype.aether.resolution.VersionResult;
/**
* The main entry point to the repository system.
*
* @author Benjamin Bentmann
*/
public interface RepositorySystem
{
/**
* Expands a version range to a list of matching versions, in ascending order. For example, resolves "[3.8,4.0)" to
* ["3.8", "3.8.1", "3.8.2"].
*
* @param session The repository session, must not be {@code null}.
* @param request The version range request, must not be {@code null}
* @return The version range result, never {@code null}.
* @throws VersionRangeResolutionException If the requested range could not be parsed. Note that an empty range does
* not raise an exception.
*/
VersionRangeResult resolveVersionRange( RepositorySystemSession session, VersionRangeRequest request )
throws VersionRangeResolutionException;
/**
* Resolves an artifact's meta version (if any) to a concrete version. For example, resolves "1.0-SNAPSHOT" to
* "1.0-20090208.132618-23".
*
* @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.
*/
VersionResult resolveVersion( RepositorySystemSession session, VersionRequest request )
throws VersionResolutionException;
/**
* Gets information about an artifact like its direct dependencies and potential relocations.
*
* @param session The repository session, must not be {@code null}.
* @param request The descriptor request, must not be {@code null}
* @return The descriptor result, never {@code null}.
* @throws ArtifactDescriptorException If the artifact descriptor could not be read.
* @see RepositorySystemSession#isIgnoreInvalidArtifactDescriptor()
* @see RepositorySystemSession#isIgnoreMissingArtifactDescriptor()
*/
ArtifactDescriptorResult readArtifactDescriptor( RepositorySystemSession session, ArtifactDescriptorRequest request )
throws ArtifactDescriptorException;
/**
* Collects the transitive dependencies of an artifact and builds a dependency graph. Note that this operation is
* only concerned about determining the coordinates of the transitive dependencies. To also resolve the actual
* artifact files, use {@link #resolveDependencies(RepositorySystemSession, DependencyRequest)}.
*
* @param session The repository session, must not be {@code null}.
* @param request The collection request, must not be {@code null}
* @return The collection result, never {@code null}.
* @throws DependencyCollectionException If the dependency tree could not be built.
* @see RepositorySystemSession#getDependencyTraverser()
* @see RepositorySystemSession#getDependencyManager()
* @see RepositorySystemSession#getDependencySelector()
* @see RepositorySystemSession#getDependencyGraphTransformer()
*/
CollectResult collectDependencies( RepositorySystemSession session, CollectRequest request )
throws DependencyCollectionException;
/**
* Collects and resolves the transitive dependencies of an artifact. This operation is essentially a combination of
* {@link #collectDependencies(RepositorySystemSession, CollectRequest)} and
* {@link #resolveArtifacts(RepositorySystemSession, Collection)}.
*
* @param session The repository session, must not be {@code null}.
* @param request The dependency request, must not be {@code null}
* @return The dependency result, never {@code null}.
* @throws DependencyResolutionException If the dependency tree could not be built or any dependency artifact could
* not be resolved.
*/
DependencyResult resolveDependencies( RepositorySystemSession session, DependencyRequest request )
throws DependencyResolutionException;
/**
* Resolves the paths for the artifacts referenced by the specified dependency graph. The dependency graph will be
* updated to reflect each successfully resolved artifact. Artifacts will be downloaded if necessary. Artifacts that
* are already resolved will be skipped and are not re-resolved.
*
* @param session The repository session, must not be {@code null}.
* @param node The root node of the dependency graph whose artifacts shall be resolved, must not be {@code null}
* @param filter The node filter to use to select the actual nodes to resolve, may be {@code null} to resolve all
* nodes.
* @return The resolution results, never {@code null}.
* @throws ArtifactResolutionException If any artifact could not be resolved.
* @see Artifact#getFile()
* @deprecated As of version 1.11, use {@link #resolveDependencies(RepositorySystemSession, DependencyRequest)}
* instead.
*/
@Deprecated
List resolveDependencies( RepositorySystemSession session, DependencyNode node,
DependencyFilter filter )
throws ArtifactResolutionException;
/**
* Collects the transitive dependencies of an artifact and resolves the paths for the artifacts referenced by the
* specified dependency graph. This is a convenience method that combines
* {@link #collectDependencies(RepositorySystemSession, CollectRequest)} and
* {@link #resolveDependencies(RepositorySystemSession, DependencyNode, DependencyFilter)}.
*
* @param session The repository session, must not be {@code null}.
* @param request The collection request, must not be {@code null}
* @param filter The node filter to use to select the actual nodes to resolve, may be {@code null} to resolve all
* nodes.
* @return The resolution results, never {@code null}.
* @throws DependencyCollectionException If the dependency tree could not be built.
* @throws ArtifactResolutionException If any artifact could not be resolved.
* @deprecated As of version 1.11, use {@link #resolveDependencies(RepositorySystemSession, DependencyRequest)}
* instead.
*/
@Deprecated
List resolveDependencies( RepositorySystemSession session, CollectRequest request,
DependencyFilter filter )
throws DependencyCollectionException, ArtifactResolutionException;
/**
* Resolves the paths for an artifact. The artifact will be downloaded if necessary. An artifacts that is already
* resolved will be skipped and is not re-resolved. Note that this method assumes that any relocations have already
* been processed.
*
* @param session The repository session, must not be {@code null}.
* @param request The resolution request, must not be {@code null}
* @return The resolution result, never {@code null}.
* @throws ArtifactResolutionException If the artifact could not be resolved.
* @see Artifact#getFile()
*/
ArtifactResult resolveArtifact( RepositorySystemSession session, ArtifactRequest request )
throws ArtifactResolutionException;
/**
* Resolves the paths for a collection of artifacts. Artifacts will be downloaded if necessary. Artifacts that are
* already resolved will be skipped and are not re-resolved. Note that this method assumes that any relocations have
* already been processed.
*
* @param session The repository session, must not be {@code null}.
* @param requests The resolution requests, must not be {@code null}
* @return The resolution results (in request order), never {@code null}.
* @throws ArtifactResolutionException If any artifact could not be resolved.
* @see Artifact#getFile()
*/
List resolveArtifacts( RepositorySystemSession session,
Collection extends ArtifactRequest> requests )
throws ArtifactResolutionException;
/**
* Resolves the paths for a collection of metadata. Metadata will be downloaded if necessary.
*
* @param session The repository session, must not be {@code null}.
* @param requests The resolution requests, must not be {@code null}
* @return The resolution results (in request order), never {@code null}.
* @see Metadata#getFile()
*/
List resolveMetadata( RepositorySystemSession session,
Collection extends MetadataRequest> requests );
/**
* Installs a collection of artifacts and their accompanying metadata to the local repository.
*
* @param session The repository session, must not be {@code null}.
* @param request The installation request, must not be {@code null}.
* @return The installation result, never {@code null}.
* @throws InstallationException If any artifact/metadata from the request could not be installed.
*/
InstallResult install( RepositorySystemSession session, InstallRequest request )
throws InstallationException;
/**
* Uploads a collection of artifacts and their accompanying metadata to a remote repository.
*
* @param session The repository session, must not be {@code null}.
* @param request The deployment request, must not be {@code null}.
* @return The deployment result, never {@code null}.
* @throws DeploymentException If any artifact/metadata from the request could not be deployed.
*/
DeployResult deploy( RepositorySystemSession session, DeployRequest request )
throws DeploymentException;
/**
* Creates a new manager for the specified local repository. If the specified local repository has no type, the
* default repository type will be used.
*
* @param localRepository The local repository to create a manager for, must not be {@code null}.
* @return The local repository manager, never {@code null}.
* @throws IllegalArgumentException If the specified repository type is not recognized or no base directory is
* given.
*/
LocalRepositoryManager newLocalRepositoryManager( LocalRepository localRepository );
/**
* Creates a new synchronization context.
*
* @param session The repository session during which the context will be used, must not be {@code null}.
* @param shared A flag indicating whether access to the artifacts/metadata associated with the new context can be
* shared among concurrent readers or whether access needs to be exclusive to the calling thread.
* @return The synchronization context, never {@code null}.
*/
SyncContext newSyncContext( RepositorySystemSession session, boolean shared );
}
aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/RepositorySystemSession.java 0000664 0000000 0000000 00000023116 11670505567 0031233 0 ustar 00root root 0000000 0000000 package org.sonatype.aether;
/*******************************************************************************
* Copyright (c) 2010-2011 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
*******************************************************************************/
import java.util.Map;
import org.sonatype.aether.artifact.ArtifactTypeRegistry;
import org.sonatype.aether.collection.DependencyGraphTransformer;
import org.sonatype.aether.collection.DependencyManager;
import org.sonatype.aether.collection.DependencySelector;
import org.sonatype.aether.collection.DependencyTraverser;
import org.sonatype.aether.repository.AuthenticationSelector;
import org.sonatype.aether.repository.LocalRepository;
import org.sonatype.aether.repository.LocalRepositoryManager;
import org.sonatype.aether.repository.MirrorSelector;
import org.sonatype.aether.repository.ProxySelector;
import org.sonatype.aether.repository.RepositoryPolicy;
import org.sonatype.aether.repository.WorkspaceReader;
import org.sonatype.aether.transfer.TransferListener;
/**
* Defines settings and components that control the repository system.
*
* @author Benjamin Bentmann
*/
public interface RepositorySystemSession
{
/**
* Indicates whether the repository system operates in offline mode and avoids/refuses any access to remote
* repositories.
*
* @return {@code true} if the repository system is in offline mode, {@code false} otherwise.
*/
boolean isOffline();
/**
* Indicates whether transfer errors (e.g. unreachable host, bad authentication) from resolution attempts should be
* cached in the local repository. If caching is enabled, resolution will not be reattempted until the update policy
* for the affected resource has expired.
*
* @return {@code true} if transfer errors are cached, {@code false} to always reattempt downloading.
*/
boolean isTransferErrorCachingEnabled();
/**
* Indicates whether missing artifacts/metadata from resolution attempts should be cached in the local repository.
* If caching is enabled, resolution will not be reattempted until the update policy for the affected resource has
* expired.
*
* @return {@code true} if missing resources are cached, {@code false} to always reattempt downloading.
*/
boolean isNotFoundCachingEnabled();
/**
* Indicates whether missing artifact descriptors are silently ignored. If enabled and no artifact descriptor is
* available, an empty stub descriptor is used instead.
*
* @return {@code true} if missing artifact descriptors are ignored, {@code false} to fail the operation with an
* exception.
*/
boolean isIgnoreMissingArtifactDescriptor();
/**
* Indicates whether invalid artifact descriptors are silently ignored. If enabled and an artifact descriptor is
* invalid, an empty stub descriptor is used instead.
*
* @return {@code true} if invalid artifact descriptors are ignored, {@code false} to fail the operation with an
* exception.
*/
boolean isIgnoreInvalidArtifactDescriptor();
/**
* Gets the global checksum policy. If set, the global checksum policy overrides the checksum policies of the remote
* repositories being used for resolution.
*
* @return The global checksum policy or {@code null}/empty if not set and the per-repository policies apply.
* @see RepositoryPolicy#CHECKSUM_POLICY_FAIL
* @see RepositoryPolicy#CHECKSUM_POLICY_IGNORE
* @see RepositoryPolicy#CHECKSUM_POLICY_WARN
*/
String getChecksumPolicy();
/**
* Gets the global update policy. If set, the global update policy overrides the update policies of the remote
* repositories being used for resolution.
*
* @return The global update policy or {@code null}/empty if not set and the per-repository policies apply.
* @see RepositoryPolicy#UPDATE_POLICY_ALWAYS
* @see RepositoryPolicy#UPDATE_POLICY_DAILY
* @see RepositoryPolicy#UPDATE_POLICY_NEVER
*/
String getUpdatePolicy();
/**
* Gets the local repository used during this session. This is a convenience method for
* {@link LocalRepositoryManager#getRepository()}.
*
* @return The local repository being during this session, never {@code null}.
*/
LocalRepository getLocalRepository();
/**
* Gets the local repository manager used during this session.
*
* @return The local repository manager used during this session, never {@code null}.
*/
LocalRepositoryManager getLocalRepositoryManager();
/**
* Gets the workspace reader used during this session. If set, the workspace reader will usually be consulted first
* to resolve artifacts.
*
* @return The workspace reader for this session or {@code null} if none.
*/
WorkspaceReader getWorkspaceReader();
/**
* Gets the listener being notified of actions in the repository system.
*
* @return The repository listener or {@code null} if none.
*/
RepositoryListener getRepositoryListener();
/**
* Gets the listener being notified of uploads/downloads by the repository system.
*
* @return The transfer listener or {@code null} if none.
*/
TransferListener getTransferListener();
/**
* Gets the system properties to use, e.g. for processing of artifact descriptors. System properties are usually
* collected from the runtime environment like {@link System#getProperties()} and environment variables.
*
* @return The (read-only) system properties, never {@code null}.
*/
Map getSystemProperties();
/**
* Gets the user properties to use, e.g. for processing of artifact descriptors. User properties are similar to
* system properties but are set on the discretion of the user and hence are considered of higher priority than
* system properties.
*
* @return The (read-only) user properties, never {@code null}.
*/
Map getUserProperties();
/**
* Gets the configuration properties used to tweak internal aspects of the repository system (e.g. thread pooling,
* connector-specific behavior, etc.)
*
* @return The (read-only) configuration properties, never {@code null}.
* @see ConfigurationProperties
*/
Map getConfigProperties();
/**
* Gets the mirror selector to use for repositories discovered in artifact descriptors. Note that this selector is
* not used for remote repositories which are passed as request parameters to the repository system, those
* repositories are supposed to denote the effective repositories.
*
* @return The mirror selector to use, never {@code null}.
*/
MirrorSelector getMirrorSelector();
/**
* Gets the proxy selector to use for repositories discovered in artifact descriptors. Note that this selector is
* not used for remote repositories which are passed as request parameters to the repository system, those
* repositories are supposed to have their proxy (if any) already set.
*
* @return The proxy selector to use, never {@code null}.
* @see org.sonatype.aether.repository.RemoteRepository#getProxy()
*/
ProxySelector getProxySelector();
/**
* Gets the authentication selector to use for repositories discovered in artifact descriptors. Note that this
* selector is not used for remote repositories which are passed as request parameters to the repository system,
* those repositories are supposed to have their authentication (if any) already set.
*
* @return The authentication selector to use, never {@code null}.
* @see org.sonatype.aether.repository.RemoteRepository#getAuthentication()
*/
AuthenticationSelector getAuthenticationSelector();
/**
* Gets the registry of artifact types recognized by this session.
*
* @return The artifact type registry, never {@code null}.
*/
ArtifactTypeRegistry getArtifactTypeRegistry();
/**
* Gets the dependency traverser to use for building dependency graphs.
*
* @return The dependency traverser to use for building dependency graphs, never {@code null}.
*/
DependencyTraverser getDependencyTraverser();
/**
* Gets the dependency manager to use for building dependency graphs.
*
* @return The dependency manager to use for building dependency graphs, never {@code null}.
*/
DependencyManager getDependencyManager();
/**
* Gets the dependency selector to use for building dependency graphs.
*
* @return The dependency selector to use for building dependency graphs, never {@code null}.
*/
DependencySelector getDependencySelector();
/**
* Gets the dependency graph transformer to use for building dependency graphs.
*
* @return The dependency graph transformer to use for building dependency graphs, never {@code null}.
*/
DependencyGraphTransformer getDependencyGraphTransformer();
/**
* Gets the custom data associated with this session.
*
* @return The session data, never {@code null}.
*/
SessionData getData();
/**
* Gets the cache the repository system may use to save data for future reuse during the session.
*
* @return The repository cache or {@code null} if none.
*/
RepositoryCache getCache();
}
aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/RequestTrace.java 0000664 0000000 0000000 00000003635 11670505567 0026716 0 ustar 00root root 0000000 0000000 package org.sonatype.aether;
/*******************************************************************************
* Copyright (c) 2010-2011 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
*******************************************************************************/
/**
* A trace of nested requests that are performed by the repository system. This trace information can be used to
* correlate repository events with higher level operations in the application code that eventually caused the events. A
* single trace can carry an arbitrary object as data which is meant to describe a request/operation that is currently
* executed. For call hierarchies within the repository system itself, this data will usually be the {@code *Request}
* object that is currently processed. When invoking methods on the repository system, client code may provide a request
* trace that has been prepopulated with whatever data is useful for the application to indicate its state for later
* evaluation when processing the repository events.
*
* @author Benjamin Bentmann
* @see RepositoryEvent#getTrace()
*/
public interface RequestTrace
{
/**
* Gets the data associated with this trace.
*
* @return The data associated with this trace or {@code null}.
*/
Object getData();
/**
* Gets the parent of this trace.
*
* @return The parent of this trace or {@code null} if this is the root of the trace stack.
*/
RequestTrace getParent();
/**
* Creates a new child of this trace.
*
* @param data The data to associate with the child, may be {@code null}.
* @return The child trace, never {@code null}.
*/
RequestTrace newChild( Object data );
}
aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/SessionData.java 0000664 0000000 0000000 00000004661 11670505567 0026524 0 ustar 00root root 0000000 0000000 package org.sonatype.aether;
/*******************************************************************************
* Copyright (c) 2010-2011 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
*******************************************************************************/
/**
* A container for data that is specific to a repository system session. Both components within the repository system
* and clients of the system may use this storage to associate arbitrary data with a session. Unlike a cache, this
* session data is not subject to purging. For this same reason, session data should also not be abused as a cache (i.e.
* for storing values that can be re-calculated) to avoid memory exhaustion. Note: Actual
* implementations must be thread-safe.
*
* @author Benjamin Bentmann
* @see RepositorySystemSession#getData()
*/
public interface SessionData
{
/**
* Associates the specified session data with the given key.
*
* @param key The key under which to store the session data, must not be {@code null}.
* @param value The data to associate with the key, may be {@code null} to remove the mapping.
*/
void set( Object key, Object value );
/**
* Associates the specified session data with the given key if the key is currently mapped to the given value. This
* method provides an atomic compare-and-update of some key's value.
*
* @param key The key under which to store the session data, must not be {@code null}.
* @param oldValue The expected data currently associated with the key, may be {@code null}.
* @param newValue The data to associate with the key, may be {@code null} to remove the mapping.
* @return {@code true} if the key mapping was updated to the specified value, {@code false} if the current key
* mapping didn't match the expected value and was not updated.
*/
boolean set( Object key, Object oldValue, Object newValue );
/**
* Gets the session data associated with the specified key.
*
* @param key The key for which to retrieve the session data, must not be {@code null}.
* @return The session data associated with the key or {@code null} if none.
*/
Object get( Object key );
}
aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/SyncContext.java 0000664 0000000 0000000 00000005322 11670505567 0026563 0 ustar 00root root 0000000 0000000 package org.sonatype.aether;
/*******************************************************************************
* Copyright (c) 2010-2011 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
*******************************************************************************/
import java.util.Collection;
import org.sonatype.aether.artifact.Artifact;
import org.sonatype.aether.metadata.Metadata;
/**
* A synchronization context used to coordinate concurrent access to artifacts or metadatas. The typical usage of a
* synchronization context looks like this:
*
*
* SyncContext syncContext = repositorySystem.newSyncContext( ... );
* try {
* syncContext.acquire( artifacts, metadatas );
* // work with the artifacts and metadatas
* } finally {
* syncContext.release();
* }
*
*
* Within one thread, synchronization contexts may be nested which can naturally happen in a hierarchy of method calls.
* The nested synchronization contexts may also acquire overlapping sets of artifacts/metadatas as long as the following
* conditions are met. If the outer-most context holding a particular resource is exclusive, that resource can be
* reacquired in any nested context. If however the outer-most context is shared, the resource may only be reacquired by
* nested contexts if these are also shared.
*
* A synchronization context is meant to be utilized by only one thread and as such is not thread-safe.
*
* Note that the level of actual synchronization is subject to the implementation and might range from OS-wide to none.
*/
public interface SyncContext
{
/**
* Acquires synchronized access to the specified artifacts and metadatas. The invocation will potentially block
* until all requested resources can be acquired by the calling thread. Acquiring resources that are already
* acquired by this synchronization context has no effect. Please also see the class-level documentation for
* information regarding reentrancy.
*
* @param artifacts The artifacts to acquire, may be {@code null} or empty if none.
* @param metadatas The metadatas to acquire, may be {@code null} or empty if none.
*/
void acquire( Collection extends Artifact> artifacts, Collection extends Metadata> metadatas );
/**
* Releases all previously acquired artifacts/metadatas. If no resources have been acquired before, this method does
* nothing. This synchronization context may be reused to acquire other resources in the future.
*/
void release();
}
aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/artifact/ 0000775 0000000 0000000 00000000000 11670505567 0025232 5 ustar 00root root 0000000 0000000 aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/artifact/Artifact.java 0000664 0000000 0000000 00000011525 11670505567 0027636 0 ustar 00root root 0000000 0000000 package org.sonatype.aether.artifact;
/*******************************************************************************
* Copyright (c) 2010-2011 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
*******************************************************************************/
import java.io.File;
import java.util.Map;
/**
* A specific artifact. Note: Artifact instances are supposed to be immutable, e.g. any exposed mutator method
* returns a new artifact instance and leaves the original instance unchanged. Implementors are strongly advised to obey
* this contract.
*
* @author Benjamin Bentmann
*/
public interface Artifact
{
/**
* Gets the group identifier of this artifact, for example "org.apache.maven".
*
* @return The group identifier, never {@code null}.
*/
String getGroupId();
/**
* Gets the artifact identifier of this artifact, for example "maven-model".
*
* @return The artifact identifier, never {@code null}.
*/
String getArtifactId();
/**
* Gets the version of this artifact, for example "1.0-20100529-1213". Note that in case of meta versions like
* "1.0-SNAPSHOT", the artifact's version depends on the state of the artifact. Artifacts that have been resolved or
* deployed will have the meta version expanded.
*
* @return The version, never {@code null}.
*/
String getVersion();
/**
* Sets the version of this artifact.
*
* @param version The version of this artifact, may be {@code null} or empty.
* @return The new artifact, never {@code null}.
*/
Artifact setVersion( String version );
/**
* Gets the base version of this artifact, for example "1.0-SNAPSHOT". In contrast to the {@link #getVersion()}, the
* base version will always refer to the unresolved meta version.
*
* @return The base version, never {@code null}.
*/
String getBaseVersion();
/**
* Determines whether this artifact uses a snapshot version.
*
* @return {@code true} if the artifact is a snapshot, {@code false} otherwise.
*/
boolean isSnapshot();
/**
* Gets the classifier of this artifact, for example "sources".
*
* @return The classifier or an empty string if none, never {@code null}.
*/
String getClassifier();
/**
* Gets the (file) extension of this artifact, for example "jar".
*
* @return The file extension, never {@code null}.
*/
String getExtension();
/**
* Gets the file of this artifact. Note that only resolved artifacts have a file associated with them.
*
* @return The file or {@code null} if the artifact isn't resolved.
*/
File getFile();
/**
* Sets the file of the artifact.
*
* @param file The file of the artifact, may be {@code null}
* @return The new artifact, never {@code null}.
*/
Artifact setFile( File file );
/**
* Gets the specified property.
*
* @param key The name of the property, must not be {@code null}.
* @param defaultValue The default value to return in case the property is not set, may be {@code null}.
*/
String getProperty( String key, String defaultValue );
/**
* Gets the properties of this artifact. While the exact set of available properties is undefined, the following
* properties are considered to be common:
*
*
type
*
A high-level characterization of the artifact, e.g. "maven-plugin" or "test-jar".
*
language
*
The programming language this artifact is relevant for, e.g. "java" or "none".
*
includesDependencies
*
A boolean flag indicating whether the artifact presents some kind of bundle that physically includes its
* dependencies, e.g. a fat WAR.
*
constitutesBuildPath
*
A boolean flag indicating whether the artifact is meant to be used for the compile/runtime/test build path of
* a consumer project.
*
localPath
*
The (expected) path to the artifact on the local filesystem. An artifact which has this property set is
* assumed to be not present in any regular repository and likewise has no artifact descriptor.
*
*
* @return The (read-only) properties, never {@code null}.
*/
Map getProperties();
/**
* Sets the properties for the artifact.
*
* @param properties The properties for the artifact, may be {@code null}.
* @return The new artifact, never {@code null}.
*/
Artifact setProperties( Map properties );
}
aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/artifact/ArtifactType.java 0000664 0000000 0000000 00000003276 11670505567 0030504 0 ustar 00root root 0000000 0000000 package org.sonatype.aether.artifact;
/*******************************************************************************
* Copyright (c) 2010-2011 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
*******************************************************************************/
import java.util.Map;
/**
* An artifact type describing artifact characteristics that are common for certain artifacts. Artifact types are a
* means to simplify the description of an artifact by referring to an artifact type instead of specifying the various
* properties individually.
*
* @author Benjamin Bentmann
*/
public interface ArtifactType
{
/**
* Gets the identifier of this type, e.g. "maven-plugin" or "test-jar".
*
* @return The identifier of this type, never {@code null}.
*/
String getId();
/**
* Gets the file extension to use for artifacts of this type (unless explicitly overridden by the artifact).
*
* @return The file extension, never {@code null}.
*/
String getExtension();
/**
* Gets the classifier to use for artifacts of this type (unless explicitly overridden by the artifact).
*
* @return The classifier or an empty string if none, never {@code null}.
*/
String getClassifier();
/**
* Gets the properties to use for artifacts of this type (unless explicitly overridden by the artifact).
*
* @return The properties, never {@code null}.
*/
Map getProperties();
}
aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/artifact/ArtifactTypeRegistry.java 0000664 0000000 0000000 00000001622 11670505567 0032226 0 ustar 00root root 0000000 0000000 package org.sonatype.aether.artifact;
/*******************************************************************************
* Copyright (c) 2010-2011 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
*******************************************************************************/
/**
* A registry of known artifact types.
*
* @author Benjamin Bentmann
*/
public interface ArtifactTypeRegistry
{
/**
* Gets the artifact type with the specified identifier.
*
* @param typeId The identifier of the type, must not be {@code null}.
* @return The artifact type or {@code null} if no type with the requested identifier exists.
*/
ArtifactType get( String typeId );
}
aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/collection/ 0000775 0000000 0000000 00000000000 11670505567 0025570 5 ustar 00root root 0000000 0000000 aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/collection/CollectRequest.java 0000664 0000000 0000000 00000024066 11670505567 0031401 0 ustar 00root root 0000000 0000000 package org.sonatype.aether.collection;
/*******************************************************************************
* Copyright (c) 2010-2011 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
*******************************************************************************/
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.sonatype.aether.RepositorySystem;
import org.sonatype.aether.RepositorySystemSession;
import org.sonatype.aether.RequestTrace;
import org.sonatype.aether.graph.Dependency;
import org.sonatype.aether.repository.RemoteRepository;
/**
* A request to collect the transitive dependencies and to build a dependency graph from them. There are three ways to
* create a dependency graph. First, only the root dependency can be given. Second, a root dependency and direct
* dependencies can be specified in which case the specified direct dependencies are merged with the direct dependencies
* retrieved from the artifact descriptor of the root dependency. And last, only direct dependencies can be specified in
* which case the root node of the resulting graph has no associated dependency.
*
* @author Benjamin Bentmann
* @see RepositorySystem#collectDependencies(RepositorySystemSession, CollectRequest)
*/
public class CollectRequest
{
private Dependency root;
private List dependencies = Collections.emptyList();
private List managedDependencies = Collections.emptyList();
private List repositories = Collections.emptyList();
private String context = "";
private RequestTrace trace;
/**
* Creates an unitialized request.
*/
public CollectRequest()
{
// enables default constructor
}
/**
* Creates a request with the specified properties.
*
* @param root The root dependency whose transitive dependencies should be collected, may be {@code null}.
* @param repositories The repositories to use for the collection, may be {@code null}.
*/
public CollectRequest( Dependency root, List repositories )
{
setRoot( root );
setRepositories( repositories );
}
/**
* Creates a new request with the specified properties.
*
* @param root The root dependency whose transitive dependencies should be collected, may be {@code null}.
* @param dependencies The direct dependencies to merge with the direct dependencies from the root dependency's
* artifact descriptor.
* @param repositories The repositories to use for the collection, may be {@code null}.
*/
public CollectRequest( Dependency root, List dependencies, List repositories )
{
setRoot( root );
setDependencies( dependencies );
setRepositories( repositories );
}
/**
* Creates a new request with the specified properties.
*
* @param dependencies The direct dependencies of some imaginary root, may be {@code null}.
* @param managedDependencies The dependency management information to apply to the transitive dependencies, may be
* {@code null}.
* @param repositories The repositories to use for the collection, may be {@code null}.
*/
public CollectRequest( List dependencies, List managedDependencies,
List repositories )
{
setDependencies( dependencies );
setManagedDependencies( managedDependencies );
setRepositories( repositories );
}
/**
* Gets the root dependency of the graph.
*
* @return The root dependency of the graph or {@code null} if none.
*/
public Dependency getRoot()
{
return root;
}
/**
* Sets the root dependency of the graph.
*
* @param root The root dependency of the graph, may be {@code null}.
* @return This request for chaining, never {@code null}.
*/
public CollectRequest setRoot( Dependency root )
{
this.root = root;
return this;
}
/**
* Gets the direct dependencies.
*
* @return The direct dependencies, never {@code null}.
*/
public List getDependencies()
{
return dependencies;
}
/**
* Sets the direct dependencies. If both a root dependency and direct dependencies are given in the request, the
* direct dependencies from the request will be merged with the direct dependencies from the root dependency's
* artifact descriptor, giving higher priority to the dependencies from the request.
*
* @param dependencies The direct dependencies, may be {@code null}.
* @return This request for chaining, never {@code null}.
*/
public CollectRequest setDependencies( List dependencies )
{
if ( dependencies == null )
{
this.dependencies = Collections.emptyList();
}
else
{
this.dependencies = dependencies;
}
return this;
}
/**
* Adds the specified direct dependency.
*
* @param dependency The dependency to add, may be {@code null}.
* @return This request for chaining, never {@code null}.
*/
public CollectRequest addDependency( Dependency dependency )
{
if ( dependency != null )
{
if ( this.dependencies.isEmpty() )
{
this.dependencies = new ArrayList();
}
this.dependencies.add( dependency );
}
return this;
}
/**
* Gets the dependency management to apply to transitive dependencies.
*
* @return The dependency management to apply to transitive dependencies, never {@code null}.
*/
public List getManagedDependencies()
{
return managedDependencies;
}
/**
* Sets the dependency management to apply to transitive dependencies. To clarify, this management does not apply to
* the direct dependencies of the root node.
*
* @param managedDependencies The dependency management, may be {@code null}.
* @return This request for chaining, never {@code null}.
*/
public CollectRequest setManagedDependencies( List managedDependencies )
{
if ( managedDependencies == null )
{
this.managedDependencies = Collections.emptyList();
}
else
{
this.managedDependencies = managedDependencies;
}
return this;
}
/**
* Adds the specified managed dependency.
*
* @param managedDependency The managed dependency to add, may be {@code null}.
* @return This request for chaining, never {@code null}.
*/
public CollectRequest addManagedDependency( Dependency managedDependency )
{
if ( managedDependency != null )
{
if ( this.managedDependencies.isEmpty() )
{
this.managedDependencies = new ArrayList();
}
this.managedDependencies.add( managedDependency );
}
return this;
}
/**
* Gets the repositories to use for the collection.
*
* @return The repositories to use for the collection, never {@code null}.
*/
public List getRepositories()
{
return repositories;
}
/**
* Sets the repositories to use for the collection.
*
* @param repositories The repositories to use for the collection, may be {@code null}.
* @return This request for chaining, never {@code null}.
*/
public CollectRequest setRepositories( List repositories )
{
if ( repositories == null )
{
this.repositories = Collections.emptyList();
}
else
{
this.repositories = repositories;
}
return this;
}
/**
* Adds the specified repository for collection.
*
* @param repository The repository to collect dependency information from, may be {@code null}.
* @return This request for chaining, never {@code null}.
*/
public CollectRequest addRepository( RemoteRepository repository )
{
if ( repository != null )
{
if ( this.repositories.isEmpty() )
{
this.repositories = new ArrayList();
}
this.repositories.add( repository );
}
return this;
}
/**
* Gets the context in which this request is made.
*
* @return The context, never {@code null}.
*/
public String getRequestContext()
{
return context;
}
/**
* Sets the context in which this request is made.
*
* @param context The context, may be {@code null}.
* @return This request for chaining, never {@code null}.
*/
public CollectRequest setRequestContext( String context )
{
this.context = ( context != null ) ? context : "";
return this;
}
/**
* Gets the trace information that describes the higher level request/operation in which this request is issued.
*
* @return The trace information about the higher level operation or {@code null} if none.
*/
public RequestTrace getTrace()
{
return trace;
}
/**
* Sets the trace information that describes the higher level request/operation in which this request is issued.
*
* @param trace The trace information about the higher level operation, may be {@code null}.
* @return This request for chaining, never {@code null}.
*/
public CollectRequest setTrace( RequestTrace trace )
{
this.trace = trace;
return this;
}
@Override
public String toString()
{
return getRoot() + " -> " + getDependencies() + " < " + getRepositories();
}
}
aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/collection/CollectResult.java 0000664 0000000 0000000 00000005722 11670505567 0031225 0 ustar 00root root 0000000 0000000 package org.sonatype.aether.collection;
/*******************************************************************************
* Copyright (c) 2010-2011 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
*******************************************************************************/
import java.util.ArrayList;
import java.util.List;
import org.sonatype.aether.RepositorySystem;
import org.sonatype.aether.RepositorySystemSession;
import org.sonatype.aether.graph.DependencyNode;
/**
* The result of a dependency collection request.
*
* @author Benjamin Bentmann
* @see RepositorySystem#collectDependencies(RepositorySystemSession, CollectRequest)
*/
public class CollectResult
{
private final CollectRequest request;
private final List exceptions;
private DependencyNode root;
/**
* Creates a new result for the specified request.
*
* @param request The resolution request, must not be {@code null}.
*/
public CollectResult( CollectRequest request )
{
if ( request == null )
{
throw new IllegalArgumentException( "dependency collection request has not been specified" );
}
this.request = request;
this.exceptions = new ArrayList( 4 );
}
/**
* Gets the collection request that was made.
*
* @return The collection request, never {@code null}.
*/
public CollectRequest getRequest()
{
return request;
}
/**
* Gets the exceptions that occurred while building the dependency graph.
*
* @return The exceptions that occurred, never {@code null}.
*/
public List getExceptions()
{
return exceptions;
}
/**
* Records the specified exception while building the dependency graph.
*
* @param exception The exception to record, may be {@code null}.
* @return This result for chaining, never {@code null}.
*/
public CollectResult addException( Exception exception )
{
if ( exception != null )
{
this.exceptions.add( exception );
}
return this;
}
/**
* Gets the root node of the dependency graph.
*
* @return The root node of the dependency graph or {@code null} if none.
*/
public DependencyNode getRoot()
{
return root;
}
/**
* Sets the root node of the dependency graph.
*
* @param root The root node of the dependency graph, may be {@code null}.
* @return This result for chaining, never {@code null}.
*/
public CollectResult setRoot( DependencyNode root )
{
this.root = root;
return this;
}
@Override
public String toString()
{
return String.valueOf( getRoot() );
}
}
DependencyCollectionContext.java 0000664 0000000 0000000 00000003463 11670505567 0034021 0 ustar 00root root 0000000 0000000 aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/collection package org.sonatype.aether.collection;
/*******************************************************************************
* Copyright (c) 2010-2011 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
*******************************************************************************/
import java.util.List;
import org.sonatype.aether.RepositorySystemSession;
import org.sonatype.aether.graph.Dependency;
/**
* A context used during dependency collection to update the dependency manager, selector and traverser.
*
* @author Benjamin Bentmann
* @see DependencyManager#deriveChildManager(DependencyCollectionContext)
* @see DependencyTraverser#deriveChildTraverser(DependencyCollectionContext)
* @see DependencySelector#deriveChildSelector(DependencyCollectionContext)
*/
public interface DependencyCollectionContext
{
/**
* Gets the repository system session during which the dependency collection happens.
*
* @return The repository system session, never {@code null}.
*/
RepositorySystemSession getSession();
/**
* Gets the dependency whose children are to be processed next during dependency collection.
*
* @return The dependency whose children are going to be processed or {@code null} in case of the root node without
* dependency.
*/
Dependency getDependency();
/**
* Gets the dependency management information that was contributed by the artifact descriptor of the current
* dependency.
*
* @return The dependency management information, never {@code null}.
*/
List getManagedDependencies();
}
DependencyCollectionException.java 0000664 0000000 0000000 00000003334 11670505567 0034330 0 ustar 00root root 0000000 0000000 aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/collection package org.sonatype.aether.collection;
/*******************************************************************************
* Copyright (c) 2010-2011 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
*******************************************************************************/
import org.sonatype.aether.RepositoryException;
/**
* Thrown in case of bad artifact descriptors, version ranges or other issues encountered during calculation of the
* dependency graph.
*
* @author Benjamin Bentmann
*/
public class DependencyCollectionException
extends RepositoryException
{
private final CollectResult result;
public DependencyCollectionException( CollectResult result )
{
super( "Failed to collect dependencies for " + getSource( result ), getCause( result ) );
this.result = result;
}
public CollectResult getResult()
{
return result;
}
private static String getSource( CollectResult result )
{
if ( result == null )
{
return "";
}
CollectRequest request = result.getRequest();
if ( request.getRoot() != null )
{
return request.getRoot().toString();
}
return request.getDependencies().toString();
}
private static Throwable getCause( CollectResult result )
{
Throwable cause = null;
if ( result != null && !result.getExceptions().isEmpty() )
{
cause = result.getExceptions().get( 0 );
}
return cause;
}
}
DependencyGraphTransformationContext.java 0000664 0000000 0000000 00000003071 11670505567 0035711 0 ustar 00root root 0000000 0000000 aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/collection package org.sonatype.aether.collection;
/*******************************************************************************
* Copyright (c) 2010-2011 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
*******************************************************************************/
import org.sonatype.aether.RepositorySystemSession;
/**
* A context used during dependency collection to exchange information within a chain of dependency graph transformers.
*
* @author Benjamin Bentmann
* @see DependencyGraphTransformer
*/
public interface DependencyGraphTransformationContext
{
/**
* Gets the repository system session during which the graph transformation happens.
*
* @return The repository system session, never {@code null}.
*/
RepositorySystemSession getSession();
/**
* Gets a keyed value from the context.
*
* @param key The key used to query the value, must not be {@code null}.
* @return The queried value or {@code null} if none.
*/
Object get( Object key );
/**
* Puts a keyed value into the context.
*
* @param key The key used to store the value, must not be {@code null}.
* @param value The value to store, may be {@code null}.
* @return The previous value associated with the key or {@code null} if none.
*/
Object put( Object key, Object value );
}
DependencyGraphTransformer.java 0000664 0000000 0000000 00000003135 11670505567 0033641 0 ustar 00root root 0000000 0000000 aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/collection package org.sonatype.aether.collection;
/*******************************************************************************
* Copyright (c) 2010-2011 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
*******************************************************************************/
import org.sonatype.aether.RepositoryException;
import org.sonatype.aether.graph.DependencyNode;
/**
* Transforms a given dependency graph. Note: Dependency graphs may contain cycles, as such a graph transformer
* needs to gracefully handle cyclic graphs, e.g. guard against infinite recursion.
*
* @author Benjamin Bentmann
* @see org.sonatype.aether.RepositorySystemSession#getDependencyGraphTransformer()
*/
public interface DependencyGraphTransformer
{
/**
* Transforms the dependency graph denoted by the specified root node. The transformer may directly change the
* provided input graph or create a new graph.
*
* @param node The root node of the (possibly cyclic!) graph to transform, must not be {@code null}.
* @param context The graph transformation context, must not be {@code null}.
* @return The result graph of the transformation, never {@code null}.
* @throws RepositoryException If the transformation failed.
*/
DependencyNode transformGraph( DependencyNode node, DependencyGraphTransformationContext context )
throws RepositoryException;
}
aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/collection/DependencyManagement.java 0000664 0000000 0000000 00000011364 11670505567 0032513 0 ustar 00root root 0000000 0000000 package org.sonatype.aether.collection;
/*******************************************************************************
* Copyright (c) 2010-2011 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
*******************************************************************************/
import java.util.Collection;
import java.util.Map;
import org.sonatype.aether.graph.Dependency;
import org.sonatype.aether.graph.Exclusion;
/**
* The management updates to apply to a dependency.
*
* @author Benjamin Bentmann
* @see DependencyManager#manageDependency(Dependency)
*/
public class DependencyManagement
{
private String version;
private String scope;
private Collection exclusions;
private Map properties;
/**
* Creates an empty management update.
*/
public DependencyManagement()
{
// enables default constructor
}
/**
* Gets the new version to apply to the dependency.
*
* @return The new version or {@code null} if the version is not managed and the existing dependency version should
* remain unchanged.
*/
public String getVersion()
{
return version;
}
/**
* Sets the new version to apply to the dependency.
*
* @param version The new version, may be {@code null} if the version is not managed.
* @return This management update for chaining, never {@code null}.
*/
public DependencyManagement setVersion( String version )
{
this.version = version;
return this;
}
/**
* Gets the new scope to apply to the dependency.
*
* @return The new scope or {@code null} if the scope is not managed and the existing dependency scope should remain
* unchanged.
*/
public String getScope()
{
return scope;
}
/**
* Sets the new scope to apply to the dependency.
*
* @param scope The new scope, may be {@code null} if the scope is not managed.
* @return This management update for chaining, never {@code null}.
*/
public DependencyManagement setScope( String scope )
{
this.scope = scope;
return this;
}
/**
* Gets the new exclusions to apply to the dependency. Note that this collection denotes the complete set of
* exclusions for the dependency, i.e. the dependency manager controls whether any existing exclusions get merged
* with information from dependency management or overridden by it.
*
* @return The new exclusions or {@code null} if the exclusions are not managed and the existing dependency
* exclusions should remain unchanged.
*/
public Collection getExclusions()
{
return exclusions;
}
/**
* Sets the new exclusions to apply to the dependency. Note that this collection denotes the complete set of
* exclusions for the dependency, i.e. the dependency manager controls whether any existing exclusions get merged
* with information from dependency management or overridden by it.
*
* @param exclusions The new exclusions, may be {@code null} if the exclusions are not managed.
* @return This management update for chaining, never {@code null}.
*/
public DependencyManagement setExclusions( Collection exclusions )
{
this.exclusions = exclusions;
return this;
}
/**
* Gets the new properties to apply to the dependency. Note that this map denotes the complete set of properties,
* i.e. the dependency manager controls whether any existing properties get merged with the information from
* dependency management or overridden by it.
*
* @return The new artifact properties or {@code null} if the properties are not managed and the existing properties
* should remain unchanged.
*/
public Map getProperties()
{
return properties;
}
/**
* Sets the new properties to apply to the dependency. Note that this map denotes the complete set of properties,
* i.e. the dependency manager controls whether any existing properties get merged with the information from
* dependency management or overridden by it.
*
* @param properties The new artifact properties, may be {@code null} if the properties are not managed.
* @return This management update for chaining, never {@code null}.
*/
public DependencyManagement setProperties( Map properties )
{
this.properties = properties;
return this;
}
}
aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/collection/DependencyManager.java 0000664 0000000 0000000 00000003647 11670505567 0032016 0 ustar 00root root 0000000 0000000 package org.sonatype.aether.collection;
/*******************************************************************************
* Copyright (c) 2010-2011 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
*******************************************************************************/
import org.sonatype.aether.graph.Dependency;
/**
* Applies dependency management to the dependencies of a dependency node. Note: For the sake of good
* performance during dependency collection, implementations should provide a semantic {@link Object#equals(Object)
* equals()} method.
*
* @author Benjamin Bentmann
* @see org.sonatype.aether.RepositorySystemSession#getDependencyManager()
* @see org.sonatype.aether.RepositorySystem#collectDependencies(org.sonatype.aether.RepositorySystemSession,
* CollectRequest)
*/
public interface DependencyManager
{
/**
* Applies dependency management to the specified dependency.
*
* @param dependency The dependency to manage, must not be {@code null}.
* @return The management update to apply to the dependency or {@code null} if the dependency is not managed at all.
*/
DependencyManagement manageDependency( Dependency dependency );
/**
* Derives a dependency manager for the specified collection context. When calculating the child manager,
* implementors are strongly advised to simply return the current instance if nothing changed to help save memory.
*
* @param context The dependency collection context, must not be {@code null}.
* @return The dependency manager for the dependencies of the target node, must not be {@code null}.
*/
DependencyManager deriveChildManager( DependencyCollectionContext context );
}
aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/collection/DependencySelector.java 0000664 0000000 0000000 00000003612 11670505567 0032214 0 ustar 00root root 0000000 0000000 package org.sonatype.aether.collection;
/*******************************************************************************
* Copyright (c) 2010-2011 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
*******************************************************************************/
import org.sonatype.aether.graph.Dependency;
/**
* Decides what dependencies to include in the dependency graph. Note: For the sake of good performance during
* dependency collection, implementations should provide a semantic {@link Object#equals(Object) equals()} method.
*
* @author Benjamin Bentmann
* @see org.sonatype.aether.RepositorySystemSession#getDependencySelector()
* @see org.sonatype.aether.RepositorySystem#collectDependencies(org.sonatype.aether.RepositorySystemSession,
* CollectRequest)
*/
public interface DependencySelector
{
/**
* Applies exclusions to the specified dependency.
*
* @param dependency The dependency to filter, must not be {@code null}.
* @return {@code false} if the dependency should be excluded from the children of the current node, {@code true}
* otherwise.
*/
boolean selectDependency( Dependency dependency );
/**
* Derives a dependency selector for the specified collection context. When calculating the child selector,
* implementors are strongly advised to simply return the current instance if nothing changed to help save memory.
*
* @param context The dependency collection context, must not be {@code null}.
* @return The dependency filter for the target node, must not be {@code null}.
*/
DependencySelector deriveChildSelector( DependencyCollectionContext context );
}
aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/collection/DependencyTraverser.java 0000664 0000000 0000000 00000004124 11670505567 0032410 0 ustar 00root root 0000000 0000000 package org.sonatype.aether.collection;
/*******************************************************************************
* Copyright (c) 2010-2011 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
*******************************************************************************/
import org.sonatype.aether.graph.Dependency;
/**
* Decides whether the dependencies of a dependency node should be traversed as well. Note: For the sake of
* good performance during dependency collection, implementations should provide a semantic
* {@link Object#equals(Object) equals()} method.
*
* @author Benjamin Bentmann
* @see org.sonatype.aether.RepositorySystemSession#getDependencyTraverser()
* @see org.sonatype.aether.RepositorySystem#collectDependencies(org.sonatype.aether.RepositorySystemSession,
* CollectRequest)
*/
public interface DependencyTraverser
{
/**
* Decides whether the dependencies of the specified dependency should be traversed.
*
* @param dependency The dependency to check, must not be {@code null}.
* @return {@code true} if the dependency graph builder should recurse into the specified dependency and process its
* dependencies, {@code false} otherwise.
*/
boolean traverseDependency( Dependency dependency );
/**
* Derives a dependency traverser that will be used to decide whether the transitive dependencies of the dependency
* given in the collection context shall be traversed. When calculating the child traverser, implementors are
* strongly advised to simply return the current instance if nothing changed to help save memory.
*
* @param context The dependency collection context, must not be {@code null}.
* @return The dependency traverser for the target node, must not be {@code null}.
*/
DependencyTraverser deriveChildTraverser( DependencyCollectionContext context );
}
UnsolvableVersionConflictException.java 0000664 0000000 0000000 00000012327 11670505567 0035402 0 ustar 00root root 0000000 0000000 aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/collection package org.sonatype.aether.collection;
/*******************************************************************************
* Copyright (c) 2010-2011 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
*******************************************************************************/
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.List;
import org.sonatype.aether.RepositoryException;
import org.sonatype.aether.artifact.Artifact;
import org.sonatype.aether.graph.DependencyNode;
import org.sonatype.aether.version.VersionConstraint;
/**
* Thrown in case of an unsolvable conflict between different version constraints for a dependency.
*
* @author Benjamin Bentmann
*/
public class UnsolvableVersionConflictException
extends RepositoryException
{
private final Object dependencyConflictId;
private final Collection versions;
private final Collection> paths;
public UnsolvableVersionConflictException( Object dependencyConflictId, Collection versions )
{
super( "Could not resolve version conflict for " + dependencyConflictId + " with requested versions "
+ toList( versions ) );
this.dependencyConflictId = ( dependencyConflictId != null ) ? dependencyConflictId : "";
this.versions = ( versions != null ) ? versions : Collections. emptyList();
this.paths = Collections.emptyList();
}
private static String toList( Collection versions )
{
StringBuilder buffer = new StringBuilder( 256 );
if ( versions != null )
{
for ( String version : versions )
{
if ( buffer.length() > 0 )
{
buffer.append( ", " );
}
buffer.append( version );
}
}
return buffer.toString();
}
public UnsolvableVersionConflictException( Collection> paths, Object dependencyConflictId )
{
super( "Could not resolve version conflict among " + toPaths( paths ) );
this.dependencyConflictId = ( dependencyConflictId != null ) ? dependencyConflictId : "";
if ( paths == null )
{
this.paths = Collections.emptyList();
this.versions = Collections.emptyList();
}
else
{
this.paths = paths;
this.versions = new LinkedHashSet();
for ( List path : paths )
{
VersionConstraint constraint = path.get( path.size() - 1 ).getVersionConstraint();
if ( constraint != null && !constraint.getRanges().isEmpty() )
{
versions.add( constraint.toString() );
}
}
}
}
private static String toPaths( Collection> paths )
{
String result = "";
if ( paths != null )
{
Collection strings = new LinkedHashSet();
for ( List path : paths )
{
strings.add( toPath( path ) );
}
result = strings.toString();
}
return result;
}
private static String toPath( List path )
{
StringBuilder buffer = new StringBuilder( 256 );
for ( Iterator it = path.iterator(); it.hasNext(); )
{
DependencyNode node = it.next();
if ( node.getDependency() == null )
{
continue;
}
Artifact artifact = node.getDependency().getArtifact();
buffer.append( artifact.getGroupId() );
buffer.append( ':' ).append( artifact.getArtifactId() );
buffer.append( ':' ).append( artifact.getExtension() );
if ( artifact.getClassifier().length() > 0 )
{
buffer.append( ':' ).append( artifact.getClassifier() );
}
buffer.append( ':' ).append( node.getVersionConstraint() );
if ( it.hasNext() )
{
buffer.append( " -> " );
}
}
return buffer.toString();
}
/**
* Gets the conflict id of the dependency that encountered the version conflict.
*
* @return The conflict id, never {@code null}.
*/
public Object getDependencyConflictId()
{
return dependencyConflictId;
}
/**
* Gets the paths leading to the conflicting dependencies.
*
* @return The (read-only) paths leading to the conflicting dependencies, never {@code null}.
*/
public Collection> getPaths()
{
return paths;
}
/**
* Gets the conflicting version constraints of the dependency.
*
* @return The (read-only) conflicting version constraints, never {@code null}.
*/
public Collection getVersions()
{
return versions;
}
}
aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/deployment/ 0000775 0000000 0000000 00000000000 11670505567 0025615 5 ustar 00root root 0000000 0000000 aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/deployment/DeployRequest.java 0000664 0000000 0000000 00000011375 11670505567 0031274 0 ustar 00root root 0000000 0000000 package org.sonatype.aether.deployment;
/*******************************************************************************
* Copyright (c) 2010-2011 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
*******************************************************************************/
import java.util.ArrayList;
import java.util.Collection;
import org.sonatype.aether.RepositorySystem;
import org.sonatype.aether.RepositorySystemSession;
import org.sonatype.aether.RequestTrace;
import org.sonatype.aether.artifact.Artifact;
import org.sonatype.aether.metadata.Metadata;
import org.sonatype.aether.repository.RemoteRepository;
/**
* A request to deploy artifacts and their accompanying metadata into the a remote repository.
*
* @author Benjamin Bentmann
* @see RepositorySystem#deploy(RepositorySystemSession, DeployRequest)
*/
public class DeployRequest
{
private Collection artifacts = new ArrayList();
private Collection metadata = new ArrayList();
private RemoteRepository repository;
private RequestTrace trace;
/**
* Gets the artifact to deploy.
*
* @return The artifacts to deploy, never {@code null}.
*/
public Collection getArtifacts()
{
return artifacts;
}
/**
* Sets the artifacts to deploy.
*
* @param artifacts The artifacts to deploy, may be {@code null}.
* @return This request for chaining, never {@code null}.
*/
public DeployRequest setArtifacts( Collection artifacts )
{
if ( artifacts == null )
{
this.artifacts = new ArrayList();
}
else
{
this.artifacts = artifacts;
}
return this;
}
/**
* Adds the specified artifacts for deployment.
*
* @param artifact The artifact to add, may be {@code null}.
* @return This request for chaining, never {@code null}.
*/
public DeployRequest addArtifact( Artifact artifact )
{
if ( artifact != null )
{
artifacts.add( artifact );
}
return this;
}
/**
* Gets the metadata to deploy.
*
* @return The metadata to deploy, never {@code null}.
*/
public Collection getMetadata()
{
return metadata;
}
/**
* Sets the metadata to deploy.
*
* @param metadata The metadata to deploy, may be {@code null}.
* @return This request for chaining, never {@code null}.
*/
public DeployRequest setMetadata( Collection metadata )
{
if ( metadata == null )
{
this.metadata = new ArrayList();
}
else
{
this.metadata = metadata;
}
return this;
}
/**
* Adds the specified metadata for deployment.
*
* @param metadata The metadata to add, may be {@code null}.
* @return This request for chaining, never {@code null}.
*/
public DeployRequest addMetadata( Metadata metadata )
{
if ( metadata != null )
{
this.metadata.add( metadata );
}
return this;
}
/**
* Gets the repository to deploy to.
*
* @return The repository to deploy to or {@code null} if not set.
*/
public RemoteRepository getRepository()
{
return repository;
}
/**
* Sets the repository to deploy to.
*
* @param repository The repository to deploy to, may be {@code null}.
* @return This request for chaining, never {@code null}.
*/
public DeployRequest setRepository( RemoteRepository repository )
{
this.repository = repository;
return this;
}
/**
* Gets the trace information that describes the higher level request/operation in which this request is issued.
*
* @return The trace information about the higher level operation or {@code null} if none.
*/
public RequestTrace getTrace()
{
return trace;
}
/**
* Sets the trace information that describes the higher level request/operation in which this request is issued.
*
* @param trace The trace information about the higher level operation, may be {@code null}.
* @return This request for chaining, never {@code null}.
*/
public DeployRequest setTrace( RequestTrace trace )
{
this.trace = trace;
return this;
}
@Override
public String toString()
{
return getArtifacts() + ", " + getMetadata() + " > " + getRepository();
}
}
aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/deployment/DeployResult.java 0000664 0000000 0000000 00000010145 11670505567 0031114 0 ustar 00root root 0000000 0000000 package org.sonatype.aether.deployment;
/*******************************************************************************
* Copyright (c) 2010-2011 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
*******************************************************************************/
import java.util.ArrayList;
import java.util.Collection;
import org.sonatype.aether.RepositorySystem;
import org.sonatype.aether.RepositorySystemSession;
import org.sonatype.aether.artifact.Artifact;
import org.sonatype.aether.metadata.Metadata;
/**
* The result of deploying artifacts and their accompanying metadata into the a remote repository.
*
* @author Benjamin Bentmann
* @see RepositorySystem#deploy(RepositorySystemSession, DeployRequest)
*/
public class DeployResult
{
private final DeployRequest request;
private Collection artifacts = new ArrayList();
private Collection metadata = new ArrayList();
/**
* Creates a new result for the specified request.
*
* @param request The deployment request, must not be {@code null}.
*/
public DeployResult( DeployRequest request )
{
if ( request == null )
{
throw new IllegalArgumentException( "deploy request has not been specified" );
}
this.request = request;
}
/**
* Gets the deploy request that was made.
*
* @return The deploy request, never {@code null}.
*/
public DeployRequest getRequest()
{
return request;
}
/**
* Gets the artifacts that got deployed.
*
* @return The deployed artifacts, never {@code null}.
*/
public Collection getArtifacts()
{
return artifacts;
}
/**
* Sets the artifacts that got deployed.
*
* @param artifacts The deployed artifacts, may be {@code null}.
* @return This result for chaining, never {@code null}.
*/
public DeployResult setArtifacts( Collection artifacts )
{
if ( artifacts == null )
{
this.artifacts = new ArrayList();
}
else
{
this.artifacts = artifacts;
}
return this;
}
/**
* Adds the specified artifacts to the result.
*
* @param artifact The deployed artifact to add, may be {@code null}.
* @return This result for chaining, never {@code null}.
*/
public DeployResult addArtifact( Artifact artifact )
{
if ( artifact != null )
{
artifacts.add( artifact );
}
return this;
}
/**
* Gets the metadata that got deployed. Note that due to automatically generated metadata, there might have been
* more metadata deployed than originally specified in the deploy request.
*
* @return The deployed metadata, never {@code null}.
*/
public Collection getMetadata()
{
return metadata;
}
/**
* Sets the metadata that got deployed.
*
* @param metadata The deployed metadata, may be {@code null}.
* @return This result for chaining, never {@code null}.
*/
public DeployResult setMetadata( Collection metadata )
{
if ( metadata == null )
{
this.metadata = new ArrayList();
}
else
{
this.metadata = metadata;
}
return this;
}
/**
* Adds the specified metadata to this result.
*
* @param metadata The deployed metadata to add, may be {@code null}.
* @return This result for chaining, never {@code null}.
*/
public DeployResult addMetadata( Metadata metadata )
{
if ( metadata != null )
{
this.metadata.add( metadata );
}
return this;
}
@Override
public String toString()
{
return getArtifacts() + ", " + getMetadata();
}
}
aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/deployment/DeploymentException.java 0000664 0000000 0000000 00000001634 11670505567 0032463 0 ustar 00root root 0000000 0000000 package org.sonatype.aether.deployment;
/*******************************************************************************
* Copyright (c) 2010-2011 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
*******************************************************************************/
import org.sonatype.aether.RepositoryException;
/**
* Thrown in case of a deployment error like authentication failure.
*
* @author Benjamin Bentmann
*/
public class DeploymentException
extends RepositoryException
{
public DeploymentException( String message )
{
super( message );
}
public DeploymentException( String message, Throwable cause )
{
super( message, cause );
}
}
aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/graph/ 0000775 0000000 0000000 00000000000 11670505567 0024536 5 ustar 00root root 0000000 0000000 aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/graph/Dependency.java 0000664 0000000 0000000 00000022066 11670505567 0027465 0 ustar 00root root 0000000 0000000 package org.sonatype.aether.graph;
/*******************************************************************************
* Copyright (c) 2010-2011 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
*******************************************************************************/
import java.util.AbstractSet;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.NoSuchElementException;
import java.util.Set;
import org.sonatype.aether.artifact.Artifact;
/**
* A dependency to some artifact. Note: Instances of this class are immutable and the exposed mutators return
* new objects rather than changing the current instance.
*
* @author Benjamin Bentmann
*/
public final class Dependency
{
private final Artifact artifact;
private final String scope;
private final boolean optional;
private final Set exclusions;
/**
* Creates a mandatory dependency on the specified artifact with the given scope.
*
* @param artifact The artifact being depended on, must not be {@code null}.
* @param scope The scope of the dependency, may be {@code null}.
*/
public Dependency( Artifact artifact, String scope )
{
this( artifact, scope, false );
}
/**
* Creates a dependency on the specified artifact with the given scope.
*
* @param artifact The artifact being depended on, must not be {@code null}.
* @param scope The scope of the dependency, may be {@code null}.
* @param optional A flag whether the dependency is optional or mandatory.
*/
public Dependency( Artifact artifact, String scope, boolean optional )
{
this( artifact, scope, optional, null );
}
/**
* Creates a dependency on the specified artifact with the given scope and exclusions.
*
* @param artifact The artifact being depended on, must not be {@code null}.
* @param scope The scope of the dependency, may be {@code null}.
* @param optional A flag whether the dependency is optional or mandatory.
* @param exclusions The exclusions that apply to transitive dependencies, may be {@code null} if none.
*/
public Dependency( Artifact artifact, String scope, boolean optional, Collection exclusions )
{
this( artifact, scope, Exclusions.copy( exclusions ), optional );
}
private Dependency( Artifact artifact, String scope, Set exclusions, boolean optional )
{
// NOTE: This constructor assumes immutability of the provided exclusion collection, for internal use only
if ( artifact == null )
{
throw new IllegalArgumentException( "no artifact specified for dependency" );
}
this.artifact = artifact;
this.scope = ( scope != null ) ? scope : "";
this.optional = optional;
this.exclusions = exclusions;
}
/**
* Gets the artifact being depended on.
*
* @return The artifact, never {@code null}.
*/
public Artifact getArtifact()
{
return artifact;
}
/**
* Sets the artifact being depended on.
*
* @param artifact The artifact, must not be {@code null}.
* @return The new dependency, never {@code null}.
*/
public Dependency setArtifact( Artifact artifact )
{
if ( this.artifact.equals( artifact ) )
{
return this;
}
return new Dependency( artifact, scope, exclusions, optional );
}
/**
* Gets the scope of the dependency. The scope defines in which context this dependency is relevant.
*
* @return The scope or an empty string if not set, never {@code null}.
*/
public String getScope()
{
return scope;
}
/**
* Sets the scope of the dependency, e.g. "compile".
*
* @param scope The scope of the dependency, may be {@code null}.
* @return The new dependency, never {@code null}.
*/
public Dependency setScope( String scope )
{
if ( this.scope.equals( scope ) || ( scope == null && this.scope.length() <= 0 ) )
{
return this;
}
return new Dependency( artifact, scope, exclusions, optional );
}
/**
* Indicates whether this dependency is optional or not. Optional dependencies can usually be ignored during
* transitive dependency resolution.
*
* @return {@code true} if the dependency is optional, {@code false} otherwise.
*/
public boolean isOptional()
{
return optional;
}
/**
* Sets the optional flag for the dependency.
*
* @param optional {@code true} if the dependency is optional, {@code false} if the dependency is mandatory.
* @return The new dependency, never {@code null}.
*/
public Dependency setOptional( boolean optional )
{
if ( this.optional == optional )
{
return this;
}
return new Dependency( artifact, scope, exclusions, optional );
}
/**
* Gets the exclusions for this dependency. Exclusions can be used to remove transitive dependencies during
* resolution.
*
* @return The (read-only) exclusions, never {@code null}.
*/
public Collection getExclusions()
{
return exclusions;
}
/**
* Sets the exclusions for the dependency.
*
* @param exclusions The exclusions, may be {@code null}.
* @return The new dependency, never {@code null}.
*/
public Dependency setExclusions( Collection exclusions )
{
if ( hasEquivalentExclusions( exclusions ) )
{
return this;
}
return new Dependency( artifact, scope, optional, exclusions );
}
private boolean hasEquivalentExclusions( Collection exclusions )
{
if ( exclusions == null || exclusions.isEmpty() )
{
return this.exclusions.isEmpty();
}
if ( exclusions instanceof Set )
{
return this.exclusions.equals( exclusions );
}
return exclusions.size() >= this.exclusions.size() && this.exclusions.containsAll( exclusions )
&& exclusions.containsAll( this.exclusions );
}
@Override
public String toString()
{
return String.valueOf( getArtifact() ) + " (" + getScope() + ( isOptional() ? "?" : "" ) + ")";
}
@Override
public boolean equals( Object obj )
{
if ( obj == this )
{
return true;
}
else if ( obj == null || !getClass().equals( obj.getClass() ) )
{
return false;
}
Dependency that = (Dependency) obj;
return artifact.equals( that.artifact ) && scope.equals( that.scope ) && optional == that.optional
&& exclusions.equals( that.exclusions );
}
@Override
public int hashCode()
{
int hash = 17;
hash = hash * 31 + artifact.hashCode();
hash = hash * 31 + scope.hashCode();
hash = hash * 31 + ( optional ? 1 : 0 );
hash = hash * 31 + exclusions.size();
return hash;
}
private static class Exclusions
extends AbstractSet
{
private final Exclusion[] exclusions;
public static Set copy( Collection exclusions )
{
if ( exclusions == null || exclusions.isEmpty() )
{
return Collections.emptySet();
}
return new Exclusions( exclusions );
}
private Exclusions( Collection exclusions )
{
if ( exclusions.size() > 1 && !( exclusions instanceof Set ) )
{
exclusions = new LinkedHashSet( exclusions );
}
this.exclusions = exclusions.toArray( new Exclusion[exclusions.size()] );
}
@Override
public Iterator iterator()
{
return new Iterator()
{
private int cursor = 0;
public boolean hasNext()
{
return cursor < exclusions.length;
}
public Exclusion next()
{
try
{
Exclusion exclusion = exclusions[cursor];
cursor++;
return exclusion;
}
catch ( IndexOutOfBoundsException e )
{
throw new NoSuchElementException();
}
}
public void remove()
{
throw new UnsupportedOperationException();
}
};
}
@Override
public int size()
{
return exclusions.length;
}
}
}
aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/graph/DependencyFilter.java 0000664 0000000 0000000 00000002631 11670505567 0030627 0 ustar 00root root 0000000 0000000 package org.sonatype.aether.graph;
/*******************************************************************************
* Copyright (c) 2010-2011 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
*******************************************************************************/
import java.util.List;
/**
* A filter to include/exclude dependency nodes during other operations.
*
* @author Benjamin Bentmann
*/
public interface DependencyFilter
{
/**
* Indicates whether the specified dependency node shall be included or excluded.
*
* @param node The dependency node to filter, must not be {@code null}.
* @param parents The (read-only) chain of parent nodes that leads to the node to be filtered, must not be
* {@code null}. Iterating this (possibly empty) list walks up the dependency graph towards the root
* node, i.e. the immediate parent node (if any) is the first node in the list. The size of the list also
* denotes the zero-based depth of the filtered node.
* @return {@code true} to include the dependency node, {@code false} to exclude it.
*/
boolean accept( DependencyNode node, List parents );
}
aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/graph/DependencyNode.java 0000664 0000000 0000000 00000012176 11670505567 0030274 0 ustar 00root root 0000000 0000000 package org.sonatype.aether.graph;
/*******************************************************************************
* Copyright (c) 2010-2011 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
*******************************************************************************/
import java.util.Collection;
import java.util.List;
import java.util.Map;
import org.sonatype.aether.artifact.Artifact;
import org.sonatype.aether.repository.RemoteRepository;
import org.sonatype.aether.version.Version;
import org.sonatype.aether.version.VersionConstraint;
/**
* A node within a dependency graph. Note: When traversing a dirty graph, i.e. a graph which hasn't undergone
* conflict resolution, there can be multiple path leading to the same node instance.
*
* @author Benjamin Bentmann
*/
public interface DependencyNode
{
/**
* Gets the child nodes of this node.
*
* @return The child nodes of this node, never {@code null}.
*/
List getChildren();
/**
* Gets the dependency associated with this node. Note: For dependency graphs that have been constructed
* without a root dependency, the root node will not have a dependency associated with it.
*
* @return The dependency or {@code null} if none.
*/
Dependency getDependency();
/**
* Sets the artifact of the dependency.
*
* @param artifact The artifact satisfying the dependency, must not be {@code null}.
*/
void setArtifact( Artifact artifact );
/**
* Gets the sequence of relocations that was followed to resolve the artifact referenced by the dependency.
*
* @return The (read-only) sequence of relocations, never {@code null}.
*/
List getRelocations();
/**
* Gets the known aliases for this dependency's artifact. An alias can be used to mark a patched rebuild of some
* other artifact as such, thereby allowing conflict resolution to consider the patched and the original artifact as
* a conflict.
*
* @return The (read-only) set of known aliases, never {@code null}.
*/
Collection getAliases();
/**
* Gets the version constraint that was parsed from the dependency's version declaration.
*
* @return The version constraint for this node or {@code null}.
*/
VersionConstraint getVersionConstraint();
/**
* Gets the version that was selected for the dependency's target artifact.
*
* @return The parsed version or {@code null}.
*/
Version getVersion();
/**
* Sets the scope of the dependency.
*
* @param scope The scope, may be {@code null}.
*/
void setScope( String scope );
/**
* Gets the version or version range for the dependency before dependency management was applied (if any).
*
* @return The dependency version before dependency management or {@code null} if the version was not managed.
*/
String getPremanagedVersion();
/**
* Gets the scope for the dependency before dependency management was applied (if any).
*
* @return The dependency scope before dependency management or {@code null} if the scope was not managed.
*/
String getPremanagedScope();
/**
* Gets the remote repositories from which this node's artifact shall be resolved.
*
* @return The (read-only) list of remote repositories to use for artifact resolution, never {@code null}.
*/
List getRepositories();
/**
* Gets the request context in which this dependency node was created.
*
* @return The request context, never {@code null}.
*/
String getRequestContext();
/**
* Sets the request context in which this dependency node was created.
*
* @param context The context, may be {@code null}.
*/
void setRequestContext( String context );
/**
* Gets the custom data associated with this dependency node. Clients of the repository system can use this data to
* annotate dependency nodes with domain-specific information.
*
* @return The (read-only) key-value mappings, never {@code null}.
*/
Map