pax_global_header00006660000000000000000000000064116705055670014526gustar00rootroot0000000000000052 comment=6955c106032de70e19ed4bbb94e23cbe358a9081 aether-1.13.1/000077500000000000000000000000001167050556700130615ustar00rootroot00000000000000aether-1.13.1/.gitignore000066400000000000000000000001041167050556700150440ustar00rootroot00000000000000target/ .project .classpath .settings/ bin/ .idea *.iml *.ipr *.iws aether-1.13.1/README.md000066400000000000000000000022471167050556700143450ustar00rootroot00000000000000Homepage ======== 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/000077500000000000000000000000001167050556700151005ustar00rootroot00000000000000aether-1.13.1/aether-api/pom.xml000066400000000000000000000025421167050556700164200ustar00rootroot00000000000000 4.0.0 org.sonatype.aether aether 1.13.1 aether-api Aether :: API The application programming interface for the repository system. junit junit test org.codehaus.mojo animal-sniffer-maven-plugin org.codehaus.mojo clirr-maven-plugin aether-1.13.1/aether-api/src/000077500000000000000000000000001167050556700156675ustar00rootroot00000000000000aether-1.13.1/aether-api/src/main/000077500000000000000000000000001167050556700166135ustar00rootroot00000000000000aether-1.13.1/aether-api/src/main/java/000077500000000000000000000000001167050556700175345ustar00rootroot00000000000000aether-1.13.1/aether-api/src/main/java/org/000077500000000000000000000000001167050556700203235ustar00rootroot00000000000000aether-1.13.1/aether-api/src/main/java/org/sonatype/000077500000000000000000000000001167050556700221655ustar00rootroot00000000000000aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/000077500000000000000000000000001167050556700234355ustar00rootroot00000000000000aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/AbstractRepositoryListener.java000066400000000000000000000040741167050556700316560ustar00rootroot00000000000000package 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.java000066400000000000000000000204121167050556700311630ustar00rootroot00000000000000package 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.java000066400000000000000000000045401167050556700274060ustar00rootroot00000000000000package 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.java000066400000000000000000000071071167050556700274660ustar00rootroot00000000000000package 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.java000066400000000000000000000023221167050556700303350ustar00rootroot00000000000000package 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.java000066400000000000000000000042221167050556700301650ustar00rootroot00000000000000package 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.java000066400000000000000000000317351167050556700276750ustar00rootroot00000000000000package 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 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 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.java000066400000000000000000000231161167050556700312330ustar00rootroot00000000000000package 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.java000066400000000000000000000036351167050556700267160ustar00rootroot00000000000000package 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.java000066400000000000000000000046611167050556700265240ustar00rootroot00000000000000package 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.java000066400000000000000000000053221167050556700265630ustar00rootroot00000000000000package 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 artifacts, Collection 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/000077500000000000000000000000001167050556700252325ustar00rootroot00000000000000aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/artifact/Artifact.java000066400000000000000000000115251167050556700276360ustar00rootroot00000000000000package 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.java000066400000000000000000000032761167050556700305040ustar00rootroot00000000000000package 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.java000066400000000000000000000016221167050556700322260ustar00rootroot00000000000000package 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/000077500000000000000000000000001167050556700255705ustar00rootroot00000000000000aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/collection/CollectRequest.java000066400000000000000000000240661167050556700314010ustar00rootroot00000000000000package 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.java000066400000000000000000000057221167050556700312250ustar00rootroot00000000000000package 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.java000066400000000000000000000034631167050556700340210ustar00rootroot00000000000000aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/collectionpackage 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.java000066400000000000000000000033341167050556700343300ustar00rootroot00000000000000aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/collectionpackage 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.java000066400000000000000000000030711167050556700357110ustar00rootroot00000000000000aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/collectionpackage 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.java000066400000000000000000000031351167050556700336410ustar00rootroot00000000000000aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/collectionpackage 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.java000066400000000000000000000113641167050556700325130ustar00rootroot00000000000000package 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.java000066400000000000000000000036471167050556700320160ustar00rootroot00000000000000package 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.java000066400000000000000000000036121167050556700322140ustar00rootroot00000000000000package 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.java000066400000000000000000000041241167050556700324100ustar00rootroot00000000000000package 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.java000066400000000000000000000123271167050556700354020ustar00rootroot00000000000000aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/collectionpackage 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/000077500000000000000000000000001167050556700256155ustar00rootroot00000000000000aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/deployment/DeployRequest.java000066400000000000000000000113751167050556700312740ustar00rootroot00000000000000package 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.java000066400000000000000000000101451167050556700311140ustar00rootroot00000000000000package 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.java000066400000000000000000000016341167050556700324630ustar00rootroot00000000000000package 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/000077500000000000000000000000001167050556700245365ustar00rootroot00000000000000aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/graph/Dependency.java000066400000000000000000000220661167050556700274650ustar00rootroot00000000000000package 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.java000066400000000000000000000026311167050556700306270ustar00rootroot00000000000000package 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.java000066400000000000000000000121761167050556700302740ustar00rootroot00000000000000package 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 getData(); /** * Associates the specified dependency node data with the given key. Note: This method must not be called * while {@link #getData()} is being iterated. * * @param key The key under which to store the data, must not be {@code null}. * @param value The data to associate with the key, may be {@code null} to remove the mapping. */ void setData( Object key, Object value ); /** * Traverses this node and potentially its children using the specified visitor. * * @param visitor The visitor to call back, must not be {@code null}. * @return {@code true} to visit siblings nodes of this node as well, {@code false} to skip siblings. */ boolean accept( DependencyVisitor visitor ); } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/graph/DependencyVisitor.java000066400000000000000000000027031167050556700310410ustar00rootroot00000000000000package 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 *******************************************************************************/ /** * A visitor for nodes of the dependency graph. * * @author Benjamin Bentmann * @see DependencyNode#accept(DependencyVisitor) */ public interface DependencyVisitor { /** * Notifies the visitor of a node visit before its children have been processed. * * @param node The dependency node being visited, must not be {@code null}. * @return {@code true} to visit child nodes of the specified node as well, {@code false} to skip children. */ boolean visitEnter( DependencyNode node ); /** * Notifies the visitor of a node visit after its children have been processed. Note that this method is always * invoked regardless whether any children have actually been visited. * * @param node The dependency node being visited, must not be {@code null}. * @return {@code true} to visit siblings nodes of the specified node as well, {@code false} to skip siblings. */ boolean visitLeave( DependencyNode node ); } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/graph/Exclusion.java000066400000000000000000000066751167050556700273700ustar00rootroot00000000000000package 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 *******************************************************************************/ /** * An exclusion of one or more transitive dependencies. Note: Instances of this class are immutable and the * exposed mutators return new objects rather than changing the current instance. * * @author Benjamin Bentmann * @see Dependency#getExclusions() */ public final class Exclusion { private final String groupId; private final String artifactId; private final String classifier; private final String extension; /** * Creates an exclusion for artifacts with the specified coordinates. * * @param groupId The group identifier, may be {@code null}. * @param artifactId The artifact identifier, may be {@code null}. * @param classifier The classifier, may be {@code null}. * @param extension The file extension, may be {@code null}. */ public Exclusion( String groupId, String artifactId, String classifier, String extension ) { this.groupId = ( groupId != null ) ? groupId : ""; this.artifactId = ( artifactId != null ) ? artifactId : ""; this.classifier = ( classifier != null ) ? classifier : ""; this.extension = ( extension != null ) ? extension : ""; } /** * Gets the group identifier for artifacts to exclude. * * @return The group identifier, never {@code null}. */ public String getGroupId() { return groupId; } /** * Gets the artifact identifier for artifacts to exclude. * * @return The artifact identifier, never {@code null}. */ public String getArtifactId() { return artifactId; } /** * Gets the classifier for artifacts to exclude. * * @return The classifier, never {@code null}. */ public String getClassifier() { return classifier; } /** * Gets the file extension for artifacts to exclude. * * @return The file extension of artifacts to exclude, never {@code null}. */ public String getExtension() { return extension; } @Override public String toString() { return getGroupId() + ':' + getArtifactId() + ':' + getExtension() + ( getClassifier().length() > 0 ? ':' + getClassifier() : "" ); } @Override public boolean equals( Object obj ) { if ( obj == this ) { return true; } else if ( obj == null || !getClass().equals( obj.getClass() ) ) { return false; } Exclusion that = (Exclusion) obj; return artifactId.equals( that.artifactId ) && groupId.equals( that.groupId ) && extension.equals( that.extension ) && classifier.equals( that.classifier ); } @Override public int hashCode() { int hash = 17; hash = hash * 31 + artifactId.hashCode(); hash = hash * 31 + groupId.hashCode(); hash = hash * 31 + classifier.hashCode(); hash = hash * 31 + extension.hashCode(); return hash; } } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/installation/000077500000000000000000000000001167050556700261365ustar00rootroot00000000000000aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/installation/InstallRequest.java000066400000000000000000000101141167050556700317550ustar00rootroot00000000000000package org.sonatype.aether.installation; /******************************************************************************* * 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; /** * A request to install artifacts and their accompanying metadata into the local repository. * * @author Benjamin Bentmann * @see RepositorySystem#install(RepositorySystemSession, InstallRequest) */ public class InstallRequest { private Collection artifacts = new ArrayList(); private Collection metadata = new ArrayList(); private RequestTrace trace; /** * Gets the artifact to install. * * @return The artifacts to install, never {@code null}. */ public Collection getArtifacts() { return artifacts; } /** * Sets the artifacts to install. * * @param artifacts The artifacts to install, may be {@code null}. * @return This request for chaining, never {@code null}. */ public InstallRequest setArtifacts( Collection artifacts ) { if ( artifacts == null ) { this.artifacts = new ArrayList(); } else { this.artifacts = artifacts; } return this; } /** * Adds the specified artifacts for installation. * * @param artifact The artifact to add, may be {@code null}. * @return This request for chaining, never {@code null}. */ public InstallRequest addArtifact( Artifact artifact ) { if ( artifact != null ) { artifacts.add( artifact ); } return this; } /** * Gets the metadata to install. * * @return The metadata to install, never {@code null}. */ public Collection getMetadata() { return metadata; } /** * Sets the metadata to install. * * @param metadata The metadata to install. * @return This request for chaining, never {@code null}. */ public InstallRequest setMetadata( Collection metadata ) { if ( metadata == null ) { this.metadata = new ArrayList(); } else { this.metadata = metadata; } return this; } /** * Adds the specified metadata for installation. * * @param metadata The metadata to add, may be {@code null}. * @return This request for chaining, never {@code null}. */ public InstallRequest addMetadata( Metadata metadata ) { if ( metadata != null ) { this.metadata.add( metadata ); } 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 InstallRequest setTrace( RequestTrace trace ) { this.trace = trace; return this; } @Override public String toString() { return getArtifacts() + ", " + getMetadata(); } } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/installation/InstallResult.java000066400000000000000000000102041167050556700316030ustar00rootroot00000000000000package org.sonatype.aether.installation; /******************************************************************************* * 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 installing artifacts and their accompanying metadata into the a remote repository. * * @author Benjamin Bentmann * @see RepositorySystem#install(RepositorySystemSession, InstallRequest) */ public class InstallResult { private final InstallRequest request; private Collection artifacts = new ArrayList(); private Collection metadata = new ArrayList(); /** * Creates a new result for the specified request. * * @param request The installation request, must not be {@code null}. */ public InstallResult( InstallRequest request ) { if ( request == null ) { throw new IllegalArgumentException( "install request has not been specified" ); } this.request = request; } /** * Gets the install request that was made. * * @return The install request, never {@code null}. */ public InstallRequest getRequest() { return request; } /** * Gets the artifacts that got installed. * * @return The installed artifacts, never {@code null}. */ public Collection getArtifacts() { return artifacts; } /** * Sets the artifacts that got installed. * * @param artifacts The installed artifacts, may be {@code null}. * @return This result for chaining, never {@code null}. */ public InstallResult 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 installed artifact to add, may be {@code null}. * @return This result for chaining, never {@code null}. */ public InstallResult addArtifact( Artifact artifact ) { if ( artifact != null ) { artifacts.add( artifact ); } return this; } /** * Gets the metadata that got installed. Note that due to automatically generated metadata, there might have been * more metadata installed than originally specified in the install request. * * @return The installed metadata, never {@code null}. */ public Collection getMetadata() { return metadata; } /** * Sets the metadata that got installed. * * @param metadata The installed metadata, may be {@code null}. * @return This result for chaining, never {@code null}. */ public InstallResult 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 installed metadata to add, may be {@code null}. * @return This result for chaining, never {@code null}. */ public InstallResult 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/installation/InstallationException.java000066400000000000000000000016341167050556700333250ustar00rootroot00000000000000package org.sonatype.aether.installation; /******************************************************************************* * 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 an installation error like an IO error. * * @author Benjamin Bentmann */ public class InstallationException extends RepositoryException { public InstallationException( String message ) { super( message ); } public InstallationException( String message, Throwable cause ) { super( message, cause ); } } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/metadata/000077500000000000000000000000001167050556700252155ustar00rootroot00000000000000aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/metadata/MergeableMetadata.java000066400000000000000000000027651167050556700314160ustar00rootroot00000000000000package org.sonatype.aether.metadata; /******************************************************************************* * 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 org.sonatype.aether.RepositoryException; /** * A piece of metadata that needs to be merged with any current metadata before installation/deployment. * * @author Benjamin Bentmann */ public interface MergeableMetadata extends Metadata { /** * Merges this metadata into the current metadata (if any). Note that this method will be invoked regardless whether * metadata currently exists or not. * * @param current The path to the current metadata file, may not exist but must not be {@code null}. * @param result The path to the result file where the merged metadata should be stored, must not be {@code null}. * @throws RepositoryException If the metadata could not be merged. */ void merge( File current, File result ) throws RepositoryException; /** * Indicates whether this metadata has been merged. * * @return {@code true} if the metadata has been merged, {@code false} otherwise. */ boolean isMerged(); } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/metadata/Metadata.java000066400000000000000000000057011167050556700276030ustar00rootroot00000000000000package org.sonatype.aether.metadata; /******************************************************************************* * 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; /** * A piece of repository metadata, e.g. an index of available versions. In contrast to an artifact, which usually exists * in only one repository, metadata usually exists in multiple repositories and each repository contains a different * copy of the metadata. Note: Metadata instances are supposed to be immutable, e.g. any exposed mutator method * returns a new metadata instance and leaves the original instance unchanged. Implementors are strongly advised to obey * this contract. * * @author Benjamin Bentmann */ public interface Metadata { /** * The nature of the metadata. */ enum Nature { /** * The metadata refers to release artifacts only. */ RELEASE, /** * The metadata refers to snapshot artifacts only. */ SNAPSHOT, /** * The metadata refers to either release or snapshot artifacts. */ RELEASE_OR_SNAPSHOT } /** * Gets the group identifier of this metadata. * * @return The group identifier or an empty string if the metadata applies to the entire repository, never {@code * null}. */ String getGroupId(); /** * Gets the artifact identifier of this metadata. * * @return The artifact identifier or an empty string if the metadata applies to the groupId level only, never * {@code null}. */ String getArtifactId(); /** * Gets the version of this metadata. * * @return The version or an empty string if the metadata applies to the groupId:artifactId level only, never * {@code null}. */ String getVersion(); /** * Gets the type of the metadata, e.g. "maven-metadata.xml". * * @return The type of the metadata, never {@code null}. */ String getType(); /** * Gets the nature of this metadata. The nature indicates to what artifact versions the metadata refers. * * @return The nature, never {@code null}. */ Nature getNature(); /** * Gets the file of this metadata. Note that only resolved metadata has a file associated with it. * * @return The file or {@code null} if none. */ File getFile(); /** * Sets the file of the metadata. * * @param file The file of the metadata, may be {@code null} * @return The new metadata, never {@code null}. */ Metadata setFile( File file ); } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/repository/000077500000000000000000000000001167050556700256545ustar00rootroot00000000000000aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/repository/ArtifactRepository.java000066400000000000000000000017111167050556700323540ustar00rootroot00000000000000package org.sonatype.aether.repository; /******************************************************************************* * 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 repository hosting artifacts. * * @author Benjamin Bentmann */ public interface ArtifactRepository { /** * Gets the type of the repository, for example "default". * * @return The (case-sensitive) type of the repository, never {@code null}. */ String getContentType(); /** * Gets the identifier of this repository. * * @return The (case-sensitive) identifier, never {@code null}. */ String getId(); } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/repository/Authentication.java000066400000000000000000000200471167050556700315010ustar00rootroot00000000000000package org.sonatype.aether.repository; /******************************************************************************* * 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.Arrays; /** * The authentication to use for accessing a protected resource. 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 Authentication { private final String username; private final char[] password; private final String privateKeyFile; private final char[] passphrase; private static char[] toChars( String str ) { return ( str != null ) ? str.toCharArray() : null; } private static String toStr( char[] chars ) { return ( chars != null ) ? new String( chars ) : null; } private static char[] clone( char[] chars ) { return ( chars != null ) ? chars.clone() : null; } private Authentication( String username, String privateKeyFile, char[] password, char[] passphrase ) { // NOTE: This constructor assumes ownership/immutability of the provided arrays this.username = username; this.password = password; this.privateKeyFile = privateKeyFile; this.passphrase = passphrase; } /** * Creates a new authentication with the specified properties * * @param username The username, may be {@code null}. * @param password The password, may be {@code null}. * @param privateKeyFile The path to the private key file, may be {@code null}. * @param passphrase The passphrase for the private key file, may be {@code null}. */ public Authentication( String username, char[] password, String privateKeyFile, char[] passphrase ) { this( username, privateKeyFile, clone( password ), clone( passphrase ) ); } /** * Creates a new authentication with the specified properties * * @param username The username, may be {@code null}. * @param password The password, may be {@code null}. * @param privateKeyFile The path to the private key file, may be {@code null}. * @param passphrase The passphrase for the private key file, may be {@code null}. */ public Authentication( String username, String password, String privateKeyFile, String passphrase ) { this( username, privateKeyFile, toChars( password ), toChars( passphrase ) ); } /** * Creates a basic username+password authentication. * * @param username The username, may be {@code null}. * @param password The password, may be {@code null}. */ public Authentication( String username, String password ) { this( username, (String) null, toChars( password ), null ); } /** * Creates a basic username+password authentication. * * @param username The username, may be {@code null}. * @param password The password, may be {@code null}. */ public Authentication( String username, char[] password ) { this( username, password, null, null ); } /** * Gets the username. * * @return The username or {@code null} if none. */ public String getUsername() { return username; } /** * Sets the username to use for authentication. * * @param username The username, may be {@code null}. * @return The new authentication, never {@code null}. */ public Authentication setUsername( String username ) { if ( eq( this.username, username ) ) { return this; } return new Authentication( username, privateKeyFile, password, passphrase ); } /** * Gets the password. * * @return The password or {@code null} if none. */ public String getPassword() { return toStr( password ); } /** * Sets the password to use for authentication. * * @param password The password, may be {@code null}. * @return The new authentication, never {@code null}. */ public Authentication setPassword( String password ) { return setPasswordInternal( toChars( password ) ); } /** * Sets the password to use for authentication. * * @param password The password, may be {@code null}. * @return The new authentication, never {@code null}. */ public Authentication setPassword( char[] password ) { return setPasswordInternal( clone( password ) ); } private Authentication setPasswordInternal( char[] password ) { if ( Arrays.equals( this.password, password ) ) { return this; } return new Authentication( username, privateKeyFile, password, passphrase ); } /** * Gets the path to the private key file to use for authentication. * * @return The path to the private key file or {@code null} if none. */ public String getPrivateKeyFile() { return privateKeyFile; } /** * Sets the path to the private key file to use for authentication. * * @param privateKeyFile The path to the private key file, may be {@code null}. * @return The new authentication, never {@code null}. */ public Authentication setPrivateKeyFile( String privateKeyFile ) { if ( eq( this.privateKeyFile, privateKeyFile ) ) { return this; } return new Authentication( username, privateKeyFile, password, passphrase ); } /** * Gets the passphrase for the private key. * * @return The passphrase for the private key or {@code null} if none. */ public String getPassphrase() { return toStr( passphrase ); } /** * Sets the passphrase for the private key file. * * @param passphrase The passphrase for the private key file, may be {@code null}. * @return The new authentication, never {@code null}. */ public Authentication setPassphrase( String passphrase ) { return setPassphraseInternal( toChars( passphrase ) ); } /** * Sets the passphrase for the private key file. * * @param passphrase The passphrase for the private key file, may be {@code null}. * @return The new authentication, never {@code null}. */ public Authentication setPassphrase( char[] passphrase ) { return setPassphraseInternal( clone( passphrase ) ); } private Authentication setPassphraseInternal( char[] passphrase ) { if ( Arrays.equals( this.passphrase, passphrase ) ) { return this; } return new Authentication( username, privateKeyFile, password, passphrase ); } @Override public String toString() { return getUsername(); } @Override public boolean equals( Object obj ) { if ( this == obj ) { return true; } if ( obj == null || !getClass().equals( obj.getClass() ) ) { return false; } Authentication that = (Authentication) obj; return eq( username, that.username ) && Arrays.equals( password, that.password ) && eq( privateKeyFile, that.privateKeyFile ) && Arrays.equals( passphrase, passphrase ); } private static boolean eq( T s1, T s2 ) { return s1 != null ? s1.equals( s2 ) : s2 == null; } @Override public int hashCode() { int hash = 17; hash = hash * 31 + hash( username ); hash = hash * 31 + Arrays.hashCode( password ); hash = hash * 31 + hash( privateKeyFile ); return hash; } private static int hash( Object obj ) { return obj != null ? obj.hashCode() : 0; } } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/repository/AuthenticationSelector.java000066400000000000000000000017111167050556700331770ustar00rootroot00000000000000package org.sonatype.aether.repository; /******************************************************************************* * 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 *******************************************************************************/ /** * Selects authentication for a given remote repository. * * @author Benjamin Bentmann */ public interface AuthenticationSelector { /** * Selects authentication for the specified remote repository. * * @param repository The repository for which to select authentication, must not be {@code null}. * @return The selected authentication or {@code null} if none. */ Authentication getAuthentication( RemoteRepository repository ); } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/repository/LocalArtifactRegistration.java000066400000000000000000000101751167050556700336260ustar00rootroot00000000000000package org.sonatype.aether.repository; /******************************************************************************* * 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 org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.artifact.Artifact; /** * A request to register an artifact within the local repository. Certain local repository implementations can refuse to * serve physically present artifacts if those haven't been previously registered to them. * * @author Benjamin Bentmann * @see LocalRepositoryManager#add(RepositorySystemSession, LocalArtifactRegistration) */ public class LocalArtifactRegistration { private Artifact artifact; private RemoteRepository repository; private Collection contexts = Collections.emptyList(); /** * Creates an uninitialized registration. */ public LocalArtifactRegistration() { // enables default constructor } /** * Creates a registration request for the specified (locally installed) artifact. * * @param artifact The artifact to register, may be {@code null}. */ public LocalArtifactRegistration( Artifact artifact ) { setArtifact( artifact ); } /** * Creates a registration request for the specified artifact. * * @param artifact The artifact to register, may be {@code null}. * @param repository The remote repository from which the artifact was resolved or {@code null} if the artifact was * locally installed. * @param contexts The resolution contexts, may be {@code null}. */ public LocalArtifactRegistration( Artifact artifact, RemoteRepository repository, Collection contexts ) { setArtifact( artifact ); setRepository( repository ); setContexts( contexts ); } /** * Gets the artifact to register. * * @return The artifact or {@code null} if not set. */ public Artifact getArtifact() { return artifact; } /** * Sets the artifact to register. * * @param artifact The artifact, may be {@code null}. * @return This request for chaining, never {@code null}. */ public LocalArtifactRegistration setArtifact( Artifact artifact ) { this.artifact = artifact; return this; } /** * Gets the remote repository from which the artifact was resolved. * * @return The remote repository or {@code null} if the artifact was locally installed. */ public RemoteRepository getRepository() { return repository; } /** * Sets the remote repository from which the artifact was resolved. * * @param repository The remote repository or {@code null} if the artifact was locally installed. * @return This request for chaining, never {@code null}. */ public LocalArtifactRegistration setRepository( RemoteRepository repository ) { this.repository = repository; return this; } /** * Gets the resolution contexts in which the artifact is available. * * @return The resolution contexts in which the artifact is available, never {@code null}. */ public Collection getContexts() { return contexts; } /** * Sets the resolution contexts in which the artifact is available. * * @param contexts The resolution contexts, may be {@code null}. * @return This request for chaining, never {@code null}. */ public LocalArtifactRegistration setContexts( Collection contexts ) { if ( contexts != null ) { this.contexts = contexts; } else { this.contexts = Collections.emptyList(); } return this; } } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/repository/LocalArtifactRequest.java000066400000000000000000000074101167050556700326020ustar00rootroot00000000000000package org.sonatype.aether.repository; /******************************************************************************* * 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.Collections; import java.util.List; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.artifact.Artifact; /** * A query to the local repository for the existence of an artifact. * * @author Benjamin Bentmann * @see LocalRepositoryManager#find(RepositorySystemSession, LocalArtifactRequest) */ public class LocalArtifactRequest { private Artifact artifact; private String context = ""; private List repositories = Collections.emptyList(); /** * Creates an uninitialized query. */ public LocalArtifactRequest() { // enables default constructor } /** * Creates a query with the specified properties. * * @param artifact The artifact to query for, may be {@code null}. * @param repositories The remote repositories that should be considered as potential sources for the artifact, may * be {@code null} or empty to only consider locally installed artifacts. * @param context The resolution context for the artifact, may be {@code null}. */ public LocalArtifactRequest( Artifact artifact, List repositories, String context ) { setArtifact( artifact ); setRepositories( repositories ); setContext( context ); } /** * Gets the artifact to query for. * * @return The artifact or {@code null} if not set. */ public Artifact getArtifact() { return artifact; } /** * Sets the artifact to query for. * * @param artifact The artifact, may be {@code null}. * @return This query for chaining, never {@code null}. */ public LocalArtifactRequest setArtifact( Artifact artifact ) { this.artifact = artifact; return this; } /** * Gets the resolution context. * * @return The resolution context, never {@code null}. */ public String getContext() { return context; } /** * Sets the resolution context. * * @param context The resolution context, may be {@code null}. * @return This query for chaining, never {@code null}. */ public LocalArtifactRequest setContext( String context ) { this.context = ( context != null ) ? context : ""; return this; } /** * Gets the remote repositories to consider as sources of the artifact. * * @return The remote repositories, never {@code null}. */ public List getRepositories() { return repositories; } /** * Sets the remote repositories to consider as sources of the artifact. * * @param repositories The remote repositories, may be {@code null} or empty to only consider locally installed * artifacts. * @return This query for chaining, never {@code null}. */ public LocalArtifactRequest setRepositories( List repositories ) { if ( repositories != null ) { this.repositories = repositories; } else { this.repositories = Collections.emptyList(); } return this; } @Override public String toString() { return getArtifact() + " @ " + getRepositories(); } } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/repository/LocalArtifactResult.java000066400000000000000000000106771167050556700324410ustar00rootroot00000000000000package org.sonatype.aether.repository; /******************************************************************************* * 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 org.sonatype.aether.RepositorySystemSession; /** * A result from the local repository about the existence of an artifact. * * @author Benjamin Bentmann * @see LocalRepositoryManager#find(RepositorySystemSession, LocalArtifactRequest) */ public class LocalArtifactResult { private final LocalArtifactRequest request; private File file; private boolean available; private RemoteRepository repository; /** * Creates a new result for the specified request. * * @param request The local artifact request, must not be {@code null}. */ public LocalArtifactResult( LocalArtifactRequest request ) { if ( request == null ) { throw new IllegalArgumentException( "local artifact request has not been specified" ); } this.request = request; } /** * Gets the request corresponding to this result. * * @return The corresponding request, never {@code null}. */ public LocalArtifactRequest getRequest() { return request; } /** * Gets the file to the requested artifact. Note that this file must not be used unless {@link #isAvailable()} * returns {@code true}. An artifact file can be found but considered unavailable if the artifact was cached from a * remote repository that is not part of the list of remote repositories used for the query. * * @return The file to the requested artifact or {@code null} if the artifact does not exist locally. */ public File getFile() { return file; } /** * Sets the file to requested artifact. * * @param file The artifact file, may be {@code null}. * @return This result for chaining, never {@code null}. */ public LocalArtifactResult setFile( File file ) { this.file = file; return this; } /** * Indicates whether the requested artifact is available for use. As a minimum, the file needs to be physically * existent in the local repository to be available. Additionally, a local repository manager can consider the list * of supplied remote repositories to determine whether the artifact is logically available and mark an artifact * unavailable (despite its physical existence) if it is not known to be hosted by any of the provided repositories. * * @return {@code true} if the artifact is available, {@code false} otherwise. * @see LocalArtifactRequest#getRepositories() */ public boolean isAvailable() { return available; } /** * Sets whether the artifact is available. * * @param available {@code true} if the artifact is available, {@code false} otherwise. * @return This result for chaining, never {@code null}. */ public LocalArtifactResult setAvailable( boolean available ) { this.available = available; return this; } /** * Gets the (first) remote repository from which the artifact was cached (if any). * * @return The remote repository from which the artifact was originally retrieved or {@code null} if unknown or if * the artifact has been locally installed. * @see LocalArtifactRequest#getRepositories() */ public RemoteRepository getRepository() { return repository; } /** * Sets the (first) remote repository from which the artifact was cached. * * @param repository The remote repository from which the artifact was originally retrieved, may be {@code null} if * unknown or if the artifact has been locally installed. * @return This result for chaining, never {@code null}. */ public LocalArtifactResult setRepository( RemoteRepository repository ) { this.repository = repository; return this; } @Override public String toString() { return getFile() + " (" + ( isAvailable() ? "available" : "unavailable" ) + ")"; } } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/repository/LocalMetadataRegistration.java000066400000000000000000000100071167050556700336030ustar00rootroot00000000000000package org.sonatype.aether.repository; /******************************************************************************* * 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 org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.metadata.Metadata; /** * A request to register metadata within the local repository. * * @see LocalRepositoryManager#add(RepositorySystemSession, LocalMetadataRegistration) */ public class LocalMetadataRegistration { private Metadata metadata; private RemoteRepository repository; private Collection contexts = Collections.emptyList(); /** * Creates an uninitialized registration. */ public LocalMetadataRegistration() { // enables default constructor } /** * Creates a registration request for the specified metadata accompanying a locally installed artifact. * * @param metadata The metadata to register, may be {@code null}. */ public LocalMetadataRegistration( Metadata metadata ) { setMetadata( metadata ); } /** * Creates a registration request for the specified metadata. * * @param metadata The metadata to register, may be {@code null}. * @param repository The remote repository from which the metadata was resolved or {@code null} if the metadata * accompanies a locally installed artifact. * @param contexts The resolution contexts, may be {@code null}. */ public LocalMetadataRegistration( Metadata metadata, RemoteRepository repository, Collection contexts ) { setMetadata( metadata ); setRepository( repository ); setContexts( contexts ); } /** * Gets the metadata to register. * * @return The metadata or {@code null} if not set. */ public Metadata getMetadata() { return metadata; } /** * Sets the metadata to register. * * @param metadata The metadata, may be {@code null}. * @return This request for chaining, never {@code null}. */ public LocalMetadataRegistration setMetadata( Metadata metadata ) { this.metadata = metadata; return this; } /** * Gets the remote repository from which the metadata was resolved. * * @return The remote repository or {@code null} if the metadata was locally installed. */ public RemoteRepository getRepository() { return repository; } /** * Sets the remote repository from which the metadata was resolved. * * @param repository The remote repository or {@code null} if the metadata accompanies a locally installed artifact. * @return This request for chaining, never {@code null}. */ public LocalMetadataRegistration setRepository( RemoteRepository repository ) { this.repository = repository; return this; } /** * Gets the resolution contexts in which the metadata is available. * * @return The resolution contexts in which the metadata is available, never {@code null}. */ public Collection getContexts() { return contexts; } /** * Sets the resolution contexts in which the metadata is available. * * @param contexts The resolution contexts, may be {@code null}. * @return This request for chaining, never {@code null}. */ public LocalMetadataRegistration setContexts( Collection contexts ) { if ( contexts != null ) { this.contexts = contexts; } else { this.contexts = Collections.emptyList(); } return this; } } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/repository/LocalMetadataRequest.java000066400000000000000000000065071167050556700325730ustar00rootroot00000000000000package org.sonatype.aether.repository; /******************************************************************************* * 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; import org.sonatype.aether.metadata.Metadata; /** * A query to the local repository for the existence of metadata. * * @see LocalRepositoryManager#find(RepositorySystemSession, LocalMetadataRequest) */ public class LocalMetadataRequest { private Metadata metadata; private String context = ""; private RemoteRepository repository = null; /** * Creates an uninitialized query. */ public LocalMetadataRequest() { // enables default constructor } /** * Creates a query with the specified properties. * * @param metadata The metadata to query for, may be {@code null}. * @param repository The source remote repository for the metadata, may be {@code null} for local metadata. * @param context The resolution context for the metadata, may be {@code null}. */ public LocalMetadataRequest( Metadata metadata, RemoteRepository repository, String context ) { setMetadata( metadata ); setRepository( repository ); setContext( context ); } /** * Gets the metadata to query for. * * @return The metadata or {@code null} if not set. */ public Metadata getMetadata() { return metadata; } /** * Sets the metadata to query for. * * @param metadata The metadata, may be {@code null}. * @return This query for chaining, never {@code null}. */ public LocalMetadataRequest setMetadata( Metadata metadata ) { this.metadata = metadata; return this; } /** * Gets the resolution context. * * @return The resolution context, never {@code null}. */ public String getContext() { return context; } /** * Sets the resolution context. * * @param context The resolution context, may be {@code null}. * @return This query for chaining, never {@code null}. */ public LocalMetadataRequest setContext( String context ) { this.context = ( context != null ) ? context : ""; return this; } /** * Gets the remote repository to use as source of the metadata. * * @return The remote repositories, may be {@code null} for local metadata. */ public RemoteRepository getRepository() { return repository; } /** * Sets the remote repository to use as sources of the metadata. * * @param repository The remote repository, may be {@code null}. * @return This query for chaining, may be {@code null} for local metadata. */ public LocalMetadataRequest setRepository( RemoteRepository repository ) { this.repository = repository; return this; } @Override public String toString() { return getMetadata() + " @ " + getRepository(); } } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/repository/LocalMetadataResult.java000066400000000000000000000053601167050556700324150ustar00rootroot00000000000000package org.sonatype.aether.repository; /******************************************************************************* * 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 org.sonatype.aether.RepositorySystemSession; /** * A result from the local repository about the existence of metadata. * * @see LocalRepositoryManager#find(RepositorySystemSession, LocalMetadataRequest) */ public class LocalMetadataResult { private final LocalMetadataRequest request; private File file; private boolean stale; /** * Creates a new result for the specified request. * * @param request The local metadata request, must not be {@code null}. */ public LocalMetadataResult( LocalMetadataRequest request ) { if ( request == null ) { throw new IllegalArgumentException( "local metadata request has not been specified" ); } this.request = request; } /** * Gets the request corresponding to this result. * * @return The corresponding request, never {@code null}. */ public LocalMetadataRequest getRequest() { return request; } /** * Gets the file to the requested metadata if the metadata is available in the local repository. * * @return The file to the requested metadata or {@code null}. */ public File getFile() { return file; } /** * Sets the file to requested metadata. * * @param file The metadata file, may be {@code null}. * @return This result for chaining, never {@code null}. */ public LocalMetadataResult setFile( File file ) { this.file = file; return this; } /** * This value indicates whether the metadata is stale and should be updated. * * @return {@code true} if the metadata is stale and should be updated, {@code false} otherwise. */ public boolean isStale() { return stale; } /** * Sets whether the metadata is stale. * * @param stale {@code true} if the metadata is stale and should be updated, {@code false} otherwise. * @return This result for chaining, never {@code null}. */ public LocalMetadataResult setStale( boolean stale ) { this.stale = stale; return this; } @Override public String toString() { return request.toString() + "(" + getFile() + ")"; } } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/repository/LocalRepository.java000066400000000000000000000057571167050556700316670ustar00rootroot00000000000000package org.sonatype.aether.repository; /******************************************************************************* * 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; /** * A repository on the local file system used to cache contents of remote repositories and to store locally installed * artifacts. * * @author Benjamin Bentmann */ public final class LocalRepository implements ArtifactRepository { private final File basedir; private final String type; /** * Creates a new local repository with the specified base directory and unknown type. * * @param basedir The base directory of the repository, may be {@code null}. */ public LocalRepository( String basedir ) { this( ( basedir != null ) ? new File( basedir ) : null, "" ); } /** * Creates a new local repository with the specified base directory and unknown type. * * @param basedir The base directory of the repository, may be {@code null}. */ public LocalRepository( File basedir ) { this( basedir, "" ); } /** * Creates a new local repository with the specified properties. * * @param basedir The base directory of the repository, may be {@code null}. * @param type The type of the repository, may be {@code null}. */ public LocalRepository( File basedir, String type ) { this.basedir = basedir; this.type = ( type != null ) ? type : ""; } public String getContentType() { return type; } public String getId() { return "local"; } /** * Gets the base directory of the repository. * * @return The base directory or {@code null} if none. */ public File getBasedir() { return basedir; } @Override public String toString() { return getBasedir() + " (" + getContentType() + ")"; } @Override public boolean equals( Object obj ) { if ( this == obj ) { return true; } if ( obj == null || !getClass().equals( obj.getClass() ) ) { return false; } LocalRepository that = (LocalRepository) obj; return eq( basedir, that.basedir ) && eq( type, that.type ); } private static boolean eq( T s1, T s2 ) { return s1 != null ? s1.equals( s2 ) : s2 == null; } @Override public int hashCode() { int hash = 17; hash = hash * 31 + hash( basedir ); hash = hash * 31 + hash( type ); return hash; } private static int hash( Object obj ) { return obj != null ? obj.hashCode() : 0; } } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/repository/LocalRepositoryManager.java000066400000000000000000000137571167050556700331610ustar00rootroot00000000000000package org.sonatype.aether.repository; /******************************************************************************* * 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; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.metadata.Metadata; /** * Manages access to the local repository. * * @author Benjamin Bentmann */ public interface LocalRepositoryManager { /** * Gets the description of the local repository being managed. * * @return The description of the local repository, never {@code null}. */ LocalRepository getRepository(); /** * Gets the relative path for a locally installed artifact. Note that the artifact need not actually exist yet at * the returned location, the path merely indicates where the artifact would eventually be stored. The path uses the * forward slash as directory separator regardless of the underlying file system. * * @param artifact The artifact for which to determine the path, must not be {@code null}. * @return The path, relative to the local repository's base directory. */ String getPathForLocalArtifact( Artifact artifact ); /** * Gets the relative path for an artifact cached from a remote repository. Note that the artifact need not actually * exist yet at the returned location, the path merely indicates where the artifact would eventually be stored. The * path uses the forward slash as directory separator regardless of the underlying file system. * * @param artifact The artifact for which to determine the path, must not be {@code null}. * @param repository The source repository of the artifact, must not be {@code null}. * @param context The resolution context in which the artifact is being requested, may be {@code null}. * @return The path, relative to the local repository's base directory. */ String getPathForRemoteArtifact( Artifact artifact, RemoteRepository repository, String context ); /** * Gets the relative path for locally installed metadata. Note that the metadata need not actually exist yet at the * returned location, the path merely indicates where the metadata would eventually be stored. The path uses the * forward slash as directory separator regardless of the underlying file system. * * @param metadata The metadata for which to determine the path, must not be {@code null}. * @return The path, relative to the local repository's base directory. */ String getPathForLocalMetadata( Metadata metadata ); /** * Gets the relative path for metadata cached from a remote repository. Note that the metadata need not actually * exist yet at the returned location, the path merely indicates where the metadata would eventually be stored. The * path uses the forward slash as directory separator regardless of the underlying file system. * * @param metadata The metadata for which to determine the path, must not be {@code null}. * @param repository The source repository of the metadata, must not be {@code null}. * @param context The resolution context in which the metadata is being requested, may be {@code null}. * @return The path, relative to the local repository's base directory. */ String getPathForRemoteMetadata( Metadata metadata, RemoteRepository repository, String context ); /** * Queries for the existence of an artifact in the local repository. The request could be satisfied by a locally * installed artifact or a previously downloaded artifact. * * @param session The repository system session during which the request is made, must not be {@code null}. * @param request The artifact request, must not be {@code null}. * @return The result of the request, never {@code null}. */ LocalArtifactResult find( RepositorySystemSession session, LocalArtifactRequest request ); /** * Registers an installed or resolved artifact with the local repository. Note that artifact registration is merely * concerned about updating the local repository's internal state, not about actually installing the artifact or its * accompanying metadata. * * @param session The repository system session during which the registration is made, must not be {@code null}. * @param request The registration request, must not be {@code null}. */ void add( RepositorySystemSession session, LocalArtifactRegistration request ); /** * Queries for the existence of metadata in the local repository. The request could be satisfied by locally * installed or previously downloaded metadata. * * @param session The repository system session during which the request is made, must not be {@code null}. * @param request The metadata request, must not be {@code null}. * @return The result of the request, never {@code null}. */ LocalMetadataResult find( RepositorySystemSession session, LocalMetadataRequest request ); /** * Registers installed or resolved metadata with the local repository. Note that metadata registration is merely * concerned about updating the local repository's internal state, not about actually installing the metadata. * However, this method MUST be called after the actual install to give the repository manager the opportunity to * inspect the added metadata. * * @param session The repository system session during which the registration is made, must not be {@code null}. * @param request The registration request, must not be {@code null}. */ void add( RepositorySystemSession session, LocalMetadataRegistration request ); } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/repository/MirrorSelector.java000066400000000000000000000017131167050556700314740ustar00rootroot00000000000000package org.sonatype.aether.repository; /******************************************************************************* * 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 *******************************************************************************/ /** * Selects a mirror for a given remote repository. * * @author Benjamin Bentmann */ public interface MirrorSelector { /** * Selects a mirror for the specified repository. * * @param repository The repository to select a mirror for, must not be {@code null}. * @return The selected mirror or {@code null} if none. * @see RemoteRepository#getMirroredRepositories() */ RemoteRepository getMirror( RemoteRepository repository ); } NoLocalRepositoryManagerException.java000066400000000000000000000035501167050556700352440ustar00rootroot00000000000000aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/repositorypackage org.sonatype.aether.repository; /******************************************************************************* * 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 an unsupported local repository type. */ public class NoLocalRepositoryManagerException extends RepositoryException { private final LocalRepository repository; public NoLocalRepositoryManagerException( LocalRepository repository ) { this( repository, toMessage( repository ) ); } public NoLocalRepositoryManagerException( LocalRepository repository, String message ) { super( message ); this.repository = repository; } public NoLocalRepositoryManagerException( LocalRepository repository, Throwable cause ) { this( repository, toMessage( repository ), cause ); } public NoLocalRepositoryManagerException( LocalRepository repository, String message, Throwable cause ) { super( message, cause ); this.repository = repository; } private static String toMessage( LocalRepository repository ) { if ( repository != null ) { return "No manager available for local repository (" + repository.getBasedir().getAbsolutePath() + ") of type " + repository.getContentType(); } else { return "No connector available to access repository"; } } public LocalRepository getRepository() { return repository; } } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/repository/Proxy.java000066400000000000000000000117031167050556700276420ustar00rootroot00000000000000package org.sonatype.aether.repository; /******************************************************************************* * 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 proxy to use for connections to a repository. 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 Proxy { /** * Type denoting a proxy for HTTP transfers. */ public static final String TYPE_HTTP = "http"; /** * Type denoting a proxy for HTTPS transfers. */ public static final String TYPE_HTTPS = "https"; private final String type; private final String host; private final int port; private final Authentication auth; /** * Creates a new proxy with the specified properties. * * @param type The type of the proxy, e.g. "http", may be {@code null}. * @param host The host of the proxy, may be {@code null}. * @param port The port of the proxy. * @param auth The authentication to use for the proxy connection, may be {@code null}. */ public Proxy( String type, String host, int port, Authentication auth ) { this.type = ( type != null ) ? type : ""; this.host = ( host != null ) ? host : ""; this.port = port; this.auth = auth; } /** * Gets the type of this proxy. * * @return The type of this proxy, never {@code null}. */ public String getType() { return type; } /** * Sets the type of the proxy. * * @param type The type of the proxy, e.g. "http", may be {@code null}. * @return The new proxy, never {@code null}. */ public Proxy setType( String type ) { if ( this.type.equals( type ) || ( type == null && this.type.length() <= 0 ) ) { return this; } return new Proxy( type, host, port, auth ); } /** * Gets the host for this proxy. * * @return The host for this proxy, never {@code null}. */ public String getHost() { return host; } /** * Sets the host of the proxy. * * @param host The host of the proxy, may be {@code null}. * @return The new proxy, never {@code null}. */ public Proxy setHost( String host ) { if ( this.host.equals( host ) || ( host == null && this.host.length() <= 0 ) ) { return this; } return new Proxy( type, host, port, auth ); } /** * Gets the port number for this proxy. * * @return The port number for this proxy. */ public int getPort() { return port; } /** * Sets the port number for the proxy. * * @param port The port number for the proxy. * @return The new proxy, never {@code null}. */ public Proxy setPort( int port ) { if ( this.port == port ) { return this; } return new Proxy( type, host, port, auth ); } /** * Gets the authentication to use for the proxy connection. * * @return The authentication to use or {@code null} if none. */ public Authentication getAuthentication() { return auth; } /** * Sets the authentication to use for the proxy connection. * * @param auth The authentication to use, may be {@code null}. * @return The new proxy, never {@code null}. */ public Proxy setAuthentication( Authentication auth ) { if ( eq( this.auth, auth ) ) { return this; } return new Proxy( type, host, port, auth ); } @Override public String toString() { return getHost() + ':' + getPort(); } @Override public boolean equals( Object obj ) { if ( this == obj ) { return true; } if ( obj == null || !getClass().equals( obj.getClass() ) ) { return false; } Proxy that = (Proxy) obj; return eq( type, that.type ) && eq( host, that.host ) && port == that.port && eq( auth, that.auth ); } private static boolean eq( T s1, T s2 ) { return s1 != null ? s1.equals( s2 ) : s2 == null; } @Override public int hashCode() { int hash = 17; hash = hash * 31 + hash( host ); hash = hash * 31 + hash( type ); hash = hash * 31 + port; hash = hash * 31 + hash( auth ); return hash; } private static int hash( Object obj ) { return obj != null ? obj.hashCode() : 0; } } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/repository/ProxySelector.java000066400000000000000000000016201167050556700313400ustar00rootroot00000000000000package org.sonatype.aether.repository; /******************************************************************************* * 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 *******************************************************************************/ /** * Selects a proxy for a given remote repository. * * @author Benjamin Bentmann */ public interface ProxySelector { /** * Selects a proxy for the specified remote repository. * * @param repository The repository for which to select a proxy, must not be {@code null}. * @return The selected proxy or {@code null} if none. */ Proxy getProxy( RemoteRepository repository ); } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/repository/RemoteRepository.java000066400000000000000000000260741167050556700320630ustar00rootroot00000000000000package org.sonatype.aether.repository; /******************************************************************************* * 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.Collections; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * A repository on a remote server. * * @author Benjamin Bentmann */ public class RemoteRepository implements ArtifactRepository { private static final Pattern URL_PATTERN = Pattern.compile( "([^:/]+(:[^:/]{2,}+(?=://))?):(//([^@/]*@)?([^/:]+))?.*" ); private String id = ""; private String type = ""; private String url = ""; private RepositoryPolicy releasePolicy; private RepositoryPolicy snapshotPolicy; private Proxy proxy; private Authentication authentication; private List mirroredRepositories = Collections.emptyList(); private boolean repositoryManager; /** * Creates a new repository using the default release/snapshot policies. */ public RemoteRepository() { setPolicy( true, null ); setPolicy( false, null ); } /** * Creates a shallow copy of the specified repository. * * @param repository The repository to copy, must not be {@code null}. */ public RemoteRepository( RemoteRepository repository ) { setId( repository.getId() ); setContentType( repository.getContentType() ); setUrl( repository.getUrl() ); setPolicy( true, repository.getPolicy( true ) ); setPolicy( false, repository.getPolicy( false ) ); setAuthentication( repository.getAuthentication() ); setProxy( repository.getProxy() ); setMirroredRepositories( repository.getMirroredRepositories() ); setRepositoryManager( repository.isRepositoryManager() ); } /** * Creates a new repository with the specified properties and the default policies. * * @param id The identifier of the repository, may be {@code null}. * @param type The type of the repository, may be {@code null}. * @param url The (base) URL of the repository, may be {@code null}. */ public RemoteRepository( String id, String type, String url ) { setId( id ); setContentType( type ); setUrl( url ); setPolicy( true, null ); setPolicy( false, null ); } public String getId() { return id; } /** * Sets the identifier of this repository. * * @param id The identifier of this repository, may be {@code null}. * @return This repository for chaining, never {@code null}. */ public RemoteRepository setId( String id ) { this.id = ( id != null ) ? id : ""; return this; } public String getContentType() { return type; } /** * Sets the type of this repository, e.g. "default". * * @param type The type of this repository, may be {@code null}. * @return This repository for chaining, never {@code null}. */ public RemoteRepository setContentType( String type ) { this.type = ( type != null ) ? type : ""; return this; } /** * Gets the (base) URL of this repository. * * @return The (base) URL of this repository, never {@code null}. */ public String getUrl() { return url; } /** * Sets the (base) URL of this repository. * * @param url The URL of this repository, may be {@code null}. * @return This repository for chaining, never {@code null}. */ public RemoteRepository setUrl( String url ) { this.url = ( url != null ) ? url : ""; return this; } /** * Gets the protocol part from the repository's URL, for example {@code file} or {@code http}. As suggested by RFC * 2396, section 3.1 "Scheme Component", the protocol name should be treated case-insensitively. * * @return The protocol or an empty string if none, never {@code null}. */ public String getProtocol() { Matcher m = URL_PATTERN.matcher( this.url ); if ( m.matches() ) { return m.group( 1 ); } return ""; } /** * Gets the host part from the repository's URL. * * @return The host or an empty string if none, never {@code null}. */ public String getHost() { Matcher m = URL_PATTERN.matcher( this.url ); if ( m.matches() ) { String host = m.group( 5 ); if ( host != null ) { return host; } } return ""; } /** * Gets the policy to apply for snapshot/release artifacts. * * @param snapshot {@code true} to retrieve the snapshot policy, {@code false} to retrieve the release policy. * @return The requested repository policy, never {@code null}. */ public RepositoryPolicy getPolicy( boolean snapshot ) { return snapshot ? snapshotPolicy : releasePolicy; } /** * Sets the policy to apply for snapshot/release artifacts. * * @param snapshot {@code true} to set the snapshot policy, {@code false} to set the release policy. * @param policy The repository policy to set, may be {@code null} to use a default policy. * @return This repository for chaining, never {@code null}. */ public RemoteRepository setPolicy( boolean snapshot, RepositoryPolicy policy ) { if ( policy == null ) { policy = new RepositoryPolicy(); } if ( snapshot ) { snapshotPolicy = policy; } else { releasePolicy = policy; } return this; } /** * Gets the proxy that has been selected for this repository. * * @return The selected proxy or {@code null} if none. */ public Proxy getProxy() { return proxy; } /** * Sets the proxy to use in order to access this repository. * * @param proxy The proxy to use, may be {@code null}. * @return This repository for chaining, never {@code null}. */ public RemoteRepository setProxy( Proxy proxy ) { this.proxy = proxy; return this; } /** * Gets the authentication that has been selected for this repository. * * @return The selected authentication or {@code null} if none. */ public Authentication getAuthentication() { return authentication; } /** * Sets the authentication to use in order to access this repository. * * @param authentication The authentication to use, may be {@code null}. * @return This repository for chaining, never {@code null}. */ public RemoteRepository setAuthentication( Authentication authentication ) { this.authentication = authentication; return this; } /** * Gets the repositories that this repository serves as a mirror for. * * @return The repositories being mirrored by this repository, never {@code null}. */ public List getMirroredRepositories() { return mirroredRepositories; } /** * Sets the repositories being mirrored by this repository. * * @param mirroredRepositories The repositories being mirrored by this repository, may be {@code null}. * @return This repository for chaining, never {@code null}. */ public RemoteRepository setMirroredRepositories( List mirroredRepositories ) { if ( mirroredRepositories == null || mirroredRepositories.isEmpty() ) { this.mirroredRepositories = Collections.emptyList(); } else { this.mirroredRepositories = mirroredRepositories; } return this; } /** * Indicates whether this repository refers to a repository manager or not. * * @return {@code true} if this repository is a repository manager, {@code false} otherwise. */ public boolean isRepositoryManager() { return repositoryManager; } /** * Marks this repository as a repository manager or not. * * @param repositoryManager {@code true} if this repository points at a repository manager, {@code false} if the * repository is just serving static contents. * @return This repository for chaining, never {@code null}. */ public RemoteRepository setRepositoryManager( boolean repositoryManager ) { this.repositoryManager = repositoryManager; return this; } @Override public String toString() { StringBuilder buffer = new StringBuilder( 256 ); buffer.append( getId() ); buffer.append( " (" ).append( getUrl() ); boolean r = getPolicy( false ).isEnabled(), s = getPolicy( true ).isEnabled(); if ( r && s ) { buffer.append( ", releases+snapshots" ); } else if ( r ) { buffer.append( ", releases" ); } else if ( s ) { buffer.append( ", snapshots" ); } else { buffer.append( ", disabled" ); } if ( isRepositoryManager() ) { buffer.append( ", managed" ); } buffer.append( ")" ); return buffer.toString(); } @Override public boolean equals( Object obj ) { if ( this == obj ) { return true; } if ( obj == null || !getClass().equals( obj.getClass() ) ) { return false; } RemoteRepository that = (RemoteRepository) obj; return eq( url, that.url ) && eq( type, that.type ) && eq( id, that.id ) && eq( releasePolicy, that.releasePolicy ) && eq( snapshotPolicy, that.snapshotPolicy ) && eq( proxy, that.proxy ) && eq( authentication, that.authentication ) && eq( mirroredRepositories, that.mirroredRepositories ) && repositoryManager == that.repositoryManager; } private static boolean eq( T s1, T s2 ) { return s1 != null ? s1.equals( s2 ) : s2 == null; } @Override public int hashCode() { int hash = 17; hash = hash * 31 + hash( url ); hash = hash * 31 + hash( type ); hash = hash * 31 + hash( id ); hash = hash * 31 + hash( releasePolicy ); hash = hash * 31 + hash( snapshotPolicy ); hash = hash * 31 + hash( proxy ); hash = hash * 31 + hash( authentication ); hash = hash * 31 + hash( mirroredRepositories ); hash = hash * 31 + ( repositoryManager ? 1 : 0 ); return hash; } private static int hash( Object obj ) { return obj != null ? obj.hashCode() : 0; } } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/repository/RepositoryPolicy.java000066400000000000000000000140771167050556700320670ustar00rootroot00000000000000package org.sonatype.aether.repository; /******************************************************************************* * 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 policy controlling access to a repository. 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 RepositoryPolicy { /** * Never update locally cached data. */ public static final String UPDATE_POLICY_NEVER = "never"; /** * Always update locally cached data. */ public static final String UPDATE_POLICY_ALWAYS = "always"; /** * Update locally cached data once a day. */ public static final String UPDATE_POLICY_DAILY = "daily"; /** * Update locally cached data every X minutes as given by "interval:X". */ public static final String UPDATE_POLICY_INTERVAL = "interval"; /** * Verify checksums and fail the resolution if they do not match. */ public static final String CHECKSUM_POLICY_FAIL = "fail"; /** * Verify checksums and warn if they do not match. */ public static final String CHECKSUM_POLICY_WARN = "warn"; /** * Do not verify checksums. */ public static final String CHECKSUM_POLICY_IGNORE = "ignore"; private final boolean enabled; private final String updatePolicy; private final String checksumPolicy; /** * Creates a new policy with checksum warnings and daily update checks. */ public RepositoryPolicy() { this( true, UPDATE_POLICY_DAILY, CHECKSUM_POLICY_WARN ); } /** * Creates a new policy with the specified settings. * * @param enabled A flag whether the associated repository should be accessed or not. * @param updatePolicy The update interval after which locally cached data from the repository is considered stale * and should be refetched, may be {@code null}. * @param checksumPolicy The way checksum verification should be handled, may be {@code null}. */ public RepositoryPolicy( boolean enabled, String updatePolicy, String checksumPolicy ) { this.enabled = enabled; this.updatePolicy = ( updatePolicy != null ) ? updatePolicy : ""; this.checksumPolicy = ( checksumPolicy != null ) ? checksumPolicy : ""; } /** * Indicates whether the associated repository should be contacted or not. * * @return {@code true} if the repository should be contacted, {@code false} otherwise. */ public boolean isEnabled() { return enabled; } /** * Sets the enabled flag for the associated repository. * * @param enabled {@code true} if the repository should be contacted, {@code false} otherwise. * @return The new policy, never {@code null}. */ public RepositoryPolicy setEnabled( boolean enabled ) { if ( this.enabled == enabled ) { return this; } return new RepositoryPolicy( enabled, updatePolicy, checksumPolicy ); } /** * Gets the update policy for locally cached data from the repository. * * @return The update policy, never {@code null}. */ public String getUpdatePolicy() { return updatePolicy; } /** * Sets the update policy for locally cached data from the repository. Well-known policies are * {@link #UPDATE_POLICY_NEVER}, {@link #UPDATE_POLICY_ALWAYS}, {@link #UPDATE_POLICY_DAILY} and * {@link #UPDATE_POLICY_INTERVAL} * * @param updatePolicy The update policy, may be {@code null}. * @return The new policy, never {@code null}. */ public RepositoryPolicy setUpdatePolicy( String updatePolicy ) { if ( this.updatePolicy.equals( updatePolicy ) ) { return this; } return new RepositoryPolicy( enabled, updatePolicy, checksumPolicy ); } /** * Gets the policy for checksum validation. * * @return The checksum policy, never {@code null}. */ public String getChecksumPolicy() { return checksumPolicy; } /** * Sets the policy for checksum validation. Well-known policies are {@link #CHECKSUM_POLICY_FAIL}, * {@link #CHECKSUM_POLICY_WARN} and {@link #CHECKSUM_POLICY_IGNORE}. * * @param checksumPolicy The checksum policy, may be {@code null}. * @return The new policy, never {@code null}. */ public RepositoryPolicy setChecksumPolicy( String checksumPolicy ) { if ( this.checksumPolicy.equals( checksumPolicy ) ) { return this; } return new RepositoryPolicy( enabled, updatePolicy, checksumPolicy ); } @Override public String toString() { StringBuilder buffer = new StringBuilder( 256 ); buffer.append( "enabled=" ).append( isEnabled() ); buffer.append( ", checksums=" ).append( getChecksumPolicy() ); buffer.append( ", updates=" ).append( getUpdatePolicy() ); return buffer.toString(); } @Override public boolean equals( Object obj ) { if ( this == obj ) { return true; } if ( obj == null || !getClass().equals( obj.getClass() ) ) { return false; } RepositoryPolicy that = (RepositoryPolicy) obj; return enabled == that.enabled && updatePolicy.equals( that.updatePolicy ) && checksumPolicy.equals( that.checksumPolicy ); } @Override public int hashCode() { int hash = 17; hash = hash * 31 + ( enabled ? 1 : 0 ); hash = hash * 31 + updatePolicy.hashCode(); hash = hash * 31 + checksumPolicy.hashCode(); return hash; } } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/repository/WorkspaceReader.java000066400000000000000000000027521167050556700316060ustar00rootroot00000000000000package org.sonatype.aether.repository; /******************************************************************************* * 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; /** * Manages a repository backed by the IDE workspace or a build session. * * @author Benjamin Bentmann */ public interface WorkspaceReader { /** * Gets a description of the workspace repository. * * @return The repository description, never {@code null}. */ WorkspaceRepository getRepository(); /** * Locates the specified artifact. * * @param artifact The artifact to locate, must not be {@code null}. * @return The path to the artifact or {@code null} if the artifact is not available. */ File findArtifact( Artifact artifact ); /** * Determines all available versions of the specified artifact. * * @param artifact The artifact whose versions should be listed, must not be {@code null}. * @return The available versions of the artifact, must not be {@code null}. */ List findVersions( Artifact artifact ); } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/repository/WorkspaceRepository.java000066400000000000000000000045221167050556700325600ustar00rootroot00000000000000package org.sonatype.aether.repository; /******************************************************************************* * 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.UUID; /** * A repository backed by an IDE workspace or the output of a build session. * * @author Benjamin Bentmann */ public final class WorkspaceRepository implements ArtifactRepository { private final String type; private final Object key; public WorkspaceRepository() { this( "workspace" ); } public WorkspaceRepository( String type ) { this( type, null ); } public WorkspaceRepository( String type, Object key ) { this.type = ( type != null ) ? type : ""; this.key = ( key != null ) ? key : UUID.randomUUID().toString().replace( "-", "" ); } public String getContentType() { return type; } public String getId() { return "workspace"; } /** * Gets the key of this workspace repository. The key is used to distinguish one workspace from another and should * be sensitive to the artifacts that are (potentially) available in the workspace. * * @return The (comparison) key for this workspace repository, never {@code null}. */ public Object getKey() { return key; } @Override public String toString() { return "(" + getContentType() + ")"; } @Override public boolean equals( Object obj ) { if ( this == obj ) { return true; } if ( obj == null || !getClass().equals( obj.getClass() ) ) { return false; } WorkspaceRepository that = (WorkspaceRepository) obj; return getContentType().equals( that.getContentType() ) && getKey().equals( that.getKey() ); } @Override public int hashCode() { int hash = 17; hash = hash * 31 + getKey().hashCode(); hash = hash * 31 + getContentType().hashCode(); return hash; } } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/resolution/000077500000000000000000000000001167050556700256405ustar00rootroot00000000000000ArtifactDescriptorException.java000066400000000000000000000031061167050556700340770ustar00rootroot00000000000000aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/resolutionpackage org.sonatype.aether.resolution; /******************************************************************************* * 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 an unreadable or unresolvable artifact descriptor. * * @author Benjamin Bentmann */ public class ArtifactDescriptorException extends RepositoryException { private final ArtifactDescriptorResult result; public ArtifactDescriptorException( ArtifactDescriptorResult result, String message ) { super( message, getCause( result ) ); this.result = result; } public ArtifactDescriptorException( ArtifactDescriptorResult result ) { super( "Failed to read artifact descriptor" + ( result != null ? " for " + result.getRequest().getArtifact() : "" ), getCause( result ) ); this.result = result; } public ArtifactDescriptorResult getResult() { return result; } private static Throwable getCause( ArtifactDescriptorResult result ) { Throwable cause = null; if ( result != null && !result.getExceptions().isEmpty() ) { cause = result.getExceptions().get( 0 ); } return cause; } } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/resolution/ArtifactDescriptorRequest.java000066400000000000000000000123411167050556700336510ustar00rootroot00000000000000package org.sonatype.aether.resolution; /******************************************************************************* * 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.artifact.Artifact; import org.sonatype.aether.repository.RemoteRepository; /** * A request to read an artifact descriptor. * * @author Benjamin Bentmann * @see RepositorySystem#readArtifactDescriptor(RepositorySystemSession, ArtifactDescriptorRequest) */ public class ArtifactDescriptorRequest { private Artifact artifact; private List repositories = Collections.emptyList(); private String context = ""; private RequestTrace trace; /** * Creates an uninitialized request. */ public ArtifactDescriptorRequest() { // enables default constructor } /** * Creates a request with the specified properties. * * @param artifact The artifact whose descriptor should be read, may be {@code null}. * @param repositories The repositories to resolve the descriptor from, may be {@code null}. * @param context The context in which this request is made, may be {@code null}. */ public ArtifactDescriptorRequest( Artifact artifact, List repositories, String context ) { setArtifact( artifact ); setRepositories( repositories ); setRequestContext( context ); } /** * Gets the artifact whose descriptor shall be read. * * @return The artifact or {@code null} if not set. */ public Artifact getArtifact() { return artifact; } /** * Sets the artifact whose descriptor shall be read. Eventually, a valid request must have an artifact set. * * @param artifact The artifact, may be {@code null}. * @return This request for chaining, never {@code null}. */ public ArtifactDescriptorRequest setArtifact( Artifact artifact ) { this.artifact = artifact; return this; } /** * Gets the repositories to resolve the descriptor from. * * @return The repositories, never {@code null}. */ public List getRepositories() { return repositories; } /** * Sets the repositories to resolve the descriptor from. * * @param repositories The repositories, may be {@code null}. * @return This request for chaining, never {@code null}. */ public ArtifactDescriptorRequest setRepositories( List repositories ) { if ( repositories == null ) { this.repositories = Collections.emptyList(); } else { this.repositories = repositories; } return this; } /** * Adds the specified repository for the resolution of the artifact descriptor. * * @param repository The repository to add, may be {@code null}. * @return This request for chaining, never {@code null}. */ public ArtifactDescriptorRequest 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 ArtifactDescriptorRequest 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 ArtifactDescriptorRequest setTrace( RequestTrace trace ) { this.trace = trace; return this; } @Override public String toString() { return getArtifact() + " < " + getRepositories(); } } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/resolution/ArtifactDescriptorResult.java000066400000000000000000000306471167050556700335100ustar00rootroot00000000000000package org.sonatype.aether.resolution; /******************************************************************************* * 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 java.util.Collections; import java.util.List; import java.util.Map; import org.sonatype.aether.RepositorySystem; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.graph.Dependency; import org.sonatype.aether.repository.ArtifactRepository; import org.sonatype.aether.repository.RemoteRepository; /** * The result from reading an artifact descriptor. * * @author Benjamin Bentmann * @see RepositorySystem#readArtifactDescriptor(RepositorySystemSession, ArtifactDescriptorRequest) */ public class ArtifactDescriptorResult { private final ArtifactDescriptorRequest request; private List exceptions; private List relocations; private Collection aliases; private Artifact artifact; private ArtifactRepository repository; private List dependencies; private List managedDependencies; private List repositories; private Map properties; /** * Creates a new result for the specified request. * * @param request The descriptor request, must not be {@code null}. */ public ArtifactDescriptorResult( ArtifactDescriptorRequest request ) { if ( request == null ) { throw new IllegalArgumentException( "artifact descriptor request has not been specified" ); } this.request = request; this.artifact = request.getArtifact(); this.exceptions = new ArrayList( 2 ); this.relocations = new ArrayList( 2 ); this.aliases = new ArrayList( 1 ); this.dependencies = new ArrayList(); this.managedDependencies = new ArrayList(); this.repositories = new ArrayList(); this.properties = Collections.emptyMap(); } /** * Gets the descriptor request that was made. * * @return The descriptor request, never {@code null}. */ public ArtifactDescriptorRequest getRequest() { return request; } /** * Gets the exceptions that occurred while reading the artifact descriptor. * * @return The exceptions that occurred, never {@code null}. */ public List getExceptions() { return exceptions; } /** * Sets the exceptions that occurred while reading the artifact descriptor. * * @param exceptions The exceptions that occurred, may be {@code null}. * @return This result for chaining, never {@code null}. */ public ArtifactDescriptorResult setExceptions( List exceptions ) { if ( exceptions == null ) { this.exceptions = new ArrayList( 2 ); } else { this.exceptions = exceptions; } return this; } /** * Records the specified exception while reading the artifact descriptor. * * @param exception The exception to record, may be {@code null}. * @return This result for chaining, never {@code null}. */ public ArtifactDescriptorResult addException( Exception exception ) { if ( exception != null ) { this.exceptions.add( exception ); } return this; } /** * Gets the relocations that were processed to read the artifact descriptor. The returned list denotes the hops that * lead to the final artifact coordinates as given by {@link #getArtifact()}. * * @return The relocations that were processed, never {@code null}. */ public List getRelocations() { return relocations; } /** * Sets the relocations that were processed to read the artifact descriptor. * * @param relocations The relocations that were processed, may be {@code null}. * @return This result for chaining, never {@code null}. */ public ArtifactDescriptorResult setRelocations( List relocations ) { if ( relocations == null ) { this.relocations = new ArrayList( 2 ); } else { this.relocations = relocations; } return this; } /** * Records the specified relocation hop while locating the artifact descriptor. * * @param artifact The artifact that got relocated, may be {@code null}. * @return This result for chaining, never {@code null}. */ public ArtifactDescriptorResult addRelocation( Artifact artifact ) { if ( artifact != null ) { relocations.add( artifact ); } return this; } /** * Gets the known aliases for this artifact. An alias denotes a different artifact with (almost) the same contents * and 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 aliases of the artifact, never {@code null}. */ public Collection getAliases() { return aliases; } /** * Sets the aliases of the artifact. * * @param aliases The aliases of the artifact, may be {@code null}. * @return This result for chaining, never {@code null}. */ public ArtifactDescriptorResult setAliases( Collection aliases ) { if ( aliases == null ) { this.aliases = new ArrayList( 0 ); } else { this.aliases = aliases; } return this; } /** * Records the specified alias. * * @param alias The alias for the artifact, may be {@code null}. * @return This result for chaining, never {@code null}. */ public ArtifactDescriptorResult addAlias( Artifact alias ) { if ( alias != null ) { aliases.add( alias ); } return this; } /** * Gets the artifact whose descriptor was read. This can be a different artifact than originally requested in case * relocations were encountered. * * @return The artifact after following any relocations, never {@code null}. */ public Artifact getArtifact() { return artifact; } /** * Sets the artifact whose descriptor was read. * * @param artifact The artifact whose descriptor was read, may be {@code null}. * @return This result for chaining, never {@code null}. */ public ArtifactDescriptorResult setArtifact( Artifact artifact ) { this.artifact = artifact; return this; } /** * Gets the repository from which the descriptor was eventually resolved. * * @return The repository from which the descriptor was resolved or {@code null} if unknown. */ public ArtifactRepository getRepository() { return repository; } /** * Sets the repository from which the descriptor was resolved. * * @param repository The repository from which the descriptor was resolved, may be {@code null}. * @return This result for chaining, never {@code null}. */ public ArtifactDescriptorResult setRepository( ArtifactRepository repository ) { this.repository = repository; return this; } /** * Gets the list of direct dependencies of the artifact. * * @return The list of direct dependencies, never {@code null} */ public List getDependencies() { return dependencies; } /** * Sets the list of direct dependencies of the artifact. * * @param dependencies The list of direct dependencies, may be {@code null} * @return This result for chaining, never {@code null}. */ public ArtifactDescriptorResult setDependencies( List dependencies ) { if ( dependencies == null ) { this.dependencies = new ArrayList(); } else { this.dependencies = dependencies; } return this; } /** * Adds the specified direct dependency. * * @param dependency The direct dependency to add, may be {@code null}. * @return This result for chaining, never {@code null}. */ public ArtifactDescriptorResult addDependency( Dependency dependency ) { if ( dependency != null ) { dependencies.add( dependency ); } return this; } /** * Gets the dependency management information. * * @return The dependency management information. */ public List getManagedDependencies() { return managedDependencies; } /** * Sets the dependency management information. * * @param dependencies The dependency management information, may be {@code null}. * @return This result for chaining, never {@code null}. */ public ArtifactDescriptorResult setManagedDependencies( List dependencies ) { if ( dependencies == null ) { this.managedDependencies = new ArrayList(); } else { this.managedDependencies = dependencies; } return this; } /** * Adds the specified managed dependency. * * @param dependency The managed dependency to add, may be {@code null}. * @return This result for chaining, never {@code null}. */ public ArtifactDescriptorResult addManagedDependency( Dependency dependency ) { if ( dependency != null ) { managedDependencies.add( dependency ); } return this; } /** * Gets the remote repositories listed in the artifact descriptor. * * @return The remote repositories listed in the artifact descriptor, never {@code null}. */ public List getRepositories() { return repositories; } /** * Sets the remote repositories listed in the artifact descriptor. * * @param repositories The remote repositories listed in the artifact descriptor, may be {@code null}. * @return This result for chaining, never {@code null}. */ public ArtifactDescriptorResult setRepositories( List repositories ) { if ( repositories == null ) { this.repositories = new ArrayList( 2 ); } else { this.repositories = repositories; } return this; } /** * Adds the specified remote repository. * * @param repository The remote repository to add, may be {@code null}. * @return This result for chaining, never {@code null}. */ public ArtifactDescriptorResult addRepository( RemoteRepository repository ) { if ( repository != null ) { repositories.add( repository ); } return this; } /** * Gets any additional information about the artifact in form of key-value pairs. * * @return The additional information about the artifact, never {@code null}. */ public Map getProperties() { return properties; } /** * Sets any additional information about the artifact in form of key-value pairs. * * @param properties The additional information about the artifact, may be {@code null}. * @return This result for chaining, never {@code null}. */ public ArtifactDescriptorResult setProperties( Map properties ) { if ( properties == null ) { this.properties = Collections.emptyMap(); } else { this.properties = properties; } return this; } @Override public String toString() { return getArtifact() + " -> " + getDependencies(); } } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/resolution/ArtifactRequest.java000066400000000000000000000142051167050556700316130ustar00rootroot00000000000000package org.sonatype.aether.resolution; /******************************************************************************* * 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.artifact.Artifact; import org.sonatype.aether.graph.DependencyNode; import org.sonatype.aether.repository.RemoteRepository; /** * A request to resolve an artifact. * * @author Benjamin Bentmann * @see RepositorySystem#resolveArtifacts(RepositorySystemSession, java.util.Collection) * @see Artifact#getFile() */ public class ArtifactRequest { private Artifact artifact; private DependencyNode node; private List repositories = Collections.emptyList(); private String context = ""; private RequestTrace trace; /** * Creates an unitialized request. */ public ArtifactRequest() { // enables default constructor } /** * Creates a request with the specified properties. * * @param artifact The artifact to resolve, may be {@code null}. * @param repositories The repositories to resolve the artifact from, may be {@code null}. * @param context The context in which this request is made, may be {@code null}. */ public ArtifactRequest( Artifact artifact, List repositories, String context ) { setArtifact( artifact ); setRepositories( repositories ); setRequestContext( context ); } /** * Creates a request from the specified dependency node. * * @param node The dependency node to resolve, may be {@code null}. */ public ArtifactRequest( DependencyNode node ) { setDependencyNode( node ); setRepositories( node.getRepositories() ); setRequestContext( node.getRequestContext() ); } /** * Gets the artifact to resolve. * * @return The artifact to resolve or {@code null}. */ public Artifact getArtifact() { return artifact; } /** * Sets the artifact to resolve. * * @param artifact The artifact to resolve, may be {@code null}. * @return This request for chaining, never {@code null}. */ public ArtifactRequest setArtifact( Artifact artifact ) { this.artifact = artifact; return this; } /** * Gets the dependency node (if any) for which to resolve the artifact. * * @return The dependency node to resolve or {@code null} if unknown. */ public DependencyNode getDependencyNode() { return node; } /** * Sets the dependency node to resolve. * * @param node The dependency node to resolve, may be {@code null}. * @return This request for chaining, never {@code null}. */ public ArtifactRequest setDependencyNode( DependencyNode node ) { this.node = node; if ( node != null ) { setArtifact( node.getDependency().getArtifact() ); } return this; } /** * Gets the repositories to resolve the version range from. * * @return The repositories, never {@code null}. */ public List getRepositories() { return repositories; } /** * Sets the repositories to resolve the artifact from. * * @param repositories The repositories, may be {@code null}. * @return This request for chaining, never {@code null}. */ public ArtifactRequest setRepositories( List repositories ) { if ( repositories == null ) { this.repositories = Collections.emptyList(); } else { this.repositories = repositories; } return this; } /** * Adds the specified repository for the resolution. * * @param repository The repository to add, may be {@code null}. * @return This request for chaining, never {@code null}. */ public ArtifactRequest 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 ArtifactRequest 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 ArtifactRequest setTrace( RequestTrace trace ) { this.trace = trace; return this; } @Override public String toString() { return getArtifact() + " < " + getRepositories(); } } ArtifactResolutionException.java000066400000000000000000000060631167050556700341310ustar00rootroot00000000000000aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/resolutionpackage org.sonatype.aether.resolution; /******************************************************************************* * 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.Collections; import java.util.List; import org.sonatype.aether.RepositoryException; import org.sonatype.aether.transfer.ArtifactNotFoundException; /** * Thrown in case of a unresolvable artifacts. * * @author Benjamin Bentmann */ public class ArtifactResolutionException extends RepositoryException { private final List results; public ArtifactResolutionException( List results ) { super( getMessage( results ), getCause( results ) ); this.results = ( results != null ) ? results : Collections. emptyList(); } public List getResults() { return results; } public ArtifactResult getResult() { return !results.isEmpty() ? results.get( 0 ) : null; } private static String getMessage( List results ) { StringBuilder buffer = new StringBuilder( 256 ); buffer.append( "The following artifacts could not be resolved: " ); int unresolved = 0; String sep = ""; for ( ArtifactResult result : results ) { if ( !result.isResolved() ) { unresolved++; buffer.append( sep ); buffer.append( result.getRequest().getArtifact() ); sep = ", "; } } Throwable cause = getCause( results ); if ( cause != null ) { if ( unresolved == 1 ) { buffer.setLength( 0 ); buffer.append( cause.getMessage() ); } else { buffer.append( ": " ).append( cause.getMessage() ); } } return buffer.toString(); } private static Throwable getCause( List results ) { for ( ArtifactResult result : results ) { if ( !result.isResolved() ) { Throwable nf = null; for ( Throwable t : result.getExceptions() ) { if ( t instanceof ArtifactNotFoundException ) { if ( nf == null ) { nf = t; } } else { return t; } } if ( nf != null ) { return nf; } } } return null; } } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/resolution/ArtifactResult.java000066400000000000000000000122301167050556700314350ustar00rootroot00000000000000package org.sonatype.aether.resolution; /******************************************************************************* * 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.artifact.Artifact; import org.sonatype.aether.repository.ArtifactRepository; import org.sonatype.aether.transfer.ArtifactNotFoundException; /** * The result of an artifact resolution request. * * @author Benjamin Bentmann * @see RepositorySystem#resolveArtifacts(RepositorySystemSession, java.util.Collection) * @see Artifact#getFile() */ public class ArtifactResult { private final ArtifactRequest request; private final List exceptions; private Artifact artifact; private ArtifactRepository repository; /** * Creates a new result for the specified request. * * @param request The resolution request, must not be {@code null}. */ public ArtifactResult( ArtifactRequest request ) { if ( request == null ) { throw new IllegalArgumentException( "resolution request has not been specified" ); } this.request = request; this.exceptions = new ArrayList( 2 ); } /** * Gets the resolution request that was made. * * @return The resolution request, never {@code null}. */ public ArtifactRequest getRequest() { return request; } /** * Gets the resolved artifact (if any). Use {@link #getExceptions()} to query the errors that occurred while trying * to resolve the artifact. * * @return The resolved artifact or {@code null} if the resolution failed. */ public Artifact getArtifact() { return artifact; } /** * Sets the resolved artifact. * * @param artifact The resolved artifact, may be {@code null} if the resolution failed. * @return This result for chaining, never {@code null}. */ public ArtifactResult setArtifact( Artifact artifact ) { this.artifact = artifact; return this; } /** * Gets the exceptions that occurred while resolving the artifact. Note that this list can be non-empty even if the * artifact was successfully resolved, e.g. when one of the contacted remote repositories didn't contain the * artifact but a later repository eventually contained it. * * @return The exceptions that occurred, never {@code null}. * @see #isResolved() */ public List getExceptions() { return exceptions; } /** * Records the specified exception while resolving the artifact. * * @param exception The exception to record, may be {@code null}. * @return This result for chaining, never {@code null}. */ public ArtifactResult addException( Exception exception ) { if ( exception != null ) { this.exceptions.add( exception ); } return this; } /** * Gets the repository from which the artifact was eventually resolved. * * @return The repository from which the artifact was resolved or {@code null} if unknown. */ public ArtifactRepository getRepository() { return repository; } /** * Sets the repository from which the artifact was resolved. * * @param repository The repository from which the artifact was resolved, may be {@code null}. * @return This result for chaining, never {@code null}. */ public ArtifactResult setRepository( ArtifactRepository repository ) { this.repository = repository; return this; } /** * Indicates whether the requested artifact was resolved. Note that the artifact might have been successfully * resolved despite {@link #getExceptions()} indicating transfer errors while trying to fetch the artifact from some * of the specified remote repositories. * * @return {@code true} if the artifact was resolved, {@code false} otherwise. * @see Artifact#getFile() */ public boolean isResolved() { return getArtifact() != null && getArtifact().getFile() != null; } /** * Indicates whether the requested artifact is not present in any of the specified repositories. * * @return {@code true} if the artifact is not present in any repository, {@code false} otherwise. */ public boolean isMissing() { for ( Exception e : getExceptions() ) { if ( !( e instanceof ArtifactNotFoundException ) ) { return false; } } return !isResolved(); } @Override public String toString() { return getArtifact() + " < " + getRepository(); } } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/resolution/DependencyRequest.java000066400000000000000000000142451167050556700321400ustar00rootroot00000000000000package org.sonatype.aether.resolution; /******************************************************************************* * 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.RepositorySystem; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.RequestTrace; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.collection.CollectRequest; import org.sonatype.aether.graph.DependencyFilter; import org.sonatype.aether.graph.DependencyNode; /** * A request to resolve transitive dependencies. This request can either be supplied with a {@link CollectRequest} to * calculate the transitive dependencies or with an already resolved dependency graph. * * @author Benjamin Bentmann * @see RepositorySystem#resolveDependencies(RepositorySystemSession, DependencyRequest) * @see Artifact#getFile() */ public class DependencyRequest { private DependencyNode root; private CollectRequest collectRequest; private DependencyFilter filter; private RequestTrace trace; /** * Creates an uninitialized request. Note that either {@link #setRoot(DependencyNode)} or * {@link #setCollectRequest(CollectRequest)} must eventually be called to create a valid request. */ public DependencyRequest() { // enables default constructor } /** * Creates a request for the specified dependency graph and with the given resolution filter. * * @param node The root node of the dependency graph whose artifacts should be resolved, may be {@code null}. * @param filter The resolution filter to use, may be {@code null}. */ public DependencyRequest( DependencyNode node, DependencyFilter filter ) { setRoot( node ); setFilter( filter ); } /** * Creates a request for the specified collect request and with the given resolution filter. * * @param request The collect request used to calculate the dependency graph whose artifacts should be resolved, may * be {@code null}. * @param filter The resolution filter to use, may be {@code null}. */ public DependencyRequest( CollectRequest request, DependencyFilter filter ) { setCollectRequest( request ); setFilter( filter ); } /** * Gets the root node of the dependency graph whose artifacts should be resolved. * * @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 whose artifacts should be resolved. When this request is processed, * the nodes of the given dependency graph will be updated to refer to the resolved artifacts. Eventually, either * {@link #setRoot(DependencyNode)} or {@link #setCollectRequest(CollectRequest)} must be called to create a valid * request. * * @param root The root node of the dependency graph, may be {@code null}. * @return This request for chaining, never {@code null}. */ public DependencyRequest setRoot( DependencyNode root ) { this.root = root; return this; } /** * Gets the collect request used to calculate the dependency graph whose artifacts should be resolved. * * @return The collect request or {@code null} if none. */ public CollectRequest getCollectRequest() { return collectRequest; } /** * Sets the collect request used to calculate the dependency graph whose artifacts should be resolved. Eventually, * either {@link #setRoot(DependencyNode)} or {@link #setCollectRequest(CollectRequest)} must be called to create a * valid request. If this request is supplied with a dependency node via {@link #setRoot(DependencyNode)}, the * collect request is ignored. * * @param collectRequest The collect request, may be {@code null}. * @return This request for chaining, never {@code null}. */ public DependencyRequest setCollectRequest( CollectRequest collectRequest ) { this.collectRequest = collectRequest; return this; } /** * Gets the resolution filter used to select which artifacts of the dependency graph should be resolved. * * @return The resolution filter or {@code null} to resolve all artifacts of the dependency graph. */ public DependencyFilter getFilter() { return filter; } /** * Sets the resolution filter used to select which artifacts of the dependency graph should be resolved. For * example, use this filter to restrict resolution to dependencies of a certain scope. * * @param filter The resolution filter, may be {@code null} to resolve all artifacts of the dependency graph. * @return This request for chaining, never {@code null}. */ public DependencyRequest setFilter( DependencyFilter filter ) { this.filter = filter; 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 DependencyRequest setTrace( RequestTrace trace ) { this.trace = trace; return this; } @Override public String toString() { if ( root != null ) { return String.valueOf( root ); } return String.valueOf( collectRequest ); } } DependencyResolutionException.java000066400000000000000000000024761167050556700344560ustar00rootroot00000000000000aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/resolutionpackage org.sonatype.aether.resolution; /******************************************************************************* * 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 unresolvable dependencies. * * @author Benjamin Bentmann */ public class DependencyResolutionException extends RepositoryException { private final DependencyResult result; public DependencyResolutionException( DependencyResult result, Throwable cause ) { super( getMessage( cause ), cause ); this.result = result; } private static String getMessage( Throwable cause ) { String msg = null; if ( cause != null ) { msg = cause.getMessage(); } if ( msg == null || msg.length() <= 0 ) { msg = "Could not resolve transitive dependencies"; } return msg; } public DependencyResult getResult() { return result; } } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/resolution/DependencyResult.java000066400000000000000000000102231167050556700317560ustar00rootroot00000000000000package org.sonatype.aether.resolution; /******************************************************************************* * 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 resolution request. * * @author Benjamin Bentmann * @see RepositorySystem#resolveDependencies(RepositorySystemSession, DependencyRequest) */ public class DependencyResult { private final DependencyRequest request; private DependencyNode root; private List collectExceptions; private List artifactResults; /** * Creates a new result for the specified request. * * @param request The resolution request, must not be {@code null}. */ public DependencyResult( DependencyRequest request ) { if ( request == null ) { throw new IllegalArgumentException( "dependency request has not been specified" ); } this.request = request; this.root = request.getRoot(); this.collectExceptions = new ArrayList( 2 ); this.artifactResults = new ArrayList( 2 ); } /** * Gets the resolution request that was made. * * @return The resolution request, never {@code null}. */ public DependencyRequest getRequest() { return request; } /** * Gets the root node of the resolved dependency graph. Note that this dependency graph might be * incomplete/unfinished in case of {@link #getCollectExceptions()} indicating errors during its calculation. * * @return The root node of the resolved dependency graph or {@code null} if none. */ public DependencyNode getRoot() { return root; } /** * Sets the root node of the resolved dependency graph. * * @param root The root node of the resolved dependency graph, may be {@code null}. * @return This result for chaining, never {@code null}. */ public DependencyResult setRoot( DependencyNode root ) { this.root = root; return this; } /** * Gets the exceptions that occurred while building the dependency graph. * * @return The exceptions that occurred, never {@code null}. */ public List getCollectExceptions() { return collectExceptions; } /** * Records the specified exceptions while building the dependency graph. * * @param exceptions The exceptions to record, may be {@code null}. * @return This result for chaining, never {@code null}. */ public DependencyResult setCollectExceptions( List exceptions ) { this.collectExceptions = ( exceptions != null ) ? exceptions : new ArrayList(); return this; } /** * Gets the resolution results for the dependency artifacts that matched {@link DependencyRequest#getFilter()}. * * @return The resolution results for the dependency artifacts, never {@code null}. */ public List getArtifactResults() { return artifactResults; } /** * Sets the resolution results for the artifacts that matched {@link DependencyRequest#getFilter()}. * * @param results The resolution results for the artifacts, may be {@code null}. * @return This result for chaining, never {@code null}. */ public DependencyResult setArtifactResults( List results ) { this.artifactResults = ( results != null ) ? results : new ArrayList(); return this; } @Override public String toString() { return String.valueOf( artifactResults ); } } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/resolution/MetadataRequest.java000066400000000000000000000164251167050556700316040ustar00rootroot00000000000000package org.sonatype.aether.resolution; /******************************************************************************* * 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.RepositorySystem; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.RequestTrace; import org.sonatype.aether.metadata.Metadata; import org.sonatype.aether.repository.RemoteRepository; /** * A request to resolve metadata from either a remote repository or the local repository. * * @author Benjamin Bentmann * @see RepositorySystem#resolveMetadata(RepositorySystemSession, java.util.Collection) * @see Metadata#getFile() */ public class MetadataRequest { private Metadata metadata; private RemoteRepository repository; private String context = ""; private boolean deleteLocalCopyIfMissing; private boolean favorLocalRepository; private RequestTrace trace; /** * Creates an unitialized request. */ public MetadataRequest() { // enables default constructor } /** * Creates a request to resolve the specified metadata from the local repository. * * @param metadata The metadata to resolve, may be {@code null}. */ public MetadataRequest( Metadata metadata ) { setMetadata( metadata ); } /** * Creates a request with the specified properties. * * @param metadata The metadata to resolve, may be {@code null}. * @param repository The repository to resolve the metadata from, may be {@code null} to resolve from the local * repository. * @param context The context in which this request is made, may be {@code null}. */ public MetadataRequest( Metadata metadata, RemoteRepository repository, String context ) { setMetadata( metadata ); setRepository( repository ); setRequestContext( context ); } /** * Gets the metadata to resolve. * * @return The metadata or {@code null} if not set. */ public Metadata getMetadata() { return metadata; } /** * Sets the metadata to resolve. * * @param metadata The metadata, may be {@code null}. * @return This request for chaining, never {@code null}. */ public MetadataRequest setMetadata( Metadata metadata ) { this.metadata = metadata; return this; } /** * Gets the repository from which the metadata should be resolved. * * @return The repository or {@code null} to resolve from the local repository. */ public RemoteRepository getRepository() { return repository; } /** * Sets the repository from which the metadata should be resolved. * * @param repository The repository, may be {@code null} to resolve from the local repository. * @return This request for chaining, never {@code null}. */ public MetadataRequest setRepository( RemoteRepository repository ) { this.repository = 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 MetadataRequest setRequestContext( String context ) { this.context = ( context != null ) ? context : ""; return this; } /** * Indicates whether the locally cached copy of the metadata should be removed if the corresponding file does not * exist (any more) in the remote repository. * * @return {@code true} if locally cached metadata should be deleted if no corresponding remote file exists, * {@code false} to keep the local copy. */ public boolean isDeleteLocalCopyIfMissing() { return deleteLocalCopyIfMissing; } /** * Controls whether the locally cached copy of the metadata should be removed if the corresponding file does not * exist (any more) in the remote repository. * * @param deleteLocalCopyIfMissing {@code true} if locally cached metadata should be deleted if no corresponding * remote file exists, {@code false} to keep the local copy. * @return This request for chaining, never {@code null}. */ public MetadataRequest setDeleteLocalCopyIfMissing( boolean deleteLocalCopyIfMissing ) { this.deleteLocalCopyIfMissing = deleteLocalCopyIfMissing; return this; } /** * Indicates whether the metadata resolution should be suppressed if the corresponding metadata of the local * repository is up-to-date according to the update policy of the remote repository. In this case, the metadata * resolution will even be suppressed if no local copy of the remote metadata exists yet. * * @return {@code true} to suppress resolution of remote metadata if the corresponding metadata of the local * repository is up-to-date, {@code false} to resolve the remote metadata normally according to the update * policy. */ public boolean isFavorLocalRepository() { return favorLocalRepository; } /** * Controls resolution of remote metadata when already corresponding metadata of the local repository exists. In * cases where the local repository's metadata is sufficient and going to be preferred, resolution of the remote * metadata can be suppressed to avoid unnecessary network access. * * @param favorLocalRepository {@code true} to suppress resolution of remote metadata if the corresponding metadata * of the local repository is up-to-date, {@code false} to resolve the remote metadata normally according * to the update policy. * @return This request for chaining, never {@code null}. */ public MetadataRequest setFavorLocalRepository( boolean favorLocalRepository ) { this.favorLocalRepository = favorLocalRepository; 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 MetadataRequest setTrace( RequestTrace trace ) { this.trace = trace; return this; } @Override public String toString() { return getMetadata() + " < " + getRepository(); } } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/resolution/MetadataResult.java000066400000000000000000000114421167050556700314240ustar00rootroot00000000000000package org.sonatype.aether.resolution; /******************************************************************************* * 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.RepositorySystem; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.metadata.Metadata; import org.sonatype.aether.transfer.MetadataNotFoundException; /** * The result of a metadata resolution request. * * @author Benjamin Bentmann * @see RepositorySystem#resolveMetadata(RepositorySystemSession, java.util.Collection) */ public class MetadataResult { private final MetadataRequest request; private Exception exception; private boolean updated; private Metadata metadata; /** * Creates a new result for the specified request. * * @param request The resolution request, must not be {@code null}. */ public MetadataResult( MetadataRequest request ) { if ( request == null ) { throw new IllegalArgumentException( "metadata request has not been specified" ); } this.request = request; } /** * Gets the resolution request that was made. * * @return The resolution request, never {@code null}. */ public MetadataRequest getRequest() { return request; } /** * Gets the resolved metadata (if any). * * @return The resolved metadata or {@code null} if the resolution failed. */ public Metadata getMetadata() { return metadata; } /** * Sets the resolved metadata. * * @param metadata The resolved metadata, may be {@code null} if the resolution failed. * @return This result for chaining, never {@code null}. */ public MetadataResult setMetadata( Metadata metadata ) { this.metadata = metadata; return this; } /** * Records the specified exception while resolving the metadata. * * @param exception The exception to record, may be {@code null}. * @return This result for chaining, never {@code null}. */ public MetadataResult setException( Exception exception ) { this.exception = exception; return this; } /** * Gets the exception that occurred while resolving the metadata. * * @return The exception that occurred or {@code null} if none. */ public Exception getException() { return exception; } /** * Sets the updated flag for the metadata. * * @param updated {@code true} if the metadata was actually fetched from the remote repository during the * resolution, {@code false} if the metadata was resolved from a locally cached copy. * @return This result for chaining, never {@code null}. */ public MetadataResult setUpdated( boolean updated ) { this.updated = updated; return this; } /** * Indicates whether the metadata was actually fetched from the remote repository or resolved from the local cache. * If metadata has been locally cached during a previous resolution request and this local copy is still up-to-date * according to the remote repository's update policy, no remote access is made. * * @return {@code true} if the metadata was actually fetched from the remote repository during the resolution, * {@code false} if the metadata was resolved from a locally cached copy. */ public boolean isUpdated() { return updated; } /** * Indicates whether the requested metadata was resolved. Note that the metadata might have been successfully * resolved (from the local cache) despite {@link #getException()} indicating a transfer error while trying to * refetch the metadata from the remote repository. * * @return {@code true} if the metadata was resolved, {@code false} otherwise. * @see Metadata#getFile() */ public boolean isResolved() { return getMetadata() != null && getMetadata().getFile() != null; } /** * Indicates whether the requested metadata is not present in the remote repository. * * @return {@code true} if the metadata is not present in the remote repository, {@code false} otherwise. */ public boolean isMissing() { return getException() instanceof MetadataNotFoundException; } @Override public String toString() { return getMetadata() + ( isUpdated() ? " (updated)" : " (cached)" ); } } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/resolution/VersionRangeRequest.java000066400000000000000000000121521167050556700324570ustar00rootroot00000000000000package org.sonatype.aether.resolution; /******************************************************************************* * 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.artifact.Artifact; import org.sonatype.aether.repository.RemoteRepository; /** * A request to resolve a version range. * * @author Benjamin Bentmann * @see RepositorySystem#resolveVersionRange(RepositorySystemSession, VersionRangeRequest) */ public class VersionRangeRequest { private Artifact artifact; private List repositories = Collections.emptyList(); private String context = ""; private RequestTrace trace; /** * Creates an uninitialized request. */ public VersionRangeRequest() { // enables default constructor } /** * Creates a request with the specified properties. * * @param artifact The artifact whose version range should be resolved, may be {@code null}. * @param repositories The repositories to resolve the version from, may be {@code null}. * @param context The context in which this request is made, may be {@code null}. */ public VersionRangeRequest( Artifact artifact, List repositories, String context ) { setArtifact( artifact ); setRepositories( repositories ); setRequestContext( context ); } /** * Gets the artifact whose version range shall be resolved. * * @return The artifact or {@code null} if not set. */ public Artifact getArtifact() { return artifact; } /** * Sets the artifact whose version range shall be resolved. * * @param artifact The artifact, may be {@code null}. * @return This request for chaining, never {@code null}. */ public VersionRangeRequest setArtifact( Artifact artifact ) { this.artifact = artifact; return this; } /** * Gets the repositories to resolve the version range from. * * @return The repositories, never {@code null}. */ public List getRepositories() { return repositories; } /** * Sets the repositories to resolve the version range from. * * @param repositories The repositories, may be {@code null}. * @return This request for chaining, never {@code null}. */ public VersionRangeRequest setRepositories( List repositories ) { if ( repositories == null ) { this.repositories = Collections.emptyList(); } else { this.repositories = repositories; } return this; } /** * Adds the specified repository for the resolution. * * @param repository The repository to add, may be {@code null}. * @return This request for chaining, never {@code null}. */ public VersionRangeRequest 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 VersionRangeRequest 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 VersionRangeRequest setTrace( RequestTrace trace ) { this.trace = trace; return this; } @Override public String toString() { return getArtifact() + " < " + getRepositories(); } } VersionRangeResolutionException.java000066400000000000000000000037311167050556700347750ustar00rootroot00000000000000aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/resolutionpackage org.sonatype.aether.resolution; /******************************************************************************* * 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 an unparseable or unresolvable version range. * * @author Benjamin Bentmann */ public class VersionRangeResolutionException extends RepositoryException { private final VersionRangeResult result; public VersionRangeResolutionException( VersionRangeResult result ) { super( getMessage( result ), getCause( result ) ); this.result = result; } private static String getMessage( VersionRangeResult result ) { StringBuilder buffer = new StringBuilder( 256 ); buffer.append( "Failed to resolve version range" ); if ( result != null ) { buffer.append( " for " ).append( result.getRequest().getArtifact() ); if ( !result.getExceptions().isEmpty() ) { buffer.append( ": " ).append( result.getExceptions().iterator().next().getMessage() ); } } return buffer.toString(); } private static Throwable getCause( VersionRangeResult result ) { Throwable cause = null; if ( result != null && !result.getExceptions().isEmpty() ) { cause = result.getExceptions().get( 0 ); } return cause; } public VersionRangeResolutionException( VersionRangeResult result, String message ) { super( message ); this.result = result; } public VersionRangeResult getResult() { return result; } } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/resolution/VersionRangeResult.java000066400000000000000000000143071167050556700323110ustar00rootroot00000000000000package org.sonatype.aether.resolution; /******************************************************************************* * 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.HashMap; import java.util.List; import java.util.Map; import org.sonatype.aether.RepositorySystem; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.repository.ArtifactRepository; import org.sonatype.aether.version.Version; import org.sonatype.aether.version.VersionConstraint; /** * The result of a version range resolution request. * * @author Benjamin Bentmann * @see RepositorySystem#resolveVersionRange(RepositorySystemSession, VersionRangeRequest) */ public class VersionRangeResult { private final VersionRangeRequest request; private final List exceptions; private List versions; private final Map repositories; private VersionConstraint versionConstraint; /** * Creates a new result for the specified request. * * @param request The resolution request, must not be {@code null}. */ public VersionRangeResult( VersionRangeRequest request ) { if ( request == null ) { throw new IllegalArgumentException( "version range request has not been specified" ); } this.request = request; this.exceptions = new ArrayList( 4 ); versions = new ArrayList(); repositories = new HashMap(); } /** * Gets the resolution request that was made. * * @return The resolution request, never {@code null}. */ public VersionRangeRequest getRequest() { return request; } /** * Gets the exceptions that occurred while resolving the version range. * * @return The exceptions that occurred, never {@code null}. */ public List getExceptions() { return exceptions; } /** * Records the specified exception while resolving the version range. * * @param exception The exception to record, may be {@code null}. * @return This result for chaining, never {@code null}. */ public VersionRangeResult addException( Exception exception ) { if ( exception != null ) { this.exceptions.add( exception ); } return this; } /** * Gets the versions (in ascending order) that matched the requested range. * * @return The matching versions (if any), never {@code null}. */ public List getVersions() { return versions; } /** * Adds the specified version to the result. * * @param version The version to add, must not be {@code null}. * @return This result for chaining, never {@code null}. */ public VersionRangeResult addVersion( Version version ) { versions.add( version ); return this; } /** * Sets the versions (in ascending order) matching the requested range. * * @param versions The matching versions, may be empty or {@code null} if none. * @return This result for chaining, never {@code null}. */ public VersionRangeResult setVersions( List versions ) { this.versions = ( versions != null ) ? versions : new ArrayList(); return this; } /** * Gets the lowest version matching the requested range. * * @return The lowest matching version or {@code null} if no versions matched the requested range. */ public Version getLowestVersion() { if ( versions.isEmpty() ) { return null; } return versions.get( 0 ); } /** * Gets the highest version matching the requested range. * * @return The highest matching version or {@code null} if no versions matched the requested range. */ public Version getHighestVersion() { if ( versions.isEmpty() ) { return null; } return versions.get( versions.size() - 1 ); } /** * Gets the repository from which the specified version was resolved. * * @param version The version whose source repository should be retrieved, must not be {@code null}. * @return The repository from which the version was resolved or {@code null} if unknown. */ public ArtifactRepository getRepository( Version version ) { return repositories.get( version ); } /** * Records the repository from which the specified version was resolved * * @param version The version whose source repository is to be recorded, must not be {@code null}. * @param repository The repository from which the version was resolved, may be {@code null}. * @return This result for chaining, never {@code null}. */ public VersionRangeResult setRepository( Version version, ArtifactRepository repository ) { if ( repository != null ) { this.repositories.put( version, repository ); } return this; } /** * Gets the version constraint that was parsed from the artifact's version string. * * @return The parsed version constraint or {@code null}. */ public VersionConstraint getVersionConstraint() { return versionConstraint; } /** * Sets the version constraint that was parsed from the artifact's version string. * * @param versionConstraint The parsed version constraint, may be {@code null}. * @return This result for chaining, never {@code null}. */ public VersionRangeResult setVersionConstraint( VersionConstraint versionConstraint ) { this.versionConstraint = versionConstraint; return this; } @Override public String toString() { return String.valueOf( repositories ); } } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/resolution/VersionRequest.java000066400000000000000000000120551167050556700315040ustar00rootroot00000000000000package org.sonatype.aether.resolution; /******************************************************************************* * 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.artifact.Artifact; import org.sonatype.aether.repository.RemoteRepository; /** * A request to resolve a metaversion. * * @author Benjamin Bentmann * @see RepositorySystem#resolveVersion(RepositorySystemSession, VersionRequest) */ public class VersionRequest { private Artifact artifact; private List repositories = Collections.emptyList(); private String context = ""; private RequestTrace trace; /** * Creates an uninitialized request. */ public VersionRequest() { // enables default constructor } /** * Creates a request with the specified properties. * * @param artifact The artifact whose (meta-)version should be resolved, may be {@code null}. * @param repositories The repositories to resolve the version from, may be {@code null}. * @param context The context in which this request is made, may be {@code null}. */ public VersionRequest( Artifact artifact, List repositories, String context ) { setArtifact( artifact ); setRepositories( repositories ); setRequestContext( context ); } /** * Gets the artifact whose (meta-)version shall be resolved. * * @return The artifact or {@code null} if not set. */ public Artifact getArtifact() { return artifact; } /** * Sets the artifact whose (meta-)version shall be resolved. * * @param artifact The artifact, may be {@code null}. * @return This request for chaining, never {@code null}. */ public VersionRequest setArtifact( Artifact artifact ) { this.artifact = artifact; return this; } /** * Gets the repositories to resolve the version from. * * @return The repositories, never {@code null}. */ public List getRepositories() { return repositories; } /** * Sets the repositories to resolve the version from. * * @param repositories The repositories, may be {@code null}. * @return This request for chaining, never {@code null}. */ public VersionRequest setRepositories( List repositories ) { if ( repositories == null ) { this.repositories = Collections.emptyList(); } else { this.repositories = repositories; } return this; } /** * Adds the specified repository for the resolution. * * @param repository The repository to add, may be {@code null}. * @return This request for chaining, never {@code null}. */ public VersionRequest 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 VersionRequest 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 VersionRequest setTrace( RequestTrace trace ) { this.trace = trace; return this; } @Override public String toString() { return getArtifact() + " < " + getRepositories(); } } VersionResolutionException.java000066400000000000000000000034021167050556700340130ustar00rootroot00000000000000aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/resolutionpackage org.sonatype.aether.resolution; /******************************************************************************* * 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 an unresolvable metaversion. * * @author Benjamin Bentmann */ public class VersionResolutionException extends RepositoryException { private final VersionResult result; public VersionResolutionException( VersionResult result ) { super( getMessage( result ), getCause( result ) ); this.result = result; } private static String getMessage( VersionResult result ) { StringBuilder buffer = new StringBuilder( 256 ); buffer.append( "Failed to resolve version" ); if ( result != null ) { buffer.append( " for " ).append( result.getRequest().getArtifact() ); if ( !result.getExceptions().isEmpty() ) { buffer.append( ": " ).append( result.getExceptions().iterator().next().getMessage() ); } } return buffer.toString(); } private static Throwable getCause( VersionResult result ) { Throwable cause = null; if ( result != null && !result.getExceptions().isEmpty() ) { cause = result.getExceptions().get( 0 ); } return cause; } public VersionResult getResult() { return result; } } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/resolution/VersionResult.java000066400000000000000000000071271167050556700313360ustar00rootroot00000000000000package org.sonatype.aether.resolution; /******************************************************************************* * 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.repository.ArtifactRepository; /** * The result of a version resolution request. * * @author Benjamin Bentmann * @see RepositorySystem#resolveVersion(RepositorySystemSession, VersionRequest) */ public class VersionResult { private final VersionRequest request; private final List exceptions; private String version; private ArtifactRepository repository; /** * Creates a new result for the specified request. * * @param request The resolution request, must not be {@code null}. */ public VersionResult( VersionRequest request ) { if ( request == null ) { throw new IllegalArgumentException( "version request has not been specified" ); } this.request = request; this.exceptions = new ArrayList( 4 ); } /** * Gets the resolution request that was made. * * @return The resolution request, never {@code null}. */ public VersionRequest getRequest() { return request; } /** * Gets the exceptions that occurred while resolving the version. * * @return The exceptions that occurred, never {@code null}. */ public List getExceptions() { return exceptions; } /** * Records the specified exception while resolving the version. * * @param exception The exception to record, may be {@code null}. * @return This result for chaining, never {@code null}. */ public VersionResult addException( Exception exception ) { if ( exception != null ) { this.exceptions.add( exception ); } return this; } /** * Gets the resolved version. * * @return The resolved version or {@code null} if the resolution failed. */ public String getVersion() { return version; } /** * Sets the resolved version. * * @param version The resolved version, may be {@code null}. * @return This result for chaining, never {@code null}. */ public VersionResult setVersion( String version ) { this.version = version; return this; } /** * Gets the repository from which the version was eventually resolved. * * @return The repository from which the version was resolved or {@code null} if unknown. */ public ArtifactRepository getRepository() { return repository; } /** * Sets the repository from which the version was resolved. * * @param repository The repository from which the version was resolved, may be {@code null}. * @return This result for chaining, never {@code null}. */ public VersionResult setRepository( ArtifactRepository repository ) { this.repository = repository; return this; } @Override public String toString() { return getVersion() + " @ " + getRepository(); } } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/transfer/000077500000000000000000000000001167050556700252615ustar00rootroot00000000000000aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/transfer/AbstractTransferListener.java000066400000000000000000000024351167050556700331060ustar00rootroot00000000000000package org.sonatype.aether.transfer; /******************************************************************************* * 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 transfer listeners. The callback methods in this class do nothing. * * @author Benjamin Bentmann */ public abstract class AbstractTransferListener implements TransferListener { public void transferInitiated( TransferEvent event ) throws TransferCancelledException { } public void transferStarted( TransferEvent event ) throws TransferCancelledException { } public void transferProgressed( TransferEvent event ) throws TransferCancelledException { } public void transferCorrupted( TransferEvent event ) throws TransferCancelledException { } public void transferSucceeded( TransferEvent event ) { } public void transferFailed( TransferEvent event ) { } } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/transfer/ArtifactNotFoundException.java000066400000000000000000000031121167050556700332120ustar00rootroot00000000000000package org.sonatype.aether.transfer; /******************************************************************************* * 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.artifact.Artifact; import org.sonatype.aether.repository.RemoteRepository; /** * Thrown when an artifact was not found in a particular repository. * * @author Benjamin Bentmann */ public class ArtifactNotFoundException extends ArtifactTransferException { public ArtifactNotFoundException( Artifact artifact, RemoteRepository repository ) { super( artifact, repository, "Could not find artifact " + artifact + getString( " in ", repository ) + getLocalPathInfo( artifact, repository ) ); } private static String getLocalPathInfo( Artifact artifact, RemoteRepository repository ) { String localPath = ( artifact != null ) ? artifact.getProperty( "localPath", null ) : null; if ( localPath != null && repository == null ) { return " at specified path " + localPath; } else { return ""; } } public ArtifactNotFoundException( Artifact artifact, RemoteRepository repository, String message ) { super( artifact, repository, message ); } } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/transfer/ArtifactTransferException.java000066400000000000000000000041751167050556700332540ustar00rootroot00000000000000package org.sonatype.aether.transfer; /******************************************************************************* * 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.artifact.Artifact; import org.sonatype.aether.repository.RemoteRepository; /** * Thrown when an artifact could not be uploaded/downloaded to/from a particular remote repository. * * @author Benjamin Bentmann */ public class ArtifactTransferException extends RepositoryException { private final Artifact artifact; private final RemoteRepository repository; static String getString( String prefix, RemoteRepository repository ) { if ( repository == null ) { return ""; } else { return prefix + repository.getId() + " (" + repository.getUrl() + ")"; } } public ArtifactTransferException( Artifact artifact, RemoteRepository repository, String message ) { super( message ); this.artifact = artifact; this.repository = repository; } public ArtifactTransferException( Artifact artifact, RemoteRepository repository, Throwable cause ) { super( "Could not transfer artifact " + artifact + getString( " from/to ", repository ) + getMessage( ": ", cause ), cause ); this.artifact = artifact; this.repository = repository; } public ArtifactTransferException( Artifact artifact, RemoteRepository repository, String message, Throwable cause ) { super( message, cause ); this.artifact = artifact; this.repository = repository; } public Artifact getArtifact() { return artifact; } public RemoteRepository getRepository() { return repository; } } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/transfer/ChecksumFailureException.java000066400000000000000000000032071167050556700330570ustar00rootroot00000000000000package org.sonatype.aether.transfer; /******************************************************************************* * 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 checksum failure during an artifact/metadata download. * * @author Benjamin Bentmann */ public class ChecksumFailureException extends RepositoryException { private final String expected; private final String actual; public ChecksumFailureException( String expected, String actual ) { super( "Checksum validation failed, expected " + expected + " but is " + actual ); this.expected = expected; this.actual = actual; } public ChecksumFailureException( String message ) { super( message ); expected = actual = ""; } public ChecksumFailureException( Throwable cause ) { super( "Checksum validation failed, could not read expected checksum" + getMessage( ": ", cause ), cause ); expected = actual = ""; } public ChecksumFailureException( String message, Throwable cause ) { super( message, cause ); expected = actual = ""; } public String getExpected() { return expected; } public String getActual() { return actual; } } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/transfer/MetadataNotFoundException.java000066400000000000000000000032601167050556700332010ustar00rootroot00000000000000package org.sonatype.aether.transfer; /******************************************************************************* * 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.metadata.Metadata; import org.sonatype.aether.repository.LocalRepository; import org.sonatype.aether.repository.RemoteRepository; /** * Thrown when metadata was not found in a particular repository. * * @author Benjamin Bentmann */ public class MetadataNotFoundException extends MetadataTransferException { public MetadataNotFoundException( Metadata metadata, LocalRepository repository ) { super( metadata, null, "Could not find metadata " + metadata + getString( " in ", repository ) ); } private static String getString( String prefix, LocalRepository repository ) { if ( repository == null ) { return ""; } else { return prefix + repository.getId() + " (" + repository.getBasedir() + ")"; } } public MetadataNotFoundException( Metadata metadata, RemoteRepository repository ) { super( metadata, repository, "Could not find metadata " + metadata + getString( " in ", repository ) ); } public MetadataNotFoundException( Metadata metadata, RemoteRepository repository, String message ) { super( metadata, repository, message ); } } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/transfer/MetadataTransferException.java000066400000000000000000000041721167050556700332340ustar00rootroot00000000000000package org.sonatype.aether.transfer; /******************************************************************************* * 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.metadata.Metadata; import org.sonatype.aether.repository.RemoteRepository; /** * Thrown when metadata could not be uploaded/downloaded to/from a particular remote repository. * * @author Benjamin Bentmann */ public class MetadataTransferException extends RepositoryException { private final Metadata metadata; private final RemoteRepository repository; static String getString( String prefix, RemoteRepository repository ) { if ( repository == null ) { return ""; } else { return prefix + repository.getId() + " (" + repository.getUrl() + ")"; } } public MetadataTransferException( Metadata metadata, RemoteRepository repository, String message ) { super( message ); this.metadata = metadata; this.repository = repository; } public MetadataTransferException( Metadata metadata, RemoteRepository repository, Throwable cause ) { super( "Could not transfer metadata " + metadata + getString( " from/to ", repository ) + getMessage( ": ", cause ), cause ); this.metadata = metadata; this.repository = repository; } public MetadataTransferException( Metadata metadata, RemoteRepository repository, String message, Throwable cause ) { super( message, cause ); this.metadata = metadata; this.repository = repository; } public Metadata getMetadata() { return metadata; } public RemoteRepository getRepository() { return repository; } } NoRepositoryConnectorException.java000066400000000000000000000036771167050556700342700ustar00rootroot00000000000000aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/transferpackage org.sonatype.aether.transfer; /******************************************************************************* * 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.repository.RemoteRepository; /** * Thrown in case of an unsupported remote repository type. * * @author Benjamin Bentmann */ public class NoRepositoryConnectorException extends RepositoryException { private final RemoteRepository repository; public NoRepositoryConnectorException( RemoteRepository repository ) { this( repository, toMessage( repository ) ); } public NoRepositoryConnectorException( RemoteRepository repository, String message ) { super( message ); this.repository = repository; } public NoRepositoryConnectorException( RemoteRepository repository, Throwable cause ) { this( repository, toMessage( repository ), cause ); } public NoRepositoryConnectorException( RemoteRepository repository, String message, Throwable cause ) { super( message, cause ); this.repository = repository; } private static String toMessage( RemoteRepository repository ) { if ( repository != null ) { return "No connector available to access repository " + repository.getId() + " (" + repository.getUrl() + ") of type " + repository.getContentType(); } else { return "No connector available to access repository"; } } public RemoteRepository getRepository() { return repository; } } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/transfer/TransferCancelledException.java000066400000000000000000000020371167050556700333640ustar00rootroot00000000000000package org.sonatype.aether.transfer; /******************************************************************************* * 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 an upload/download was cancelled (e.g. due to user request). * * @author Benjamin Bentmann */ public class TransferCancelledException extends RepositoryException { public TransferCancelledException() { super( "The operation was cancelled." ); } public TransferCancelledException( String message ) { super( message ); } public TransferCancelledException( String message, Throwable cause ) { super( message, cause ); } } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/transfer/TransferEvent.java000066400000000000000000000056051167050556700307200ustar00rootroot00000000000000package org.sonatype.aether.transfer; /******************************************************************************* * 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.nio.ByteBuffer; /** * An event fired to a transfer listener during an artifact/metadata transfer. * * @author Benjamin Bentmann * @see TransferListener */ public interface TransferEvent { /** * The type of the event. */ enum EventType { INITIATED, STARTED, PROGRESSED, CORRUPTED, SUCCEEDED, FAILED } /** * The type of the request/transfer. */ enum RequestType { GET, PUT, } /** * Gets the type of the event. * * @return The type of the event, never {@code null}. */ EventType getType(); /** * Gets the type of the request/transfer. * * @return The type of the request/transfer, never {@code null}. */ RequestType getRequestType(); /** * Gets the resource that is being transferred. * * @return The resource being transferred, never {@code null}. */ TransferResource getResource(); /** * Gets the total number of bytes that have been transferred since the download/upload was started. * * @return The total number of bytes that have been transferred since the transfer started, never negative. * @see #getDataLength() */ long getTransferredBytes(); /** * Gets the byte buffer holding the transferred bytes since the last event. A listener must assume this buffer to be * owned by the event source and must not change any byte in this buffer. Also, the buffer is only valid for the * duration of the event callback, i.e. the next event might reuse the same buffer (with updated contents). * Therefore, if the actual event processing is deferred, the byte buffer would have to be cloned to create an * immutable snapshot of its contents. * * @return The (read-only) byte buffer or {@code null} if not applicable to the event, i.e. if the event type is not * {@link EventType#PROGRESSED}. */ ByteBuffer getDataBuffer(); /** * Gets the number of bytes that have been transferred since the last event. * * @return The number of bytes that have been transferred since the last event, possibly zero but never negative. * @see #getTransferredBytes() */ int getDataLength(); /** * Gets the error that occurred during the transfer. * * @return The error that occurred or {@code null} if none. */ Exception getException(); } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/transfer/TransferListener.java000066400000000000000000000064331167050556700314240ustar00rootroot00000000000000package org.sonatype.aether.transfer; /******************************************************************************* * 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 listener being notified of artifact/metadata transfers from/to remote repositories. The listener may be called from * an arbitrary thread. Reusing common regular expression syntax, the sequence of events is roughly as follows: * *
 * INITIATED ( STARTED PROGRESSED* CORRUPTED? )* ( SUCCEEDED | FAILED )
 * 
* * Note: Implementors are strongly advised to inherit from {@link AbstractTransferListener} instead of directly * implementing this interface. * * @author Benjamin Bentmann */ public interface TransferListener { /** * Notifies the listener about the initiation of a transfer. This event gets fired before any actual network access * to the remote repository. * * @param event The event details, must not be {@code null}. * @throws TransferCancelledException If the transfer should be aborted. */ void transferInitiated( TransferEvent event ) throws TransferCancelledException; /** * Notifies the listener about the start of a data transfer, i.e. the successful connection to the remote * repository. * * @param event The event details, must not be {@code null}. * @throws TransferCancelledException If the transfer should be aborted. */ void transferStarted( TransferEvent event ) throws TransferCancelledException; /** * Notifies the listener about some progress in the data transfer. This event may even be fired if actually zero * bytes have been transferred since the last event, for instance to enable cancellation. * * @param event The event details, must not be {@code null}. * @throws TransferCancelledException If the transfer should be aborted. */ void transferProgressed( TransferEvent event ) throws TransferCancelledException; /** * Notifies the listener that a checksum validation failed. {@link TransferEvent#getException()} will be of type * {@link ChecksumFailureException} and can be used to query further details about the expected/actual checksums. * * @param event The event details, must not be {@code null}. * @throws TransferCancelledException If the transfer should be aborted. */ void transferCorrupted( TransferEvent event ) throws TransferCancelledException; /** * Notifies the listener about the successful completion of a transfer. * * @param event The event details, must not be {@code null}. */ void transferSucceeded( TransferEvent event ); /** * Notifies the listener about the unsuccessful termination of a transfer. {@link TransferEvent#getException()} will * provide further information about the failure. * * @param event The event details, must not be {@code null}. */ void transferFailed( TransferEvent event ); } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/transfer/TransferResource.java000066400000000000000000000047711167050556700314310ustar00rootroot00000000000000package org.sonatype.aether.transfer; /******************************************************************************* * 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 org.sonatype.aether.RequestTrace; /** * Describes a resource being uploaded or downloaded by the repository system. * * @author Benjamin Bentmann */ public interface TransferResource { /** * The base URL of the repository, e.g. "http://repo1.maven.org/maven2/". Unless the URL is unknown, it will be * terminated by a trailing slash. * * @return The base URL of the repository or an empty string if unknown, never {@code null}. */ String getRepositoryUrl(); /** * The path of the resource relative to the repository's base URL, e.g. "org/apache/maven/maven/3.0/maven-3.0.pom". * * @return The path of the resource, never {@code null}. */ String getResourceName(); /** * Gets the local file being uploaded or downloaded. When the repository system merely checks for the existence of a * remote resource, no local file will be involved in the transfer. * * @return The source/target file involved in the transfer or {@code null} if none. */ File getFile(); /** * The size of the resource in bytes. Note that the size of a resource during downloads might be unknown to the * client which is usually the case when transfers employ compression like gzip. In general, the content length is * not known until the transfer has {@link TransferListener#transferStarted(TransferEvent) started}. * * @return The size of the resource in bytes or a negative value if unknown. */ long getContentLength(); /** * Gets the timestamp when the transfer of this resource was started. * * @return The timestamp when the transfer of this resource was started. */ long getTransferStartTime(); /** * Gets the trace information that describes the higher level request/operation during which this resource is * transferred. * * @return The trace information about the higher level operation or {@code null} if none. */ RequestTrace getTrace(); } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/version/000077500000000000000000000000001167050556700251225ustar00rootroot00000000000000InvalidVersionSpecificationException.java000066400000000000000000000023041167050556700352210ustar00rootroot00000000000000aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/versionpackage org.sonatype.aether.version; /******************************************************************************* * 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 when a version or version range could not be parsed. * * @author Benjamin Bentmann */ public class InvalidVersionSpecificationException extends RepositoryException { private final String version; public InvalidVersionSpecificationException( String version, String message ) { super( message ); this.version = version; } public InvalidVersionSpecificationException( String version, Throwable cause ) { super( "Could not parse version specification " + version + getMessage( ": ", cause ), cause ); this.version = version; } public String getVersion() { return version; } } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/version/Version.java000066400000000000000000000014311167050556700274110ustar00rootroot00000000000000package org.sonatype.aether.version; /******************************************************************************* * 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 parsed artifact version. * * @author Benjamin Bentmann */ public interface Version extends Comparable { /** * Gets the original string representation of the version. * * @return The string representation of the version. */ String toString(); } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/version/VersionConstraint.java000066400000000000000000000035161167050556700314640ustar00rootroot00000000000000package org.sonatype.aether.version; /******************************************************************************* * 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; /** * A constraint on versions for a dependency. A constraint can either consist of one or more version ranges or a single * version. In the first case, the constraint expresses a hard requirement on a version matching one of its ranges. In * the second case, the constraint expresses a soft requirement on a specific version (i.e. a recommendation). * * @author Benjamin Bentmann */ public interface VersionConstraint { /** * Gets the version ranges of this constraint. * * @return The version ranges, may be empty but never {@code null}. */ Collection getRanges(); /** * Gets the version recommended by this constraint. * * @return The recommended version or {@code null} if none. */ Version getVersion(); /** * Determines whether the specified version satisfies this constraint. In more detail, a version satisfies this * constraint if it matches at least one version range or if this constraint has no version ranges at all and the * specified version equals the version recommended by the constraint. * * @param version The version to test, must not be {@code null}. * @return {@code true} if the specified version satisfies this constraint, {@code false} otherwise. */ boolean containsVersion( Version version ); } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/version/VersionRange.java000066400000000000000000000016211167050556700303670ustar00rootroot00000000000000package org.sonatype.aether.version; /******************************************************************************* * 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 range of versions. * * @author Benjamin Bentmann */ public interface VersionRange { /** * Determines whether the specified version is contained within this range. * * @param version The version to test, must not be {@code null}. * @return {@code true} if this range contains the specified version, {@code false} otherwise. */ boolean containsVersion( Version version ); } aether-1.13.1/aether-api/src/main/java/org/sonatype/aether/version/VersionScheme.java000066400000000000000000000041411167050556700305370ustar00rootroot00000000000000package org.sonatype.aether.version; /******************************************************************************* * 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 version scheme that handles interpretation of version strings to facilitate their comparison. * * @author Benjamin Bentmann * @author Alin Dreghiciu */ public interface VersionScheme { /** * Parses the specified version string, for example "1.0". * * @param version The version string to parse, must not be {@code null}. * @return The parsed version, never {@code null}. * @throws InvalidVersionSpecificationException If the string violates the syntax rules of this scheme. */ Version parseVersion( String version ) throws InvalidVersionSpecificationException; /** * Parses the specified version range specification, for example "[1.0,2.0)". * * @param range The range specification to parse, must not be {@code null}. * @return The parsed version range, never {@code null}. * @throws InvalidVersionSpecificationException If the range specification violates the syntax rules of this scheme. */ VersionRange parseVersionRange( String range ) throws InvalidVersionSpecificationException; /** * Parses the specified version constraint specification, for example "1.0" or "[1.0,2.0),(2.0,)". * * @param constraint The constraint specification to parse, must not be {@code null}. * @return The parsed version constraint, never {@code null}. * @throws InvalidVersionSpecificationException If the constraint specification violates the syntax rules of this * scheme. */ VersionConstraint parseVersionConstraint( final String constraint ) throws InvalidVersionSpecificationException; } aether-1.13.1/aether-api/src/test/000077500000000000000000000000001167050556700166465ustar00rootroot00000000000000aether-1.13.1/aether-api/src/test/java/000077500000000000000000000000001167050556700175675ustar00rootroot00000000000000aether-1.13.1/aether-api/src/test/java/org/000077500000000000000000000000001167050556700203565ustar00rootroot00000000000000aether-1.13.1/aether-api/src/test/java/org/sonatype/000077500000000000000000000000001167050556700222205ustar00rootroot00000000000000aether-1.13.1/aether-api/src/test/java/org/sonatype/aether/000077500000000000000000000000001167050556700234705ustar00rootroot00000000000000aether-1.13.1/aether-api/src/test/java/org/sonatype/aether/AbstractRepositoryListenerTest.java000066400000000000000000000020341167050556700325430ustar00rootroot00000000000000package 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 static org.junit.Assert.*; import java.lang.reflect.Method; import org.junit.Test; /** * @author Benjamin Bentmann */ public class AbstractRepositoryListenerTest { @Test public void testAllEventTypesHandled() throws Exception { for ( Method method : RepositoryListener.class.getMethods() ) { assertNotNull( AbstractRepositoryListener.class.getDeclaredMethod( method.getName(), method.getParameterTypes() ) ); } } } aether-1.13.1/aether-api/src/test/java/org/sonatype/aether/graph/000077500000000000000000000000001167050556700245715ustar00rootroot00000000000000aether-1.13.1/aether-api/src/test/java/org/sonatype/aether/graph/DependencyTest.java000066400000000000000000000040671167050556700303610ustar00rootroot00000000000000package 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 static org.junit.Assert.*; import java.util.Arrays; import java.util.Collections; import org.junit.Test; import org.sonatype.aether.graph.Dependency; import org.sonatype.aether.graph.Exclusion; /** * @author Benjamin Bentmann */ public class DependencyTest { @Test public void testSetScope() { Dependency d1 = new Dependency( new StubArtifact( "gid:aid:ver" ), "compile" ); Dependency d2 = d1.setScope( null ); assertNotSame( d2, d1 ); assertEquals( "", d2.getScope() ); Dependency d3 = d1.setScope( "test" ); assertNotSame( d3, d1 ); assertEquals( "test", d3.getScope() ); } @Test public void testSetExclusions() { Dependency d1 = new Dependency( new StubArtifact( "gid:aid:ver" ), "compile", false, Collections.singleton( new Exclusion( "g", "a", "c", "e" ) ) ); Dependency d2 = d1.setExclusions( null ); assertNotSame( d2, d1 ); assertEquals( 0, d2.getExclusions().size() ); assertSame( d2, d2.setExclusions( null ) ); assertSame( d2, d2.setExclusions( Collections. emptyList() ) ); assertSame( d2, d2.setExclusions( Collections. emptySet() ) ); assertSame( d1, d1.setExclusions( Arrays.asList( new Exclusion( "g", "a", "c", "e" ) ) ) ); Dependency d3 = d1.setExclusions( Arrays.asList( new Exclusion( "g", "a", "c", "e" ), new Exclusion( "g", "a", "c", "f" ) ) ); assertNotSame( d3, d1 ); assertEquals( 2, d3.getExclusions().size() ); } } aether-1.13.1/aether-api/src/test/java/org/sonatype/aether/graph/StubArtifact.java000066400000000000000000000107441167050556700300350ustar00rootroot00000000000000package 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.io.File; import java.util.Collections; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.sonatype.aether.artifact.Artifact; /** * @author Benjamin Bentmann */ class StubArtifact implements Artifact { private final String groupId; private final String artifactId; private final String version; private final String extension; private final String classifier; private final File file; private final Map properties; public StubArtifact( String coords, Map properties ) { Pattern p = Pattern.compile( "([^: ]+):([^: ]+)(:([^: ]*)(:([^: ]+))?)?:([^: ]+)" ); Matcher m = p.matcher( coords ); if ( !m.matches() ) { throw new IllegalArgumentException( "Bad artifact coordinates" + ", expected format is :[:[:]]:" ); } groupId = m.group( 1 ); artifactId = m.group( 2 ); extension = get( m.group( 4 ), "jar" ); classifier = get( m.group( 6 ), "" ); version = m.group( 7 ); file = null; this.properties = properties; } public StubArtifact( String coords ) { this(coords, Collections.emptyMap()); } private static String get( String value, String defaultValue ) { return ( value == null || value.length() <= 0 ) ? defaultValue : value; } public String getGroupId() { return groupId; } public String getArtifactId() { return artifactId; } public String getVersion() { return version; } public Artifact setVersion( String version ) { throw new UnsupportedOperationException( "not implemented" ); } public String getBaseVersion() { return version; } public boolean isSnapshot() { return getVersion().endsWith( "SNAPSHOT" ); } public String getClassifier() { return classifier; } public String getExtension() { return extension; } public File getFile() { return file; } public Artifact setFile( File file ) { throw new UnsupportedOperationException( "not implemented" ); } public String getProperty( String key, String defaultValue ) { String value = properties.get( key ); return ( value != null ) ? value : defaultValue; } public Map getProperties() { return Collections.unmodifiableMap( properties ); } public Artifact setProperties( Map properties ) { throw new UnsupportedOperationException( "not implemented" ); } @Override public boolean equals( Object obj ) { if ( obj == this ) { return true; } else if ( !( obj instanceof Artifact ) ) { return false; } Artifact that = (Artifact) obj; return getArtifactId().equals( that.getArtifactId() ) && getGroupId().equals( that.getGroupId() ) && getVersion().equals( that.getVersion() ) && getExtension().equals( that.getExtension() ) && getClassifier().equals( that.getClassifier() ) && eq( getFile(), that.getFile() ) && getProperties().equals( that.getProperties() ); } private static boolean eq( T s1, T s2 ) { return s1 != null ? s1.equals( s2 ) : s2 == null; } @Override public int hashCode() { int hash = 17; hash = hash * 31 + getGroupId().hashCode(); hash = hash * 31 + getArtifactId().hashCode(); hash = hash * 31 + getExtension().hashCode(); hash = hash * 31 + getClassifier().hashCode(); hash = hash * 31 + getVersion().hashCode(); hash = hash * 31 + hash( getFile() ); return hash; } private static int hash( Object obj ) { return ( obj != null ) ? obj.hashCode() : 0; } } aether-1.13.1/aether-api/src/test/java/org/sonatype/aether/repository/000077500000000000000000000000001167050556700257075ustar00rootroot00000000000000aether-1.13.1/aether-api/src/test/java/org/sonatype/aether/repository/ProxyTest.java000066400000000000000000000030051167050556700305310ustar00rootroot00000000000000package org.sonatype.aether.repository; /******************************************************************************* * 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 static org.junit.Assert.*; import org.junit.Test; /** * @author Benjamin Bentmann */ public class ProxyTest { @Test public void testSetHost() { Proxy p1 = new Proxy( "type", "host", 80, null ); Proxy p2 = p1.setHost( null ); assertNotSame( p2, p1 ); assertEquals( "", p2.getHost() ); Proxy p3 = p1.setHost( "HOST" ); assertNotSame( p3, p1 ); assertEquals( "HOST", p3.getHost() ); } @Test public void testSetType() { Proxy p1 = new Proxy( "type", "host", 80, null ); Proxy p2 = p1.setType( null ); assertNotSame( p2, p1 ); assertEquals( "", p2.getType() ); Proxy p3 = p1.setType( "TYPE" ); assertNotSame( p3, p1 ); assertEquals( "TYPE", p3.getType() ); } @Test public void testSetPort() { Proxy p1 = new Proxy( "type", "host", 80, null ); Proxy p2 = p1.setPort( 8080 ); assertNotSame( p2, p1 ); assertEquals( 8080, p2.getPort() ); } } aether-1.13.1/aether-api/src/test/java/org/sonatype/aether/repository/RemoteRepositoryTest.java000066400000000000000000000052131167050556700327460ustar00rootroot00000000000000package org.sonatype.aether.repository; /******************************************************************************* * 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 static org.junit.Assert.*; import org.junit.Test; /** * @author Benjamin Bentmann */ public class RemoteRepositoryTest { @Test public void testGetProtocol() { RemoteRepository repo = new RemoteRepository( "id", "type", "" ); assertEquals( "", repo.getProtocol() ); repo = repo.setUrl( "http://localhost" ); assertEquals( "http", repo.getProtocol() ); repo = repo.setUrl( "HTTP://localhost" ); assertEquals( "HTTP", repo.getProtocol() ); repo = repo.setUrl( "dav+http://www.sonatype.org/" ); assertEquals( "dav+http", repo.getProtocol() ); repo = repo.setUrl( "dav:http://www.sonatype.org/" ); assertEquals( "dav:http", repo.getProtocol() ); repo = repo.setUrl( "file:/path" ); assertEquals( "file", repo.getProtocol() ); repo = repo.setUrl( "file:path" ); assertEquals( "file", repo.getProtocol() ); repo = repo.setUrl( "file:C:\\dir" ); assertEquals( "file", repo.getProtocol() ); repo = repo.setUrl( "file:C:/dir" ); assertEquals( "file", repo.getProtocol() ); } @Test public void testGetHost() { RemoteRepository repo = new RemoteRepository( "id", "type", "" ); assertEquals( "", repo.getHost() ); repo = repo.setUrl( "http://localhost" ); assertEquals( "localhost", repo.getHost() ); repo = repo.setUrl( "http://localhost/" ); assertEquals( "localhost", repo.getHost() ); repo = repo.setUrl( "http://localhost:1234/" ); assertEquals( "localhost", repo.getHost() ); repo = repo.setUrl( "http://127.0.0.1" ); assertEquals( "127.0.0.1", repo.getHost() ); repo = repo.setUrl( "http://127.0.0.1/" ); assertEquals( "127.0.0.1", repo.getHost() ); repo = repo.setUrl( "http://user@localhost/path" ); assertEquals( "localhost", repo.getHost() ); repo = repo.setUrl( "http://user:pass@localhost/path" ); assertEquals( "localhost", repo.getHost() ); repo = repo.setUrl( "http://user:pass@localhost:1234/path" ); assertEquals( "localhost", repo.getHost() ); } } aether-1.13.1/aether-api/src/test/java/org/sonatype/aether/transfer/000077500000000000000000000000001167050556700253145ustar00rootroot00000000000000AbstractTransferListenerTest.java000066400000000000000000000020351167050556700337160ustar00rootroot00000000000000aether-1.13.1/aether-api/src/test/java/org/sonatype/aether/transferpackage org.sonatype.aether.transfer; /******************************************************************************* * 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 static org.junit.Assert.*; import java.lang.reflect.Method; import org.junit.Test; /** * @author Benjamin Bentmann */ public class AbstractTransferListenerTest { @Test public void testAllEventTypesHandled() throws Exception { for ( Method method : TransferListener.class.getMethods() ) { assertNotNull( AbstractTransferListener.class.getDeclaredMethod( method.getName(), method.getParameterTypes() ) ); } } } aether-1.13.1/aether-connector-asynchttpclient/000077500000000000000000000000001167050556700215335ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/pom.xml000066400000000000000000000054601167050556700230550ustar00rootroot00000000000000 4.0.0 org.sonatype.aether aether 1.13.1 aether-connector-asynchttpclient Aether :: Connector :: AsyncHttpClient A repository connector implementation based on AsyncHttpClient. org.sonatype.aether aether-api org.sonatype.aether aether-spi org.sonatype.aether aether-util com.ning async-http-client 1.6.5 org.codehaus.plexus plexus-component-annotations provided org.sonatype.aether aether-test-util test org.sonatype.sisu sisu-inject-plexus test org.mortbay.jetty jetty 6.1.25 test org.sonatype.http-testing-harness junit-runner 0.4.1 test org.sonatype.http-testing-harness server-provider 0.4.1 test org.codehaus.mojo animal-sniffer-maven-plugin org.codehaus.plexus plexus-component-metadata aether-1.13.1/aether-connector-asynchttpclient/src/000077500000000000000000000000001167050556700223225ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/main/000077500000000000000000000000001167050556700232465ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/main/java/000077500000000000000000000000001167050556700241675ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/main/java/org/000077500000000000000000000000001167050556700247565ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/main/java/org/sonatype/000077500000000000000000000000001167050556700266205ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/main/java/org/sonatype/aether/000077500000000000000000000000001167050556700300705ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/main/java/org/sonatype/aether/connector/000077500000000000000000000000001167050556700320625ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/main/java/org/sonatype/aether/connector/async/000077500000000000000000000000001167050556700331775ustar00rootroot00000000000000AsyncRepositoryConnector.java000066400000000000000000001645721167050556700410320ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/main/java/org/sonatype/aether/connector/asyncpackage org.sonatype.aether.connector.async; /******************************************************************************* * 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 com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.AsyncHttpProvider; import com.ning.http.client.FluentCaseInsensitiveStringsMap; import com.ning.http.client.HttpResponseBodyPart; import com.ning.http.client.HttpResponseHeaders; import com.ning.http.client.ProxyServer; import com.ning.http.client.ProxyServer.Protocol; import com.ning.http.client.Realm; import com.ning.http.client.Request; import com.ning.http.client.RequestBuilder; import com.ning.http.client.Response; import com.ning.http.client.providers.netty.NettyAsyncHttpProvider; import org.sonatype.aether.ConfigurationProperties; import org.sonatype.aether.RepositoryCache; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.repository.Authentication; import org.sonatype.aether.repository.Proxy; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.repository.RepositoryPolicy; import org.sonatype.aether.spi.connector.ArtifactDownload; import org.sonatype.aether.spi.connector.ArtifactTransfer; import org.sonatype.aether.spi.connector.ArtifactUpload; import org.sonatype.aether.spi.connector.MetadataDownload; import org.sonatype.aether.spi.connector.MetadataTransfer; import org.sonatype.aether.spi.connector.MetadataUpload; import org.sonatype.aether.spi.connector.RepositoryConnector; import org.sonatype.aether.spi.connector.Transfer; import org.sonatype.aether.spi.io.FileProcessor; import org.sonatype.aether.spi.log.Logger; import org.sonatype.aether.transfer.ArtifactNotFoundException; import org.sonatype.aether.transfer.ArtifactTransferException; import org.sonatype.aether.transfer.ChecksumFailureException; import org.sonatype.aether.transfer.MetadataNotFoundException; import org.sonatype.aether.transfer.MetadataTransferException; import org.sonatype.aether.transfer.NoRepositoryConnectorException; import org.sonatype.aether.transfer.TransferEvent; import org.sonatype.aether.transfer.TransferEvent.EventType; import org.sonatype.aether.transfer.TransferEvent.RequestType; import org.sonatype.aether.transfer.TransferListener; import org.sonatype.aether.transfer.TransferResource; import org.sonatype.aether.util.ChecksumUtils; import org.sonatype.aether.util.ConfigUtils; import org.sonatype.aether.util.StringUtils; import org.sonatype.aether.util.layout.MavenDefaultLayout; import org.sonatype.aether.util.layout.RepositoryLayout; import org.sonatype.aether.util.listener.DefaultTransferEvent; import org.sonatype.aether.util.listener.DefaultTransferResource; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.FilenameFilter; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.RandomAccessFile; import java.lang.reflect.InvocationTargetException; import java.net.ConnectException; import java.net.HttpURLConnection; import java.nio.channels.FileLock; import java.nio.channels.OverlappingFileLockException; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.LinkedHashMap; import java.util.Map; import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutionException; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; /** * A repository connector that uses the Async Http Client. * * @author Jeanfrancois Arcand */ class AsyncRepositoryConnector implements RepositoryConnector { private final Logger logger; private final FileProcessor fileProcessor; private final RemoteRepository repository; private final AsyncHttpClient httpClient; private final Map checksumAlgos; private final AtomicBoolean closed = new AtomicBoolean( false ); private final RepositoryLayout layout = new MavenDefaultLayout(); private final TransferListener listener; private final RepositorySystemSession session; private boolean useCache = false; private final boolean disableResumeSupport; private final static ConcurrentHashMap activeDownloadFiles = new ConcurrentHashMap(); private final int maxIOExceptionRetry; private final FluentCaseInsensitiveStringsMap headers; /** * Create an {@link org.sonatype.aether.connector.async.AsyncRepositoryConnector} instance which connect to the * {@link RemoteRepository} * * @param repository the remote repository * @param session the {@link RepositorySystemSession} * @param logger the logger. * @throws NoRepositoryConnectorException */ public AsyncRepositoryConnector( RemoteRepository repository, RepositorySystemSession session, FileProcessor fileProcessor, Logger logger ) throws NoRepositoryConnectorException { this.logger = logger; this.repository = repository; this.listener = session.getTransferListener(); this.fileProcessor = fileProcessor; this.session = session; if ( !"default".equals( repository.getContentType() ) ) { throw new NoRepositoryConnectorException( repository ); } if ( !repository.getProtocol().regionMatches( true, 0, "http", 0, "http".length() ) && !repository.getProtocol().regionMatches( true, 0, "dav", 0, "dav".length() ) ) { throw new NoRepositoryConnectorException( repository ); } AsyncHttpClientConfig config = createConfig( session, repository, true ); httpClient = new AsyncHttpClient( getProvider( session, config ), config ); checksumAlgos = new LinkedHashMap(); checksumAlgos.put( "SHA-1", ".sha1" ); checksumAlgos.put( "MD5", ".md5" ); disableResumeSupport = ConfigUtils.getBoolean( session, false, "aether.connector.ahc.disableResumable" ); maxIOExceptionRetry = ConfigUtils.getInteger( session, 3, "aether.connector.ahc.resumeRetry" ); this.headers = new FluentCaseInsensitiveStringsMap(); Map headers = ConfigUtils.getMap( session, null, ConfigurationProperties.HTTP_HEADERS + "." + repository.getId(), ConfigurationProperties.HTTP_HEADERS ); if ( headers != null ) { for ( Map.Entry entry : headers.entrySet() ) { if ( entry.getKey() instanceof String && entry.getValue() instanceof String ) { this.headers.add( entry.getKey().toString(), entry.getValue().toString() ); } } } } private AsyncHttpProvider getProvider( RepositorySystemSession session, AsyncHttpClientConfig config ) { String className = ConfigUtils.getString( session, "", "aether.connector.ahc.provider" ); if ( className != null && className.length() > 0 ) { if ( "netty".equals( className ) ) { className = "com.ning.http.client.providers.netty.NettyAsyncHttpProvider"; } else if ( "jdk".equals( className ) ) { className = "com.ning.http.client.providers.jdk.JDKAsyncHttpProvider"; } else if ( "apache".equals( className ) ) { className = "com.ning.http.client.providers.apache.ApacheAsyncHttpProvider"; } RepositoryCache cache = session.getCache(); try { if ( cache == null || cache.get( session, className ) == null ) { logger.debug( "Using AHC provider " + className ); Class providerClass = getClass().getClassLoader().loadClass( className ); Object inst = providerClass.getConstructor( AsyncHttpClientConfig.class ).newInstance( config ); return (AsyncHttpProvider) inst; } } catch ( LinkageError e ) { warn( "Could not load AHC provider " + className + ", falling back to default", e ); } catch ( ClassNotFoundException e ) { logger.warn( "Could not load AHC provider " + className + ", falling back to default" ); } catch ( ClassCastException e ) { logger.warn( "Could not load type-compatible AHC provider " + className + ", falling back to default" ); } catch ( Exception e ) { Throwable cause = e; if ( e instanceof InvocationTargetException && e.getCause() != null ) { cause = e.getCause(); } warn( "Could not instantiate AHC provider " + className + ", falling back to default", cause ); } if ( cache != null ) { cache.put( session, className, Boolean.TRUE ); } } return getDefaultProvider( config ); } private AsyncHttpProvider getDefaultProvider( AsyncHttpClientConfig config ) { return new NettyAsyncHttpProvider( config ); } private void warn( String message, Throwable cause ) { String msg = message; if ( cause != null ) { msg += ": " + cause; } if ( logger.isDebugEnabled() ) { logger.warn( msg, cause ); } else { logger.warn( msg ); } } private Realm getRealm( RemoteRepository repository, String credentialEncoding ) { Realm realm = null; Authentication a = repository.getAuthentication(); if ( a != null && a.getUsername() != null ) { realm = new Realm.RealmBuilder().setPrincipal( a.getUsername() ).setPassword( a.getPassword() ).setUsePreemptiveAuth( false ).setEnconding( credentialEncoding ).build(); } return realm; } private ProxyServer getProxy( RemoteRepository repository, String credentialEncoding ) { ProxyServer proxyServer = null; Proxy p = repository.getProxy(); if ( p != null ) { Authentication a = p.getAuthentication(); boolean useSSL = repository.getProtocol().equalsIgnoreCase( "https" ) || repository.getProtocol().equalsIgnoreCase( "dav:https" ); if ( a == null ) { proxyServer = new ProxyServer( useSSL ? Protocol.HTTPS : Protocol.HTTP, p.getHost(), p.getPort() ); } else { proxyServer = new ProxyServer( useSSL ? Protocol.HTTPS : Protocol.HTTP, p.getHost(), p.getPort(), a.getUsername(), a.getPassword() ); proxyServer.setEncoding( credentialEncoding ); } } return proxyServer; } /** * Create an {@link AsyncHttpClientConfig} instance based on the values from {@link RepositorySystemSession} * * @param session {link RepositorySystemSession} * @return a configured instance of */ private AsyncHttpClientConfig createConfig( RepositorySystemSession session, RemoteRepository repository, boolean useCompression ) { AsyncHttpClientConfig.Builder configBuilder = new AsyncHttpClientConfig.Builder(); String userAgent = ConfigUtils.getString( session, ConfigurationProperties.DEFAULT_USER_AGENT, ConfigurationProperties.USER_AGENT ); if ( !StringUtils.isEmpty( userAgent ) ) { configBuilder.setUserAgent( userAgent ); } int connectTimeout = ConfigUtils.getInteger( session, ConfigurationProperties.DEFAULT_CONNECT_TIMEOUT, ConfigurationProperties.CONNECT_TIMEOUT ); String credentialEncoding = ConfigUtils.getString( session, ConfigurationProperties.DEFAULT_HTTP_CREDENTIAL_ENCODING, ConfigurationProperties.HTTP_CREDENTIAL_ENCODING + "." + repository.getId(), ConfigurationProperties.HTTP_CREDENTIAL_ENCODING ); configBuilder.setConnectionTimeoutInMs( connectTimeout ); configBuilder.setCompressionEnabled( useCompression ); configBuilder.setFollowRedirects( true ); configBuilder.setMaxRequestRetry( 0 ); configBuilder.setRequestTimeoutInMs( ConfigUtils.getInteger( session, ConfigurationProperties.DEFAULT_REQUEST_TIMEOUT, ConfigurationProperties.REQUEST_TIMEOUT ) ); configBuilder.setProxyServer( getProxy( repository, credentialEncoding ) ); configBuilder.setRealm( getRealm( repository, credentialEncoding ) ); return configBuilder.build(); } private void await( CountDownLatch latch ) { boolean interrupted = false; while ( latch.getCount() > 0 ) { try { latch.await(); } catch ( InterruptedException e ) { interrupted = true; } } if ( interrupted ) { Thread.currentThread().interrupt(); } } /** * Use the async http client library to download artifacts and metadata. * * @param artifactDownloads The artifact downloads to perform, may be {@code null} or empty. * @param metadataDownloads The metadata downloads to perform, may be {@code null} or empty. */ public void get( Collection artifactDownloads, Collection metadataDownloads ) { if ( closed.get() ) { throw new IllegalStateException( "connector closed" ); } artifactDownloads = safe( artifactDownloads ); metadataDownloads = safe( metadataDownloads ); CountDownLatch latch = new CountDownLatch( artifactDownloads.size() + metadataDownloads.size() ); Collection> tasks = new ArrayList>(); for ( MetadataDownload download : metadataDownloads ) { String resource = layout.getPath( download.getMetadata() ).getPath(); GetTask task = new GetTask( resource, download.getFile(), download.getChecksumPolicy(), latch, download, METADATA, false ); tasks.add( task ); task.run(); } for ( ArtifactDownload download : artifactDownloads ) { String resource = layout.getPath( download.getArtifact() ).getPath(); GetTask task = new GetTask( resource, download.isExistenceCheck() ? null : download.getFile(), download.getChecksumPolicy(), latch, download, ARTIFACT, true ); tasks.add( task ); task.run(); } await( latch ); for ( GetTask task : tasks ) { task.flush(); } } /** * Use the async http client library to upload artifacts and metadata. * * @param artifactUploads The artifact uploads to perform, may be {@code null} or empty. * @param metadataUploads The metadata uploads to perform, may be {@code null} or empty. */ public void put( Collection artifactUploads, Collection metadataUploads ) { if ( closed.get() ) { throw new IllegalStateException( "connector closed" ); } artifactUploads = safe( artifactUploads ); metadataUploads = safe( metadataUploads ); CountDownLatch latch = new CountDownLatch( artifactUploads.size() + metadataUploads.size() ); Collection> tasks = new ArrayList>(); for ( ArtifactUpload upload : artifactUploads ) { String path = layout.getPath( upload.getArtifact() ).getPath(); PutTask task = new PutTask( path, upload.getFile(), latch, upload, ARTIFACT ); tasks.add( task ); task.run(); } for ( MetadataUpload upload : metadataUploads ) { String path = layout.getPath( upload.getMetadata() ).getPath(); PutTask task = new PutTask( path, upload.getFile(), latch, upload, METADATA ); tasks.add( task ); task.run(); } await( latch ); for ( PutTask task : tasks ) { task.flush(); } } private void handleResponseCode( String url, int responseCode, String responseMsg ) throws AuthorizationException, ResourceDoesNotExistException, TransferException { if ( responseCode == HttpURLConnection.HTTP_NOT_FOUND ) { throw new ResourceDoesNotExistException( String.format( "Unable to locate resource %s. Error code %s", url, responseCode ) ); } if ( responseCode == HttpURLConnection.HTTP_FORBIDDEN || responseCode == HttpURLConnection.HTTP_UNAUTHORIZED || responseCode == HttpURLConnection.HTTP_PROXY_AUTH ) { throw new AuthorizationException( String.format( "Access denied to %s. Error code %s, %s", url, responseCode, responseMsg ) ); } if ( responseCode >= HttpURLConnection.HTTP_MULT_CHOICE ) { throw new TransferException( String.format( "Failed to transfer %s. Error code %s, %s", url, responseCode, responseMsg ) ); } } private TransferEvent newEvent( TransferResource resource, Exception e, TransferEvent.RequestType requestType, TransferEvent.EventType eventType ) { DefaultTransferEvent event = new DefaultTransferEvent(); event.setResource( resource ); event.setRequestType( requestType ); event.setType( eventType ); event.setException( e ); return event; } class GetTask implements Runnable { private final T download; private final String path; private final File file; private final String checksumPolicy; private final LatchGuard latch; private volatile Exception exception; private final ExceptionWrapper wrapper; private final AtomicBoolean deleteFile = new AtomicBoolean( true ); private final boolean allowResumable; public GetTask( String path, File file, String checksumPolicy, CountDownLatch latch, T download, ExceptionWrapper wrapper, boolean allowResumable ) { this.path = path; this.file = file; this.checksumPolicy = checksumPolicy; this.allowResumable = allowResumable; this.latch = new LatchGuard( latch ); this.download = download; this.wrapper = wrapper; } public T getDownload() { return download; } public Exception getException() { return exception; } public void run() { download.setState( Transfer.State.ACTIVE ); final String uri = validateUri( path ); final DefaultTransferResource transferResource = new DefaultTransferResource( repository.getUrl(), path, file, download.getTrace() ); final boolean ignoreChecksum = RepositoryPolicy.CHECKSUM_POLICY_IGNORE.equals( checksumPolicy ); CompletionHandler completionHandler = null; final FileLockCompanion fileLockCompanion = ( file != null ) ? createOrGetTmpFile( file.getPath(), allowResumable ) : new FileLockCompanion( null, null ); try { long length = 0; if ( fileLockCompanion.getFile() != null ) { fileProcessor.mkdirs( fileLockCompanion.getFile().getParentFile() ); } // Position the file to the end in case we are resuming an aborded download. final RandomAccessFile resumableFile = fileLockCompanion.getFile() == null ? null : new RandomAccessFile( fileLockCompanion.getFile(), "rw" ); if ( resumableFile != null ) { length = resumableFile.length(); } FluentCaseInsensitiveStringsMap headers = new FluentCaseInsensitiveStringsMap(); if ( !useCache ) { headers.add( "Pragma", "no-cache" ); } headers.add( "Accept", "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" ); headers.replaceAll( AsyncRepositoryConnector.this.headers ); Request request = null; final AtomicInteger maxRequestTry = new AtomicInteger(); AsyncHttpClient client = httpClient; final AtomicBoolean closeOnComplete = new AtomicBoolean( false ); /** * If length > 0, it means we are resuming a interrupted download. If that's the case, * we can't re-use the current httpClient because compression is enabled, and supporting * compression per request is not supported in ahc and may never has it could have * a performance impact. */ if ( length > 0 ) { AsyncHttpClientConfig config = createConfig( session, repository, false ); client = new AsyncHttpClient( new NettyAsyncHttpProvider( config ) ); request = client.prepareGet( uri ).setRangeOffset( length ).setHeaders( headers ).build(); closeOnComplete.set( true ); } else { request = httpClient.prepareGet( uri ).setHeaders( headers ).build(); } final Request activeRequest = request; final AsyncHttpClient activeHttpClient = client; completionHandler = new CompletionHandler( transferResource, httpClient, logger, RequestType.GET ) { private final AtomicBoolean handleTmpFile = new AtomicBoolean( true ); private final AtomicBoolean localException = new AtomicBoolean ( false ); /** * {@inheritDoc} */ @Override public STATE onHeadersReceived( final HttpResponseHeaders headers ) throws Exception { FluentCaseInsensitiveStringsMap h = headers.getHeaders(); String rangeByteValue = h.getFirstValue( "Content-Range" ); // Make sure the server acceptance of the range requests headers if ( rangeByteValue != null && rangeByteValue.compareToIgnoreCase( "none" ) != 0 ) { resumableFile.seek( resumableFile.length() ); } else { resumableFile.seek( 0 ); } return super.onHeadersReceived( headers ); } @Override public void onThrowable( Throwable t ) { boolean resume = false; try { logger.debug("onThrowable", t); /** * If an IOException occurs, let's try to resume the request based on how much bytes has * been so far downloaded. Fail after IOException. */ try { if ( !disableResumeSupport && !localException.get() && maxRequestTry.get() < maxIOExceptionRetry && isResumeWorthy( t ) ) { logger.debug( "Trying to recover from an IOException " + activeRequest ); maxRequestTry.incrementAndGet(); Request newRequest = new RequestBuilder( activeRequest ).setRangeOffset( resumableFile.length() ).build(); activeHttpClient.executeRequest( newRequest, this ); resume = true; return; } } catch ( Throwable rt ) { logger.warn( "Could not resume download", rt ); } localException.set( false ); if ( Exception.class.isAssignableFrom( t.getClass() ) ) { exception = Exception.class.cast( t ); } else { exception = new Exception( t ); } if ( closeOnComplete.get() ) { activeHttpClient.close(); } super.onThrowable( t ); fireTransferFailed(); } catch ( Throwable ex ) { logger.warn( "Unexpected exception", ex ); } finally { if ( resume ) { return; } if ( resumableFile != null ) { try { resumableFile.close(); } catch ( IOException ex ) { } } deleteFile( fileLockCompanion ); latch.countDown(); removeListeners(); } } private void removeListeners() { removeTransferListener( listener ); } public STATE onBodyPartReceived( final HttpResponseBodyPart content ) throws Exception { if ( status() != null && ( status().getStatusCode() == 200 || status().getStatusCode() == 206 ) ) { byte[] bytes = content.getBodyPartBytes(); try { resumableFile.write( bytes ); } catch ( IOException ex ) { logger.debug("onBodyPartReceived", ex); exception = ex; localException.set(true); throw ex; } } return super.onBodyPartReceived( content ); } @Override public Response onCompleted( Response r ) throws Exception { try { deleteFile.set( true ); try { resumableFile.close(); } catch ( IOException ex ) { } final Response response = super.onCompleted( r ); handleResponseCode( uri, response.getStatusCode(), response.getStatusText() ); if ( !ignoreChecksum ) { activeHttpClient.getConfig().executorService().execute( new Runnable() { public void run() { try { try { Map checksums = ChecksumUtils.calc( fileLockCompanion.getFile(), checksumAlgos.keySet() ); if ( !verifyChecksum( file, uri, (String) checksums.get( "SHA-1" ), ".sha1" ) && !verifyChecksum( file, uri, (String) checksums.get( "MD5" ), ".md5" ) ) { throw new ChecksumFailureException( "Checksum validation failed" + ", no checksums available from the repository" ); } } catch ( ChecksumFailureException e ) { if ( RepositoryPolicy.CHECKSUM_POLICY_FAIL.equals( checksumPolicy ) ) { throw e; } if ( listener != null ) { listener.transferCorrupted( newEvent( transferResource, e, RequestType.GET, EventType.CORRUPTED ) ); } } } catch ( Exception ex ) { exception = ex; } finally { if ( exception == null ) { try { rename( fileLockCompanion.getFile(), file ); releaseLock( fileLockCompanion ); } catch ( IOException e ) { exception = e; } } else { deleteFile( fileLockCompanion ); } latch.countDown(); if ( closeOnComplete.get() ) { activeHttpClient.close(); } } } } ); } else { rename( fileLockCompanion.getFile(), file ); releaseLock( fileLockCompanion ); handleTmpFile.set( false ); // asyncHttpClient.close may takes time before all connections get closed. // We unlatch first. latch.countDown(); if ( closeOnComplete.get() ) { activeHttpClient.close(); } } removeListeners(); return response; } catch ( Exception ex ) { exception = ex; localException.set(true); throw ex; } finally { try { if ( handleTmpFile.get() && fileLockCompanion.getFile() != null ) { if ( exception != null ) { deleteFile( fileLockCompanion ); } else if ( ignoreChecksum ) { rename( fileLockCompanion.getFile(), file ); releaseLock( fileLockCompanion ); } } } catch ( IOException ex ) { exception = ex; } } } }; try { if ( file == null ) { if ( !resourceExist( uri ) ) { throw new ResourceDoesNotExistException( "Could not find " + uri + " in " + repository.getUrl() ); } latch.countDown(); } else { if ( listener != null ) { completionHandler.addTransferListener( listener ); listener.transferInitiated( newEvent( transferResource, null, RequestType.GET, EventType.INITIATED ) ); } activeHttpClient.executeRequest( request, completionHandler ); } } catch ( Exception ex ) { try { if ( resumableFile != null ) { resumableFile.close(); } } catch ( IOException ex2 ) { } deleteFile( fileLockCompanion ); exception = ex; latch.countDown(); } } catch ( Throwable t ) { deleteFile( fileLockCompanion ); try { if ( Exception.class.isAssignableFrom( t.getClass() ) ) { exception = Exception.class.cast( t ); } else { exception = new Exception( t ); } if ( listener != null ) { listener.transferFailed( newEvent( transferResource, exception, RequestType.GET, EventType.FAILED ) ); } } finally { latch.countDown(); } } } private boolean isResumeWorthy( Throwable t ) { if ( t instanceof IOException ) { if ( t instanceof ConnectException ) { return false; } return true; } return false; } private void deleteFile( FileLockCompanion fileLockCompanion ) { if ( fileLockCompanion.getFile() != null && deleteFile.get() ) { releaseLock( fileLockCompanion ); activeDownloadFiles.remove( fileLockCompanion.getFile() ); fileLockCompanion.getFile().delete(); } } private boolean verifyChecksum( File file, String path, String actual, String ext ) throws ChecksumFailureException { File tmp = getTmpFile( file.getPath() + ext ); try { try { Response response = httpClient.prepareGet( path + ext ).setHeaders( headers ).execute().get(); if ( response.getStatusCode() == HttpURLConnection.HTTP_NOT_FOUND ) { return false; } OutputStream fs = new BufferedOutputStream( new FileOutputStream( tmp ) ); try { InputStream is = response.getResponseBodyAsStream(); final byte[] buffer = new byte[4 * 1024]; int n = 0; while ( -1 != ( n = is.read( buffer ) ) ) { fs.write( buffer, 0, n ); } fs.flush(); } finally { fs.close(); } } catch ( Exception ex ) { throw new ChecksumFailureException( ex ); } String expected; try { expected = ChecksumUtils.read( tmp ); } catch ( IOException e ) { throw new ChecksumFailureException( e ); } if ( expected.equalsIgnoreCase( actual ) ) { try { rename( tmp, new File( file.getPath() + ext ) ); } catch ( IOException e ) { // ignored, non-critical } } else { throw new ChecksumFailureException( expected, actual ); } } finally { tmp.delete(); } return true; } public void flush() { wrapper.wrap( download, exception, repository ); download.setState( Transfer.State.DONE ); } private void rename( File from, File to ) throws IOException { fileProcessor.move( from, to ); } } class PutTask implements Runnable { private final T upload; private final ExceptionWrapper wrapper; private final String path; private final File file; private volatile Exception exception; private final LatchGuard latch; public PutTask( String path, File file, CountDownLatch latch, T upload, ExceptionWrapper wrapper ) { this.path = path; this.file = file; this.upload = upload; this.wrapper = wrapper; this.latch = new LatchGuard( latch ); } public Exception getException() { return exception; } public void run() { upload.setState( Transfer.State.ACTIVE ); final DefaultTransferResource transferResource = new DefaultTransferResource( repository.getUrl(), path, file, upload.getTrace() ); try { final String uri = validateUri( path ); final CompletionHandler completionHandler = new CompletionHandler( transferResource, httpClient, logger, RequestType.PUT ) { @Override public void onThrowable( Throwable t ) { try { super.onThrowable( t ); if ( Exception.class.isAssignableFrom( t.getClass() ) ) { exception = Exception.class.cast( t ); } else { exception = new Exception( t ); } if ( listener != null ) { listener.transferFailed( newEvent( transferResource, exception, RequestType.PUT, EventType.FAILED ) ); } } finally { latch.countDown(); } } @Override public Response onCompleted( Response r ) throws Exception { try { Response response = super.onCompleted( r ); handleResponseCode( uri, response.getStatusCode(), response.getStatusText() ); httpClient.getConfig().executorService().execute( new Runnable() { public void run() { try { uploadChecksums( file, uri ); } catch ( Exception ex ) { exception = ex; } finally { latch.countDown(); } } } ); return r; } catch ( Exception ex ) { exception = ex; throw ex; } } }; if ( listener != null ) { completionHandler.addTransferListener( listener ); listener.transferInitiated( newEvent( transferResource, null, RequestType.PUT, EventType.INITIATED ) ); } if ( file == null ) { throw new IllegalArgumentException( "no source file specified for upload" ); } transferResource.setContentLength( file.length() ); httpClient.preparePut( uri ).setHeaders( headers ).setBody( new ProgressingFileBodyGenerator( file, completionHandler ) ).execute( completionHandler ); } catch ( Exception e ) { try { if ( listener != null ) { listener.transferFailed( newEvent( transferResource, e, RequestType.PUT, EventType.FAILED ) ); } exception = e; } finally { latch.countDown(); } } } public void flush() { wrapper.wrap( upload, exception, repository ); upload.setState( Transfer.State.DONE ); } private void uploadChecksums( File file, String path ) { try { Map checksums = ChecksumUtils.calc( file, checksumAlgos.keySet() ); for ( Map.Entry entry : checksums.entrySet() ) { uploadChecksum( file, path, entry.getKey(), entry.getValue() ); } } catch ( IOException e ) { logger.debug( "Failed to upload checksums for " + file + ": " + e.getMessage(), e ); } } private void uploadChecksum( File file, String path, String algo, Object checksum ) { try { if ( checksum instanceof Exception ) { throw (Exception) checksum; } String ext = checksumAlgos.get( algo ); // Here we go blocking as this is a simple request. Response response = httpClient.preparePut( path + ext ).setHeaders( headers ).setBody( String.valueOf( checksum ) ).execute().get(); if ( response == null || response.getStatusCode() >= HttpURLConnection.HTTP_BAD_REQUEST ) { throw new TransferException( String.format( "Checksum failed for %s with status code %s", path + ext, response == null ? HttpURLConnection.HTTP_INTERNAL_ERROR : response.getStatusCode() ) ); } } catch ( Exception e ) { logger.debug( "Failed to upload " + algo + " checksum for " + file + ": " + e.getMessage(), e ); } } } /** * Builds a complete URL string from the repository URL and the relative path passed. * * @param path the relative path * @return the complete URL */ private String buildUrl( String path ) { final String repoUrl = repository.getUrl(); path = path.replace( ' ', '+' ); if ( repoUrl.charAt( repoUrl.length() - 1 ) != '/' ) { return repoUrl + '/' + path; } return repoUrl + path; } private String validateUri( String path ) { String tmpUri = buildUrl( path ); // If we get dav request here, switch to http as no need for dav method. String dav = "dav"; String davHttp = "dav:http"; if ( tmpUri.startsWith( dav ) ) { if ( tmpUri.startsWith( davHttp ) ) { tmpUri = tmpUri.substring( dav.length() + 1 ); } else { tmpUri = "http" + tmpUri.substring( dav.length() ); } } return tmpUri; } private boolean resourceExist( String url ) throws IOException, ExecutionException, InterruptedException, TransferException, AuthorizationException { int statusCode = httpClient.prepareHead( url ).setHeaders( headers ).execute().get().getStatusCode(); switch ( statusCode ) { case HttpURLConnection.HTTP_OK: return true; case HttpURLConnection.HTTP_FORBIDDEN: throw new AuthorizationException( String.format( "Access denied to %s . Status code %s", url, statusCode ) ); case HttpURLConnection.HTTP_NOT_FOUND: return false; case HttpURLConnection.HTTP_UNAUTHORIZED: throw new AuthorizationException( String.format( "Access denied to %s . Status code %s", url, statusCode ) ); default: throw new TransferException( "Failed to look for file: " + buildUrl( url ) + ". Return code is: " + statusCode ); } } static interface ExceptionWrapper { void wrap( T transfer, Exception e, RemoteRepository repository ); } public void close() { closed.set( true ); httpClient.close(); } private Collection safe( Collection items ) { return ( items != null ) ? items : Collections.emptyList(); } /** * Create a {@link FileLockCompanion} containing a reference to a temporary {@link File} used when downloading * a remote file. If a local and incomplete version of a file is available, use that file and resume bytes downloading. * To prevent multiple process trying to resume the same file, a {@link FileLock} companion to the tmeporary file is * created and used to prevent concurrency issue. * * @param path The downloaded path * @param allowResumable Allow resumable download, or not. * @return */ private FileLockCompanion createOrGetTmpFile( String path, boolean allowResumable ) { if ( !disableResumeSupport && allowResumable ) { File f = new File( path ); File parentFile = f.getParentFile(); if ( parentFile.isDirectory() ) { for ( File tmpFile : parentFile.listFiles( new FilenameFilter() { public boolean accept( File dir, String name ) { if ( name.indexOf( "." ) > 0 && name.lastIndexOf( "." ) == name.indexOf( ".ahc" ) ) { return true; } return false; } } ) ) { if ( tmpFile.length() > 0 ) { String realPath = tmpFile.getPath().substring( 0, tmpFile.getPath().lastIndexOf( "." ) ); FileLockCompanion fileLockCompanion = null; if ( realPath.equals( path ) ) { File newFile = tmpFile; synchronized ( activeDownloadFiles ) { fileLockCompanion = lockFile( tmpFile ); logger.debug( String.format( "Found an incomplete download for file %s.", path ) ); if ( fileLockCompanion.getLock() == null ) { /** * Lock failed so we need to regenerate a new tmp file. */ newFile = getTmpFile( path ); fileLockCompanion = lockFile( newFile ); } return fileLockCompanion; } } } } } } return new FileLockCompanion( getTmpFile( path ), null ); } /** * Simple placeholder for a File and it's associated lock. */ private static class FileLockCompanion { private final File file; private final FileLock lock; private final String lockPathName; public FileLockCompanion( File file, FileLock lock ) { this.file = file; this.lock = lock; this.lockPathName = null; } public FileLockCompanion( File file, FileLock lock, String lockPathName ) { this.file = file; this.lock = lock; this.lockPathName = lockPathName; } public File getFile() { return file; } public FileLock getLock() { return lock; } public String getLockedPathFile() { return lockPathName; } } /** * Create a temporary file used to lock ({@link FileLock}) an associated incomplete file {@link File}. The {@link FileLock}'s name * is derived from the original file, appending ".lock" at the end. Usually this method gets executed when a * download fail to complete because the JVM goes down. In that case we resume the incomplete download and to prevent * multiple process to work on the same file, we use a dedicated {@link FileLock}. * * @param tmpFile a file on which we want to create a temporary lock file. * @return a {@link FileLockCompanion} contains the {@link File} and a {@link FileLock} if it was possible to lock the file. */ private FileLockCompanion lockFile( File tmpFile ) { try { // On Unix tmpLock.getChannel().tryLock may not fail inside the same process, so we must keep track // of current resumable file. if ( activeDownloadFiles.containsKey( tmpFile ) ) { return new FileLockCompanion( tmpFile, null ); } RandomAccessFile tmpLock = new RandomAccessFile( tmpFile.getPath() + ".lock", "rw" ); FileLock lock = tmpLock.getChannel().tryLock( 0, 1, false ); if ( lock != null ) { activeDownloadFiles.put( tmpLock, Boolean.TRUE ); } else if ( lock == null ) { try { tmpLock.close(); } catch ( IOException ex ) { } } return new FileLockCompanion( tmpFile, lock, tmpFile.getPath() + ".lock" ); } catch ( OverlappingFileLockException ex ) { return new FileLockCompanion( tmpFile, null ); } catch ( IOException ex ) { return new FileLockCompanion( tmpFile, null ); } } private void releaseLock( FileLockCompanion fileLockCompanion ) { try { if ( fileLockCompanion.getLock() != null ) { try { fileLockCompanion.getLock().channel().close(); fileLockCompanion.getLock().release(); } finally { if ( fileLockCompanion.getLockedPathFile() != null ) { new File( fileLockCompanion.getLockedPathFile() ).delete(); } } } } catch ( IOException e ) { // Ignore. } } private File getTmpFile( String path ) { File file; do { file = new File( path + ".ahc" + UUID.randomUUID().toString().replace( "-", "" ).substring( 0, 16 ) ); } while ( file.exists() ); return file; } private static final ExceptionWrapper METADATA = new ExceptionWrapper() { public void wrap( MetadataTransfer transfer, Exception e, RemoteRepository repository ) { MetadataTransferException ex = null; if ( e instanceof ResourceDoesNotExistException ) { ex = new MetadataNotFoundException( transfer.getMetadata(), repository ); } else if ( e != null ) { ex = new MetadataTransferException( transfer.getMetadata(), repository, e ); } transfer.setException( ex ); } }; private static final ExceptionWrapper ARTIFACT = new ExceptionWrapper() { public void wrap( ArtifactTransfer transfer, Exception e, RemoteRepository repository ) { ArtifactTransferException ex = null; if ( e instanceof ResourceDoesNotExistException ) { ex = new ArtifactNotFoundException( transfer.getArtifact(), repository ); } else if ( e != null ) { ex = new ArtifactTransferException( transfer.getArtifact(), repository, e ); } transfer.setException( ex ); } }; private class LatchGuard { private final CountDownLatch latch; private final AtomicBoolean done = new AtomicBoolean( false ); public LatchGuard( CountDownLatch latch ) { this.latch = latch; } public void countDown() { if ( !done.getAndSet( true ) ) { latch.countDown(); } } } } AsyncRepositoryConnectorFactory.java000066400000000000000000000070521167050556700423470ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/main/java/org/sonatype/aether/connector/asyncpackage org.sonatype.aether.connector.async; /******************************************************************************* * 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.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.component.annotations.Requirement; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.spi.connector.RepositoryConnector; import org.sonatype.aether.spi.connector.RepositoryConnectorFactory; import org.sonatype.aether.spi.io.FileProcessor; import org.sonatype.aether.spi.locator.Service; import org.sonatype.aether.spi.locator.ServiceLocator; import org.sonatype.aether.spi.log.Logger; import org.sonatype.aether.spi.log.NullLogger; import org.sonatype.aether.transfer.NoRepositoryConnectorException; /** * A repository connector factory that uses Async Http Client for the transfers. * * @author Jeanfrancois Arcand */ @Component( role = RepositoryConnectorFactory.class, hint = "async-http" ) public class AsyncRepositoryConnectorFactory implements RepositoryConnectorFactory, Service { @Requirement private Logger logger = NullLogger.INSTANCE; @Requirement private FileProcessor fileProcessor; private int priority = 100; public AsyncRepositoryConnectorFactory() { } public AsyncRepositoryConnectorFactory( Logger logger, FileProcessor fileProcessor ) { setLogger( logger ); setFileProcessor( fileProcessor ); } public void initService( ServiceLocator locator ) { setLogger( locator.getService( Logger.class ) ); setFileProcessor( locator.getService( FileProcessor.class ) ); } /** * Sets the logger to use for this component. * * @param logger The logger to use, may be {@code null} to disable logging. * @return This component for chaining, never {@code null}. */ public AsyncRepositoryConnectorFactory setLogger( Logger logger ) { this.logger = ( logger != null ) ? logger : NullLogger.INSTANCE; return this; } /** * Sets the file processor to use for this component. * * @param fileProcessor The file processor to use, must not be {@code null}. * @return This component for chaining, never {@code null}. */ public AsyncRepositoryConnectorFactory setFileProcessor( FileProcessor fileProcessor ) { if ( fileProcessor == null ) { throw new IllegalArgumentException( "file processor has not been specified" ); } this.fileProcessor = fileProcessor; return this; } public int getPriority() { return priority; } /** * Sets the priority of this component. * * @param priority The priority. * @return This component for chaining, never {@code null}. */ public AsyncRepositoryConnectorFactory setPriority( int priority ) { this.priority = priority; return this; } public RepositoryConnector newInstance( RepositorySystemSession session, RemoteRepository repository ) throws NoRepositoryConnectorException { return new AsyncRepositoryConnector( repository, session, fileProcessor, logger ); } } AuthorizationException.java000066400000000000000000000014151167050556700405030ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/main/java/org/sonatype/aether/connector/asyncpackage org.sonatype.aether.connector.async; /******************************************************************************* * 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 *******************************************************************************/ class AuthorizationException extends Exception { public AuthorizationException( final String message ) { super( message ); } public AuthorizationException( final String message, final Throwable cause ) { super( message, cause ); } } CompletionHandler.java000066400000000000000000000251731167050556700374020ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/main/java/org/sonatype/aether/connector/asyncpackage org.sonatype.aether.connector.async; /******************************************************************************* * 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 com.ning.http.client.AsyncHandler; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.HttpResponseBodyPart; import com.ning.http.client.HttpResponseHeaders; import com.ning.http.client.HttpResponseStatus; import com.ning.http.client.ProgressAsyncHandler; import com.ning.http.client.Response; import org.sonatype.aether.spi.log.Logger; import org.sonatype.aether.transfer.TransferCancelledException; import org.sonatype.aether.transfer.TransferEvent; import org.sonatype.aether.transfer.TransferListener; import org.sonatype.aether.transfer.TransferResource; import org.sonatype.aether.util.listener.DefaultTransferResource; import java.io.IOException; import java.net.HttpURLConnection; import java.nio.ByteBuffer; import java.util.Collections; import java.util.Iterator; import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicReference; /** * An {@link AsyncHandler} for handling asynchronous download an upload. * * @author Jeanfrancois Arcand */ class CompletionHandler implements ProgressAsyncHandler { private final Logger logger; private HttpResponseStatus status; private HttpResponseHeaders headers; private final ConcurrentLinkedQueue listeners = new ConcurrentLinkedQueue(); private final AsyncHttpClient httpClient; private final AtomicLong byteTransfered = new AtomicLong(); private final AtomicReference exception = new AtomicReference(); private final DefaultTransferResource transferResource; private final TransferEvent.RequestType requestType; public CompletionHandler( DefaultTransferResource transferResource, AsyncHttpClient httpClient, Logger logger, TransferEvent.RequestType requestType ) { this.httpClient = httpClient; this.transferResource = transferResource; this.logger = logger; this.requestType = requestType; } public STATE onHeaderWriteCompleted() { if ( TransferEvent.RequestType.PUT.equals( requestType ) ) { byteTransfered.set( 0 ); try { fireTransferStarted(); } catch ( TransferCancelledException e ) { return STATE.ABORT; } } return STATE.CONTINUE; } public STATE onContentWriteCompleted() { return STATE.CONTINUE; } public STATE onContentWriteProgress( long amount, long current, long total ) { return STATE.CONTINUE; } /** * {@inheritDoc} */ /* @Override */ public STATE onBodyPartReceived( final HttpResponseBodyPart content ) throws Exception { try { fireTransferProgressed( content.getBodyPartBytes() ); } catch ( TransferCancelledException e ) { return STATE.ABORT; } catch ( Exception ex ) { if ( logger.isDebugEnabled() ) { logger.debug( "", ex ); } } return STATE.CONTINUE; } /** * {@inheritDoc} */ /* @Override */ public STATE onStatusReceived( final HttpResponseStatus status ) throws Exception { this.status = status; return ( status.getStatusCode() == HttpURLConnection.HTTP_NOT_FOUND ? STATE.ABORT : STATE.CONTINUE ); } /** * {@inheritDoc} */ /* @Override */ public STATE onHeadersReceived( final HttpResponseHeaders headers ) throws Exception { this.headers = headers; if ( !TransferEvent.RequestType.PUT.equals( requestType ) ) { if ( status.getStatusCode() >= 200 && status.getStatusCode() < 300 ) { try { transferResource.setContentLength( Long.parseLong( headers.getHeaders().getFirstValue( "Content-Length" ) ) ); } catch ( RuntimeException e ) { // oh well, no parsable content length } try { fireTransferStarted(); } catch ( TransferCancelledException e ) { return STATE.ABORT; } } } return STATE.CONTINUE; } /** * {@inheritDoc} */ /* @Override */ public final Response onCompleted() throws Exception { // The connection has timed out if ( status == null ) { throw new TransferException( "Invalid AHC State. Response will possibly gets corrupted." ); } return onCompleted( httpClient.getProvider().prepareResponse( status, headers, Collections. emptyList() ) ); } /** * {@inheritDoc} */ /* @Override */ public void onThrowable( Throwable t ) { exception.set( t ); } /** * Invoked once the HTTP response has been fully read. * * @param response The {@link com.ning.http.client.Response} * @return Type of the value that will be returned by the associated {@link java.util.concurrent.Future} */ public Response onCompleted( Response response ) throws Exception { if ( response != null && response.hasResponseStatus() && response.getStatusCode() >= HttpURLConnection.HTTP_OK && response.getStatusCode() <= HttpURLConnection.HTTP_CREATED ) { fireTransferSucceeded( response ); } return response; } void fireTransferProgressed( final byte[] buffer ) throws TransferCancelledException { fireTransferProgressed( ByteBuffer.wrap( buffer ) ); } void fireTransferProgressed( final ByteBuffer buffer ) throws TransferCancelledException { final long bytesTransferred = byteTransfered.addAndGet( buffer.remaining() ); final TransferEvent transferEvent = new AsyncTransferEvent() { public EventType getType() { return TransferEvent.EventType.PROGRESSED; } public long getTransferredBytes() { return bytesTransferred; } public ByteBuffer getDataBuffer() { return buffer.asReadOnlyBuffer(); } public int getDataLength() { return buffer.remaining(); } }; for ( Iterator iter = listeners.iterator(); iter.hasNext(); ) { final TransferListener listener = iter.next(); listener.transferProgressed( transferEvent ); } } void fireTransferSucceeded( final Response response ) throws IOException { final long bytesTransferred = byteTransfered.get(); final TransferEvent transferEvent = new AsyncTransferEvent() { public EventType getType() { return TransferEvent.EventType.SUCCEEDED; } public long getTransferredBytes() { return bytesTransferred; } }; for ( Iterator iter = listeners.iterator(); iter.hasNext(); ) { final TransferListener listener = iter.next(); listener.transferSucceeded( transferEvent ); } } void fireTransferFailed() throws IOException { final long bytesTransferred = byteTransfered.get(); final TransferEvent transferEvent = new AsyncTransferEvent() { public EventType getType() { return TransferEvent.EventType.FAILED; } public long getTransferredBytes() { return bytesTransferred; } }; for ( Iterator iter = listeners.iterator(); iter.hasNext(); ) { final TransferListener listener = iter.next(); listener.transferFailed( transferEvent ); } } void fireTransferStarted() throws TransferCancelledException { final TransferEvent transferEvent = new AsyncTransferEvent() { public EventType getType() { return TransferEvent.EventType.STARTED; } public long getTransferredBytes() { return 0; } }; for ( Iterator iter = listeners.iterator(); iter.hasNext(); ) { final TransferListener listener = iter.next(); listener.transferStarted( transferEvent ); } } public boolean addTransferListener( TransferListener listener ) { if ( listener == null ) { return false; } return listeners.offer( listener ); } public boolean removeTransferListener( TransferListener listener ) { if ( listener == null ) { return false; } return listeners.remove( listener ); } protected HttpResponseStatus status() { return status; } abstract class AsyncTransferEvent implements TransferEvent { public RequestType getRequestType() { return requestType; } public TransferResource getResource() { return transferResource; } public ByteBuffer getDataBuffer() { return null; } public int getDataLength() { return 0; } public Exception getException() { return ( Exception.class.isAssignableFrom( exception.get().getClass() ) ? Exception.class.cast( exception.get() ) : new Exception( exception.get() ) ); } @Override public String toString() { return getRequestType() + " " + getType() + " " + getResource(); } } } ProgressingFileBodyGenerator.java000066400000000000000000000075651167050556700415670ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/main/java/org/sonatype/aether/connector/asyncpackage org.sonatype.aether.connector.async; /******************************************************************************* * 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.io.IOException; import java.nio.ByteBuffer; import java.nio.channels.WritableByteChannel; import com.ning.http.client.generators.FileBodyGenerator; import org.sonatype.aether.transfer.TransferCancelledException; import com.ning.http.client.RandomAccessBody; class ProgressingFileBodyGenerator extends FileBodyGenerator { private final CompletionHandler completionHandler; public ProgressingFileBodyGenerator( File file, CompletionHandler completionHandler ) { super( file ); this.completionHandler = completionHandler; } @Override public RandomAccessBody createBody() throws IOException { return new ProgressingBody( super.createBody() ); } final class ProgressingBody implements RandomAccessBody { final RandomAccessBody delegate; private ProgressingWritableByteChannel channel; public ProgressingBody( RandomAccessBody delegate ) { this.delegate = delegate; } public long getContentLength() { return delegate.getContentLength(); } public long read( ByteBuffer buffer ) throws IOException { ByteBuffer event = buffer.slice(); long read = delegate.read( buffer ); if ( read > 0 ) { try { event.limit( (int) read ); completionHandler.fireTransferProgressed( event ); } catch ( TransferCancelledException e ) { throw (IOException) new IOException( e.getMessage() ).initCause( e ); } } return read; } public long transferTo( long position, long count, WritableByteChannel target ) throws IOException { ProgressingWritableByteChannel dst = channel; if ( dst == null || dst.delegate != target ) { channel = dst = new ProgressingWritableByteChannel( target ); } return delegate.transferTo( position, Math.min( count, 1024 * 16 ), dst ); } public void close() throws IOException { delegate.close(); } } final class ProgressingWritableByteChannel implements WritableByteChannel { final WritableByteChannel delegate; public ProgressingWritableByteChannel( WritableByteChannel delegate ) { this.delegate = delegate; } public boolean isOpen() { return delegate.isOpen(); } public void close() throws IOException { delegate.close(); } public int write( ByteBuffer src ) throws IOException { ByteBuffer event = src.slice(); int written = delegate.write( src ); if ( written > 0 ) { try { event.limit( written ); completionHandler.fireTransferProgressed( event ); } catch ( TransferCancelledException e ) { throw (IOException) new IOException( e.getMessage() ).initCause( e ); } } return written; } } } ResourceDoesNotExistException.java000066400000000000000000000015751167050556700417520ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/main/java/org/sonatype/aether/connector/asyncpackage org.sonatype.aether.connector.async; /******************************************************************************* * 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 *******************************************************************************/ /** * Simple exception when a resource doesn't exist. * * @author Jeanfrancois Arcand */ class ResourceDoesNotExistException extends Exception { public ResourceDoesNotExistException( final String message ) { super( message ); } public ResourceDoesNotExistException( final String message, final Throwable cause ) { super( message, cause ); } } TransferException.java000066400000000000000000000015171167050556700374320ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/main/java/org/sonatype/aether/connector/asyncpackage org.sonatype.aether.connector.async; /******************************************************************************* * 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 *******************************************************************************/ /** * Simple exception when a transfer fail. * * @author Jeanfrancois Arcand */ class TransferException extends Exception { public TransferException( final String message ) { super( message ); } public TransferException( final String message, final Throwable cause ) { super( message, cause ); } }aether-1.13.1/aether-connector-asynchttpclient/src/test/000077500000000000000000000000001167050556700233015ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/test/java/000077500000000000000000000000001167050556700242225ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/test/java/org/000077500000000000000000000000001167050556700250115ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/test/java/org/sonatype/000077500000000000000000000000001167050556700266535ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/test/java/org/sonatype/aether/000077500000000000000000000000001167050556700301235ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/test/java/org/sonatype/aether/connector/000077500000000000000000000000001167050556700321155ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/test/java/org/sonatype/aether/connector/async/000077500000000000000000000000001167050556700332325ustar00rootroot00000000000000AetherDefaultTest.java000066400000000000000000000046071167050556700374020ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/test/java/org/sonatype/aether/connector/asyncpackage org.sonatype.aether.connector.async; /******************************************************************************* * 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.RepositorySystemSession; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.spi.connector.RepositoryConnectorFactory; import org.sonatype.aether.spi.log.NullLogger; import org.sonatype.aether.test.impl.TestFileProcessor; import org.sonatype.aether.test.util.connector.suite.ConnectorTestSetup.AbstractConnectorTestSetup; import org.sonatype.aether.test.util.connector.suite.ConnectorTestSuite; import org.sonatype.tests.http.server.jetty.behaviour.ResourceServer; import org.sonatype.tests.http.server.jetty.impl.JettyServerProvider; /** * @author Benjamin Hanzelmann */ public class AetherDefaultTest extends ConnectorTestSuite { private static class JettyConnectorTestSetup extends AbstractConnectorTestSetup { private JettyServerProvider provider; public RemoteRepository before( RepositorySystemSession session, Map context ) throws Exception { provider = new JettyServerProvider(); provider.initServer(); provider.addBehaviour( "/*", new ResourceServer() ); provider.start(); return new RemoteRepository( "jetty-repo", "default", provider.getUrl().toString() + "/repo" ); } public RepositoryConnectorFactory factory() { return new AsyncRepositoryConnectorFactory( NullLogger.INSTANCE, new TestFileProcessor() ); } @Override public void after( RepositorySystemSession session, RemoteRepository repository, Map context ) throws Exception { if ( provider != null ) { provider.stop(); provider = null; } } } /** * @param setup */ public AetherDefaultTest() { super( new JettyConnectorTestSetup() ); } } AsyncConnectorSuiteConfiguration.java000066400000000000000000000140331167050556700425110ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/test/java/org/sonatype/aether/connector/asyncpackage org.sonatype.aether.connector.async; /******************************************************************************* * 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.IOException; import java.io.UnsupportedEncodingException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import org.junit.After; import org.junit.Before; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.metadata.Metadata; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.spi.connector.RepositoryConnector; import org.sonatype.aether.spi.connector.RepositoryConnectorFactory; import org.sonatype.aether.spi.log.NullLogger; import org.sonatype.aether.test.impl.TestFileProcessor; import org.sonatype.aether.test.impl.TestRepositorySystemSession; import org.sonatype.aether.test.util.TestFileUtils; import org.sonatype.aether.test.util.impl.StubArtifact; import org.sonatype.aether.test.util.impl.StubMetadata; import org.sonatype.aether.transfer.NoRepositoryConnectorException; import org.sonatype.tests.http.runner.junit.DefaultSuiteConfiguration; import org.sonatype.tests.http.server.api.ServerProvider; import org.sonatype.tests.http.server.jetty.behaviour.Expect; import org.sonatype.tests.http.server.jetty.behaviour.Provide; /** * @author Benjamin Hanzelmann */ public class AsyncConnectorSuiteConfiguration extends DefaultSuiteConfiguration { protected Logger logger = LoggerFactory.getLogger( this.getClass() ); private AsyncRepositoryConnectorFactory factory; private TestRepositorySystemSession session; private RemoteRepository repository; private Artifact artifact; private Metadata metadata; protected Expect expect; protected Provide provide = new Provide(); protected Generate generate; private RepositoryConnector connector; @Override @Before public void before() throws Exception { super.before(); this.factory = new AsyncRepositoryConnectorFactory( NullLogger.INSTANCE, new TestFileProcessor() ); this.session = new TestRepositorySystemSession(); this.repository = new RemoteRepository( "async-test-repo", "default", url( "repo" ) ); this.artifact = new StubArtifact( "gid", "aid", "classifier", "extension", "version", null ); this.metadata = new StubMetadata( "gid", "aid", "version", "maven-metadata.xml", Metadata.Nature.RELEASE_OR_SNAPSHOT, null ); connector = null; } @Override @After public void after() throws Exception { super.after(); connector().close(); TestFileUtils.deleteTempFiles(); } protected RepositoryConnectorFactory factory() { return factory; } protected RepositoryConnector connector() throws NoRepositoryConnectorException { if ( connector == null ) { connector = factory().newInstance( session(), repository() ); } return connector; } /** * @return */ protected TestRepositorySystemSession session() { return session; } /** * @return */ protected RemoteRepository repository() { return repository; } protected Artifact artifact() { return artifact; } protected Artifact artifact( String content ) throws IOException { return artifact().setFile( TestFileUtils.createTempFile( content ) ); } protected Metadata metadata() { return metadata; } protected Metadata metadata( String content ) throws IOException { return metadata().setFile( TestFileUtils.createTempFile( content ) ); } protected String md5( String string ) throws NoSuchAlgorithmException, UnsupportedEncodingException { String algo = "MD5"; return digest( string, algo ); } private String digest( String string, String algo ) throws NoSuchAlgorithmException, UnsupportedEncodingException { MessageDigest digest = MessageDigest.getInstance( algo ); byte[] bytes = digest.digest( string.getBytes( "UTF-8" ) ); StringBuilder buffer = new StringBuilder( 64 ); for ( int i = 0; i < bytes.length; i++ ) { int b = bytes[i] & 0xFF; if ( b < 0x10 ) { buffer.append( '0' ); } buffer.append( Integer.toHexString( b ) ); } return buffer.toString(); } protected String sha1( String string ) throws NoSuchAlgorithmException, UnsupportedEncodingException { return digest( string, "SHA-1" ); } protected void assertExpectations() { expect.assertExpectations(); } protected Expect addExpectation( String path, String content ) throws Exception { byte[] bytes = content.getBytes( "UTF-8" ); return addExpectation( path, bytes ); } private Expect addExpectation( String path, byte[] content ) { expect.addExpectation( path, content ); return expect; } protected void addDelivery( String path, String content ) throws Exception { addDelivery( path, content.getBytes( "UTF-8" ) ); } @Override public void configureProvider( ServerProvider provider ) { super.configureProvider( provider ); expect = new Expect(); provide = new Provide(); generate = new Generate(); provider.addBehaviour( "/repo", generate, expect, provide ); } protected void addDelivery( String path, byte[] content ) { provide.addPath( path, content ); } } AsyncHandlerExceptionTest.java000066400000000000000000000070431167050556700411140ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/test/java/org/sonatype/aether/connector/asyncpackage org.sonatype.aether.connector.async; /******************************************************************************* * 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.junit.After; import org.junit.Before; import org.junit.Test; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.spi.connector.ArtifactDownload; import org.sonatype.aether.spi.connector.ArtifactUpload; import org.sonatype.aether.test.impl.SysoutLogger; import org.sonatype.aether.test.impl.TestFileProcessor; import org.sonatype.aether.test.util.TestFileUtils; import org.sonatype.aether.test.util.impl.StubArtifact; import org.sonatype.aether.transfer.ArtifactNotFoundException; import org.sonatype.aether.util.DefaultRepositorySystemSession; import java.io.File; import java.io.IOException; import java.util.Arrays; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; public class AsyncHandlerExceptionTest { private File baseDir; @Before public void setUp() throws IOException { baseDir = TestFileUtils.createTempDir( getClass().getSimpleName() ); } @Test public void testIt() throws Exception { HttpServer server = new HttpServer(); server.addResources( "/", baseDir.getAbsolutePath() ); server.start(); try { RemoteRepository repo = new RemoteRepository( "id", "default", server.getHttpUrl() + "/repo" ); RepositorySystemSession session = new DefaultRepositorySystemSession(); AsyncRepositoryConnector connector = new AsyncRepositoryConnector( repo, session, new TestFileProcessor(), new SysoutLogger() ); try { StubArtifact artifact = new StubArtifact( "gid:aid:1.0" ); for ( int i = 0; i < 16; i++ ) { System.out.println( "RUN #" + i ); TestFileUtils.delete( baseDir ); ArtifactDownload download = new ArtifactDownload( artifact, "project", new File( baseDir, "a.jar" ), "ignore" ); System.out.println( "GET" ); connector.get( Arrays.asList( download ), null ); assertTrue( String.valueOf( download.getException() ), download.getException() instanceof ArtifactNotFoundException ); ArtifactUpload upload = new ArtifactUpload( artifact, new File( "pom.xml" ) ); System.out.println( "PUT" ); connector.put( Arrays.asList( upload ), null ); if ( upload.getException() != null ) { upload.getException().printStackTrace(); } assertNull( String.valueOf( upload.getException() ), upload.getException() ); } } finally { connector.close(); } } finally { server.stop(); } } @After public void tearDown() throws IOException { TestFileUtils.delete( baseDir ); } } AuthGetTest.java000066400000000000000000000021521167050556700362170ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/test/java/org/sonatype/aether/connector/asyncpackage org.sonatype.aether.connector.async; /******************************************************************************* * 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.junit.Before; import org.junit.runner.RunWith; import org.sonatype.aether.repository.Authentication; import org.sonatype.tests.http.runner.annotations.ConfiguratorList; import org.sonatype.tests.http.runner.junit.ConfigurationRunner; /** * @author Benjamin Hanzelmann */ @RunWith( ConfigurationRunner.class ) @ConfiguratorList( "AuthSuiteConfigurator.list" ) public class AuthGetTest extends GetTest { @Before @Override public void before() throws Exception { super.before(); repository().setAuthentication( new Authentication( "user", "password" ) ); } } AuthPutTest.java000066400000000000000000000021421167050556700362470ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/test/java/org/sonatype/aether/connector/asyncpackage org.sonatype.aether.connector.async; /******************************************************************************* * 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.junit.Before; import org.junit.runner.RunWith; import org.sonatype.aether.repository.Authentication; import org.sonatype.tests.http.runner.annotations.ConfiguratorList; import org.sonatype.tests.http.runner.junit.ConfigurationRunner; /** * @author Benjamin Hanzelmann */ @RunWith( ConfigurationRunner.class ) @ConfiguratorList( "AuthSuiteConfigurator.list" ) public class AuthPutTest extends PutTest { @Before @Override public void before() throws Exception { super.before(); repository().setAuthentication( new Authentication( "user", "password" ) ); } } AuthWithNonAsciiCredentialsGetTest.java000066400000000000000000000030771167050556700426640ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/test/java/org/sonatype/aether/connector/asyncpackage org.sonatype.aether.connector.async; /******************************************************************************* * 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.junit.Before; import org.junit.runner.RunWith; import org.sonatype.aether.repository.Authentication; import org.sonatype.tests.http.runner.annotations.ConfiguratorList; import org.sonatype.tests.http.runner.junit.ConfigurationRunner; import org.sonatype.tests.http.server.api.ServerProvider; /** */ @RunWith( ConfigurationRunner.class ) @ConfiguratorList( "AuthSuiteConfigurator.list" ) public class AuthWithNonAsciiCredentialsGetTest extends GetTest { @Override public void configureProvider( ServerProvider provider ) { super.configureProvider( provider ); provider.addUser( "user-non-ascii", "\u00E4\u00DF" ); } @Before @Override public void before() throws Exception { super.before(); repository().setAuthentication( new Authentication( "user-non-ascii", "\u00E4\u00DF" ) ); } @Override public void testDownloadArtifactWhoseSizeExceedsMaxHeapSize() throws Exception { // this one is slow and doesn't bring anything new to the table in this context so just skip } } AuthWithNonAsciiCredentialsPutTest.java000066400000000000000000000025441167050556700427130ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/test/java/org/sonatype/aether/connector/asyncpackage org.sonatype.aether.connector.async; /******************************************************************************* * 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.junit.Before; import org.junit.runner.RunWith; import org.sonatype.aether.repository.Authentication; import org.sonatype.tests.http.runner.annotations.ConfiguratorList; import org.sonatype.tests.http.runner.junit.ConfigurationRunner; import org.sonatype.tests.http.server.api.ServerProvider; /** */ @RunWith( ConfigurationRunner.class ) @ConfiguratorList( "AuthSuiteConfigurator.list" ) public class AuthWithNonAsciiCredentialsPutTest extends PutTest { @Override public void configureProvider( ServerProvider provider ) { super.configureProvider( provider ); provider.addUser( "user-non-ascii", "\u00E4\u00DF" ); } @Before @Override public void before() throws Exception { super.before(); repository().setAuthentication( new Authentication( "user-non-ascii", "\u00E4\u00DF" ) ); } } DavUrlGetTest.java000066400000000000000000000014741167050556700365210ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/test/java/org/sonatype/aether/connector/asyncpackage org.sonatype.aether.connector.async; /******************************************************************************* * 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.repository.RemoteRepository; /** * @author Benjamin Hanzelmann * */ public class DavUrlGetTest extends GetTest { @Override protected RemoteRepository repository() { RemoteRepository repo = super.repository(); return repo.setUrl( "dav:" + repo.getUrl() ); } } DavUrlPutTest.java000066400000000000000000000014741167050556700365520ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/test/java/org/sonatype/aether/connector/asyncpackage org.sonatype.aether.connector.async; /******************************************************************************* * 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.repository.RemoteRepository; /** * @author Benjamin Hanzelmann * */ public class DavUrlPutTest extends PutTest { @Override protected RemoteRepository repository() { RemoteRepository repo = super.repository(); return repo.setUrl( "dav:" + repo.getUrl() ); } } Generate.java000066400000000000000000000041531167050556700355530ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/test/java/org/sonatype/aether/connector/asyncpackage org.sonatype.aether.connector.async; /******************************************************************************* * 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 java.util.concurrent.ConcurrentHashMap; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.sonatype.tests.http.server.api.Behaviour; /** * A behavior that writes a sequence of fixed length to the client upon a GET request. */ public class Generate implements Behaviour { private static final byte[] bytes = new byte[1024]; private final Map lengths = new ConcurrentHashMap(); public void addContent( String path, long length ) { if ( !path.startsWith( "/" ) ) { path = '/' + path; } lengths.put( path, Long.valueOf( length ) ); } public boolean execute( HttpServletRequest request, HttpServletResponse response, Map ctx ) throws Exception { if ( "GET".equals( request.getMethod() ) ) { String path = request.getPathInfo(); Long length = lengths.get( path ); if ( length != null ) { response.setContentType( "application/octet-stream" ); response.setContentLength( length.intValue() ); ServletOutputStream out = response.getOutputStream(); for ( int i = length.intValue(); i > 0; ) { int n = Math.min( i, bytes.length ); i -= n; out.write( bytes, 0, n ); } out.close(); return false; } } return true; } } GetTest.java000066400000000000000000000155551167050556700354100ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/test/java/org/sonatype/aether/connector/asyncpackage org.sonatype.aether.connector.async; /******************************************************************************* * 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 static org.junit.Assert.*; import java.io.File; import java.util.Arrays; import java.util.Collection; import org.junit.Test; import org.junit.runner.RunWith; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.repository.RepositoryPolicy; import org.sonatype.aether.spi.connector.ArtifactDownload; import org.sonatype.aether.spi.connector.RepositoryConnector; import org.sonatype.aether.test.impl.RecordingTransferListener; import org.sonatype.aether.test.util.TestFileUtils; import org.sonatype.aether.transfer.TransferEvent; import org.sonatype.tests.http.runner.junit.ConfigurationRunner; /** * @author Benjamin Hanzelmann */ @RunWith( ConfigurationRunner.class ) public class GetTest extends AsyncConnectorSuiteConfiguration { @Test public void testDownloadArtifact() throws Exception { addDelivery( "gid/aid/version/aid-version-classifier.extension", "artifact" ); addDelivery( "gid/aid/version/aid-version-classifier.extension.sha1", sha1( "artifact" ) ); addDelivery( "gid/aid/version/aid-version-classifier.extension.md5", md5( "artifact" ) ); File f = TestFileUtils.createTempFile( "" ); Artifact a = artifact( "bla" ); ArtifactDownload down = new ArtifactDownload( a, null, f, RepositoryPolicy.CHECKSUM_POLICY_FAIL ); Collection downs = Arrays.asList( down ); RepositoryConnector c = connector(); c.get( downs, null ); assertNull( String.valueOf( down.getException() ), down.getException() ); TestFileUtils.assertContent( "artifact", f ); } @Test public void testDownloadArtifactChecksumFailure() throws Exception { addDelivery( "gid/aid/version/aid-version-classifier.extension", "artifact" ); addDelivery( "gid/aid/version/aid-version-classifier.extension.sha1", "foo" ); addDelivery( "gid/aid/version/aid-version-classifier.extension.md5", "bar" ); File f = TestFileUtils.createTempFile( "" ); Artifact a = artifact( "bla" ); ArtifactDownload down = new ArtifactDownload( a, null, f, RepositoryPolicy.CHECKSUM_POLICY_FAIL ); Collection downs = Arrays.asList( down ); connector().get( downs, null ); assertNotNull( down.getException() ); } @Test public void testDownloadArtifactNoChecksumAvailable() throws Exception { addDelivery( "gid/aid/version/aid-version-classifier.extension", "artifact" ); File f = TestFileUtils.createTempFile( "" ); Artifact a = artifact( "foo" ); ArtifactDownload down = new ArtifactDownload( a, null, f, RepositoryPolicy.CHECKSUM_POLICY_FAIL ); Collection downs = Arrays.asList( down ); connector().get( downs, null ); TestFileUtils.assertContent( "", f ); assertNotNull( down.getException() ); } @Test public void testDownloadCorrupted() throws Exception { RecordingTransferListener transferListener = new RecordingTransferListener(); session().setTransferListener( transferListener ); addDelivery( "gid/aid/version/aid-version-classifier.extension", "artifact" ); addDelivery( "gid/aid/version/aid-version-classifier.extension.sha1", "foo" ); addDelivery( "gid/aid/version/aid-version-classifier.extension.md5", "bar" ); File f = TestFileUtils.createTempFile( "" ); Artifact a = artifact( "bla" ); ArtifactDownload down = new ArtifactDownload( a, null, f, RepositoryPolicy.CHECKSUM_POLICY_WARN ); Collection downs = Arrays.asList( down ); connector().get( downs, null ); TransferEvent corruptedEvent = null; for ( TransferEvent e : transferListener.getEvents() ) { if ( TransferEvent.EventType.CORRUPTED.equals( e.getType() ) ) { corruptedEvent = e; break; } } assertNotNull( corruptedEvent ); } @Test public void testDownloadArtifactWithWait() throws Exception { addDelivery( "gid/aid/version/aid-version-classifier.extension", "artifact" ); addDelivery( "gid/aid/version/aid-version-classifier.extension.sha1", sha1( "artifact" ) ); addDelivery( "gid/aid/version/aid-version-classifier.extension.md5", md5( "artifact" ) ); File f = TestFileUtils.createTempFile( "" ); Artifact a = artifact( "foo" ); ArtifactDownload down = new ArtifactDownload( a, null, f, RepositoryPolicy.CHECKSUM_POLICY_FAIL ); Collection downs = Arrays.asList( down ); connector().get( downs, null ); assertNull( String.valueOf( down.getException() ), down.getException() ); TestFileUtils.assertContent( "foo", a.getFile() ); TestFileUtils.assertContent( "artifact", f ); } @Test public void testDownloadArtifactWhoseSizeExceedsMaxHeapSize() throws Exception { long bytes = Runtime.getRuntime().maxMemory() * 5 / 4; generate.addContent( "gid/aid/version/aid-version-classifier.extension", bytes ); File f = TestFileUtils.createTempFile( "" ); Artifact a = artifact(); ArtifactDownload down = new ArtifactDownload( a, null, f, RepositoryPolicy.CHECKSUM_POLICY_IGNORE ); connector().get( Arrays.asList( down ), null ); connector().close(); assertEquals( bytes, f.length() ); } @Test( expected = IllegalStateException.class ) public void testClosedGet() throws Exception { connector().close(); File f = TestFileUtils.createTempFile( "" ); Artifact a = artifact( "foo" ); ArtifactDownload down = new ArtifactDownload( a, null, f, RepositoryPolicy.CHECKSUM_POLICY_FAIL ); Collection downs = Arrays.asList( down ); connector().get( downs, null ); } @Test public void testCloseAfterArtifactDownload() throws Exception { File f = TestFileUtils.createTempFile( "" ); Artifact a = artifact( "foo" ); ArtifactDownload down = new ArtifactDownload( a, null, f, RepositoryPolicy.CHECKSUM_POLICY_FAIL ); Collection downs = Arrays.asList( down ); connector().get( downs, null ); connector().close(); } } HttpServer.java000066400000000000000000000704501167050556700361320ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/test/java/org/sonatype/aether/connector/asyncpackage org.sonatype.aether.connector.async; /******************************************************************************* * 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.mortbay.jetty.Connector; import org.mortbay.jetty.Handler; import org.mortbay.jetty.HttpMethods; import org.mortbay.jetty.Request; import org.mortbay.jetty.Server; import org.mortbay.jetty.handler.AbstractHandler; import org.mortbay.jetty.handler.DefaultHandler; import org.mortbay.jetty.handler.HandlerList; import org.mortbay.jetty.nio.SelectChannelConnector; import org.mortbay.jetty.security.B64Code; import org.mortbay.jetty.security.Constraint; import org.mortbay.jetty.security.ConstraintMapping; import org.mortbay.jetty.security.HashUserRealm; import org.mortbay.jetty.security.SecurityHandler; import org.mortbay.jetty.security.SslSocketConnector; import org.mortbay.util.IO; import org.mortbay.util.URIUtil; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Enumeration; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.TreeMap; /** * A helper for the tests to start an embedded HTTP server powered by Jetty. Create an instance of this class, use its * mutators to configure the server and finally call {@link #start()}. * * @author Benjamin Bentmann */ @SuppressWarnings( "synthetic-access" ) public class HttpServer { private Server server; private int httpPort; private int httpsPort = -1; private String keyStoreLocation; private String keyStorePassword; private String trustStoreLocation; private String trustStorePassword; private boolean needClientAuth; private String proxyUsername; private String proxyPassword; private boolean redirectToHttps; private long latency; private Map userPasswords = new HashMap(); private Map userRoles = new HashMap(); private Map securedRealms = new HashMap(); private Map resourceDirs = new TreeMap( Collections.reverseOrder() ); private Map resourceFilters = new HashMap(); private Map filterTokens = new HashMap(); private Collection recordedPatterns = new HashSet(); private List recordedRequests = new ArrayList(); private Map> recordedHeaders = new HashMap>(); protected Connector newHttpConnector() { SelectChannelConnector connector = new SelectChannelConnector(); connector.setPort( httpPort ); return connector; } protected Connector newHttpsConnector() { SslSocketConnector connector = new SslSocketConnector(); connector.setPort( httpsPort ); connector.setKeystore( new File( keyStoreLocation ).getAbsolutePath() ); connector.setPassword( keyStorePassword ); connector.setKeyPassword( keyStorePassword ); connector.setTruststore( new File( trustStoreLocation ).getAbsolutePath() ); connector.setTrustPassword( trustStorePassword ); connector.setNeedClientAuth( needClientAuth ); return connector; } /** * Sets the port to use for HTTP connections. * * @param httpPort The port to use, may be {@code 0} to pick a random port (default), if negative the HTTP connector * will be disabled. * @return This server, never {@code null}. */ public HttpServer setHttpPort( int httpPort ) { this.httpPort = httpPort; return this; } /** * Gets the port number of the server's HTTP connector. * * @return The port number of the server's HTTP connector. */ public int getHttpPort() { if ( httpPort >= 0 && server != null && server.isRunning() ) { return server.getConnectors()[0].getLocalPort(); } return httpPort; } /** * Gets the base URL to the server's HTTP connector, e.g. {@code "http://localhost:8080"}. * * @return The base URL without trailing slash to the server's HTTP connector, never {@code null}. */ public String getHttpUrl() { return "http://localhost:" + getHttpPort(); } /** * Sets the port to use for HTTPS connections. * * @param httpPort The port to use, may be {@code 0} to pick a random port, if negative the HTTPS connector will be * disabled (default). * @return This server, never {@code null}. */ public HttpServer setHttpsPort( int httpsPort ) { this.httpsPort = httpsPort; return this; } /** * Gets the port number of the server's HTTPS connector. * * @return The port number of the server's HTTPS connector. */ public int getHttpsPort() { if ( httpsPort >= 0 && server != null && server.isRunning() ) { return server.getConnectors()[( httpPort < 0 ) ? 0 : 1].getLocalPort(); } return httpsPort; } /** * Gets the base URL to the server's HTTPS connector, e.g. {@code "https://localhost:8080"}. * * @return The base URL without trailing slash to the server's HTTPS connector, never {@code null}. */ public String getHttpsUrl() { return "https://localhost:" + getHttpsPort(); } /** * Sets the keystore to use for the server certificate on the SSL connector. * * @param path The path to the keystore to use for the server certificate, may be {@code null}. * @param password The password for the keystore, may be {@code null}. * @return This server, never {@code null}. */ public HttpServer setKeyStore( String path, String password ) { keyStoreLocation = path; keyStorePassword = password; return this; } /** * Sets the truststore to use for validating client credentials via the SSL connector. * * @param path The path to the truststore to use for the trusted client certificates, may be {@code null}. * @param password The password for the truststore, may be {@code null}. * @return This server, never {@code null}. */ public HttpServer setTrustStore( String path, String password ) { trustStoreLocation = path; trustStorePassword = password; return this; } /** * Enables/disables client-side certificate authentication. * * @param needClientAuth Whether the server should reject clients whose certificate can't be verified via the * truststore. * @return This server, never {@code null}. */ public HttpServer setNeedClientAuth( boolean needClientAuth ) { this.needClientAuth = needClientAuth; return this; } /** * Sets the credentials to use for proxy authentication. If either username or password is {@code null}, no proxy * authentication is required. * * @param username The username, may be {@code null}. * @param password The password, may be {@code null}. * @return This server, never {@code null}. */ public HttpServer setProxyAuth( String username, String password ) { this.proxyUsername = username; this.proxyPassword = password; return this; } protected Handler newProxyHandler() { return new AbstractHandler() { public void handle( String target, HttpServletRequest request, HttpServletResponse response, int dispatch ) throws IOException { String auth = request.getHeader( "Proxy-Authorization" ); if ( auth != null ) { auth = auth.substring( auth.indexOf( ' ' ) + 1 ).trim(); auth = B64Code.decode( auth ); } if ( !( proxyUsername + ':' + proxyPassword ).equals( auth ) ) { response.setStatus( HttpServletResponse.SC_PROXY_AUTHENTICATION_REQUIRED ); response.addHeader( "Proxy-Authenticate", "Basic realm=\"Squid proxy-caching web server\"" ); response.getWriter().println( "Proxy authentication required" ); ( (Request) request ).setHandled( true ); } } }; } /** * Enforces redirection from HTTP to HTTPS. * * @param redirectToHttps {@code true} to redirect any HTTP requests to HTTPS, {@code false} to handle HTTP normally. * @return This server, never {@code null}. */ public HttpServer setRedirectToHttps( boolean redirectToHttps ) { this.redirectToHttps = redirectToHttps; return this; } protected Handler newSslRedirectHandler() { return new AbstractHandler() { public void handle( String target, HttpServletRequest request, HttpServletResponse response, int dispatch ) { int httpsPort = getHttpsPort(); if ( !( (Request) request ).isHandled() && request.getServerPort() != httpsPort ) { String url = "https://" + request.getServerName() + ":" + httpsPort + request.getRequestURI(); response.setStatus( HttpServletResponse.SC_MOVED_PERMANENTLY ); response.setHeader( "Location", url ); ( (Request) request ).setHandled( true ); } } }; } /** * Registers a user. * * @param username The username, must not be {@code null}. * @param password The password, must not be {@code null}. * @param roles The roles of the user, may be empty or {@code null}. * @return This server, never {@code null}. */ public HttpServer addUser( String username, String password, String... roles ) { userPasswords.put( username, password ); userRoles.put( username, ( roles == null ) ? new String[0] : roles ); return this; } /** * Sets up a security realm. * * @param pathSpec The path to secure, e.g. {@code "/files/*"}, must not be {@code null}. * @param roles The roles that have access to the realm, may be empty or {@code null}. * @return This server, never {@code null}. */ public HttpServer addSecuredRealm( String pathSpec, String... roles ) { securedRealms.put( pathSpec, ( roles == null ) ? new String[0] : roles ); return this; } protected Handler newSecurityHandler() { List mappings = new ArrayList(); for ( String pathSpec : securedRealms.keySet() ) { String[] roles = securedRealms.get( pathSpec ); Constraint constraint = new Constraint(); constraint.setName( Constraint.__BASIC_AUTH ); constraint.setRoles( roles ); constraint.setAuthenticate( true ); ConstraintMapping constraintMapping = new ConstraintMapping(); constraintMapping.setConstraint( constraint ); constraintMapping.setPathSpec( pathSpec ); mappings.add( constraintMapping ); } HashUserRealm userRealm = new HashUserRealm( "TestRealm" ); for ( String username : userPasswords.keySet() ) { String password = userPasswords.get( username ); String[] roles = userRoles.get( username ); userRealm.put( username, password ); if ( roles != null ) { for ( String role : roles ) { userRealm.addUserToRole( username, role ); } } } SecurityHandler securityHandler = new SecurityHandler(); securityHandler.setUserRealm( userRealm ); securityHandler.setConstraintMappings( mappings.toArray( new ConstraintMapping[mappings.size()] ) ); return securityHandler; } /** * Adds resources to the server. Resources can be filtered upon serving using the tokens set via * {@link #setFilterToken(String, String)}. The directory mounted into the server via this method will also be used to * store files sent via PUT. Upon requests, the server will try to match the context roots in reverse alphabetical * order, thereby giving longer path prefix matches precedence. * * @param contextRoot The context root to make the resources accessible at, must not be {@code null}. * @param baseDirectory The local base directory whose files should be served, must not be {@code null}. * @param filteredExtensions A list of extensions for files to filter, e.g. {@code "xml, "properties"}, may be {@code * null}. * @return This server, never {@code null}. */ public HttpServer addResources( String contextRoot, String baseDirectory, String... filteredExtensions ) { contextRoot = normalizeContextRoot( contextRoot ); File basedir = new File( baseDirectory ).getAbsoluteFile(); resourceDirs.put( contextRoot, basedir ); resourceFilters.put( contextRoot, ( filteredExtensions == null ) ? new String[0] : filteredExtensions ); return this; } /** * Enables request recording for the specified URI patterns. Recorded requests can be retrieved via * {@link #getRecordedRequests()}. * * @param patterns The regular expressions denoting URIs to monitor, e.g. {@code "/context/.*"}, must not be {@code * null}. * @return This server, never {@code null}. */ public HttpServer enableRecording( String... patterns ) { for ( String pattern : patterns ) { recordedPatterns.add( pattern ); } return this; } /** * Gets the sequence of requests that have been issued against context roots for which * {@link #enableRecording(String...)} was called. A request is encoded in the form {@code }, e.g. * {@code GET /context/some.jar}. * * @return The sequence of requests since the server was started, can be empty but never {@code null}. */ public List getRecordedRequests() { return recordedRequests; } /** * Gets the headers sent in the most recent request to the specified path. * * @param uri the path * @return the http request headers */ public Map getRecordedHeaders( String uri ) { return recordedHeaders.get( uri ); } /** * Sets a token to replace during resource filtering. Upon server start, the following tokens will be defined * automatically: @basedir@, @baseurl@, @baseuri@, @port.http@ and * @port.https@. * * @param token The token to replace, e.g. @basedir@, must not be {@code null}. * @param value The replacement text of the token, may be {@code null}. * @return This server, never {@code null}. */ public HttpServer setFilterToken( String token, String value ) { if ( value == null ) { filterTokens.remove( token ); } else { filterTokens.put( token, value ); } return this; } protected Handler newResourceHandler() { return new ResHandler(); } /** * Sets the latency of the server. * * @param millis The latency in milliseconds, may be negative for infinite delay. * @return This server, never {@code null}. */ public HttpServer setLatency( long millis ) { this.latency = millis; return this; } protected Handler newSleepHandler( final long millis ) { return new AbstractHandler() { public void handle( String target, HttpServletRequest request, HttpServletResponse response, int dispatch ) { if ( millis >= 0 ) { try { Thread.sleep( millis ); } catch ( InterruptedException e ) { e.printStackTrace(); } } else { synchronized ( this ) { try { wait(); } catch ( InterruptedException e ) { e.printStackTrace(); } } } } }; } /** * Starts the server. Trying to start an already running server has no effect. * * @return This server, never {@code null}. * @throws Exception If the server could not be started. */ public HttpServer start() throws Exception { if ( server != null ) { return this; } recordedRequests.clear(); List connectors = new ArrayList(); if ( httpPort >= 0 ) { connectors.add( newHttpConnector() ); } if ( httpsPort >= 0 && keyStoreLocation != null ) { connectors.add( newHttpsConnector() ); } HandlerList handlerList = new HandlerList(); if ( !recordedPatterns.isEmpty() ) { handlerList.addHandler( new RecordingHandler() ); } if ( latency != 0 ) { handlerList.addHandler( newSleepHandler( latency ) ); } if ( redirectToHttps ) { handlerList.addHandler( newSslRedirectHandler() ); } if ( proxyUsername != null && proxyPassword != null ) { handlerList.addHandler( newProxyHandler() ); } if ( !securedRealms.isEmpty() ) { handlerList.addHandler( newSecurityHandler() ); } if ( !resourceDirs.isEmpty() ) { handlerList.addHandler( newResourceHandler() ); } handlerList.addHandler( new DefaultHandler() ); server = new Server( 0 ); server.setHandler( handlerList ); server.setConnectors( connectors.toArray( new Connector[connectors.size()] ) ); server.start(); waitForConnectors(); addDefaultFilterTokens(); return this; } protected void waitForConnectors() throws Exception { // for unknown reasons, the connectors occasionally don't start properly, this tries hard to ensure they are up List badConnectors = new ArrayList( 2 ); for ( int r = 10; r > 0; r-- ) { // wait some seconds for the connectors to come up for ( int i = 200; i > 0; i-- ) { badConnectors.clear(); for ( Connector connector : server.getConnectors() ) { if ( connector.getLocalPort() < 0 ) { badConnectors.add( connector ); } } if ( badConnectors.isEmpty() ) { return; } try { Thread.sleep( 15 ); } catch ( InterruptedException e ) { return; } } // restart the broken connectors and hope they make it this time System.err.println( "WARNING: " + badConnectors + " did not start properly, restarting" ); for ( Connector connector : badConnectors ) { connector.stop(); connector.start(); } } } protected void addDefaultFilterTokens() { if ( !filterTokens.containsKey( "@basedir@" ) ) { filterTokens.put( "@basedir@", new File( "" ).getAbsolutePath() ); } if ( !filterTokens.containsKey( "@baseurl@" ) ) { String baseurl = "file://" + new File( "" ).toURI().getPath(); if ( baseurl.endsWith( "/" ) ) { baseurl = baseurl.substring( 0, baseurl.length() - 1 ); } filterTokens.put( "@baseurl@", baseurl ); } if ( !filterTokens.containsKey( "@baseuri@" ) ) { String baseuri = "file://" + new File( "" ).toURI().getRawPath(); if ( baseuri.endsWith( "/" ) ) { baseuri = baseuri.substring( 0, baseuri.length() - 1 ); } filterTokens.put( "@baseuri@", baseuri ); } if ( !filterTokens.containsKey( "@port.http@" ) ) { filterTokens.put( "@port.http@", Integer.toString( getHttpPort() ) ); } if ( !filterTokens.containsKey( "@port.https@" ) ) { filterTokens.put( "@port.https@", Integer.toString( getHttpsPort() ) ); } } /** * Stops the server. Stopping an already stopped server has no effect. */ public void stop() { if ( server != null ) { try { server.stop(); } catch ( Exception e ) { e.printStackTrace(); } server = null; } } class ResHandler extends AbstractHandler { public void handle( String target, HttpServletRequest request, HttpServletResponse response, int dispatch ) throws IOException { String uri = request.getRequestURI(); for ( String contextRoot : resourceDirs.keySet() ) { String path = URIUtil.decodePath( trimContextRoot( uri, contextRoot ) ); if ( path != null ) { File basedir = resourceDirs.get( contextRoot ); File file = new File( basedir, path ); if ( HttpMethods.HEAD.equals( request.getMethod() ) ) { if ( file.exists() ) { response.setStatus( HttpServletResponse.SC_OK ); } else { response.setStatus( HttpServletResponse.SC_NOT_FOUND ); } ( (Request) request ).setHandled( true ); return; } else if ( HttpMethods.PUT.equals( request.getMethod() ) || HttpMethods.POST.equals( request.getMethod() ) ) { int i = 0; while ( !file.getParentFile().exists() && !file.getParentFile().mkdirs() ) { if ( i++ > 5 ) { break; } } FileOutputStream os = new FileOutputStream( file ); try { IO.copy( request.getInputStream(), os ); } finally { os.close(); } response.setStatus( HttpServletResponse.SC_CREATED ); ( (Request) request ).setHandled( true ); } else if ( file.isFile() ) { FileInputStream is = new FileInputStream( file ); try { String filterEncoding = getFilterEncoding( path, resourceFilters.get( contextRoot ) ); if ( filterEncoding == null ) { IO.copy( is, response.getOutputStream() ); } else { String text = IO.toString( is, filterEncoding ); text = filter( text, filterTokens ); response.getOutputStream().write( text.getBytes( filterEncoding ) ); } } finally { is.close(); } response.setStatus( HttpServletResponse.SC_OK ); ( (Request) request ).setHandled( true ); } break; } } } private String getExtension( String path ) { return path.substring( path.lastIndexOf( '.' ) + 1 ); } private String getFilterEncoding( String path, String[] filteredExtensions ) { String ext = getExtension( path ); if ( filteredExtensions != null ) { for ( String filteredExtension : filteredExtensions ) { if ( filteredExtension.startsWith( "." ) ) { filteredExtension = filteredExtension.substring( 1 ); } if ( filteredExtension.equalsIgnoreCase( ext ) ) { return "properties".equalsIgnoreCase( ext ) ? "ISO-8859-1" : "UTF-8"; } } } return null; } private String filter( String str, Map tokens ) { for ( String token : tokens.keySet() ) { str = str.replace( token, tokens.get( token ) ); } return str; } } class RecordingHandler extends AbstractHandler { public void handle( String target, HttpServletRequest request, HttpServletResponse response, int dispatch ) { String uri = request.getRequestURI(); for ( String pattern : recordedPatterns ) { if ( uri.matches( pattern ) ) { String req = request.getMethod() + " " + uri; recordedRequests.add( req ); Map headers = new HashMap(); recordedHeaders.put( uri, headers ); for ( @SuppressWarnings( "unchecked" ) Enumeration h = request.getHeaderNames(); h.hasMoreElements(); ) { String headername = h.nextElement(); headers.put( headername, request.getHeader( headername ) ); } } } } } private static String normalizeContextRoot( String contextRoot ) { if ( contextRoot.endsWith( "/" ) ) { contextRoot = contextRoot.substring( 0, contextRoot.length() - 1 ); } if ( !contextRoot.startsWith( "/" ) ) { contextRoot = "/" + contextRoot; } return contextRoot; } private static String trimContextRoot( String uri, String contextRoot ) { if ( uri.startsWith( contextRoot ) ) { if ( contextRoot.length() == 1 ) { return uri.substring( 1 ); } else if ( uri.length() > contextRoot.length() && uri.charAt( contextRoot.length() ) == '/' ) { return uri.substring( contextRoot.length() + 1 ); } } return null; } } PlexusSupportTest.java000066400000000000000000000025311167050556700375340ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/test/java/org/sonatype/aether/connector/asyncpackage org.sonatype.aether.connector.async; /******************************************************************************* * 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.codehaus.plexus.PlexusTestCase; import org.sonatype.aether.spi.connector.RepositoryConnectorFactory; import org.sonatype.aether.spi.io.FileProcessor; import org.sonatype.aether.spi.log.Logger; import org.sonatype.aether.test.impl.SysoutLogger; import org.sonatype.aether.test.impl.TestFileProcessor; /** */ public class PlexusSupportTest extends PlexusTestCase { public void testExistenceOfPlexusComponentMetadata() throws Exception { getContainer().addComponent( new SysoutLogger(), Logger.class, null ); getContainer().addComponent( new TestFileProcessor(), FileProcessor.class, null ); RepositoryConnectorFactory factory = lookup( RepositoryConnectorFactory.class, "async-http" ); assertNotNull( factory ); assertEquals( AsyncRepositoryConnectorFactory.class, factory.getClass() ); } } ProxyGetTest.java000066400000000000000000000036241167050556700364440ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/test/java/org/sonatype/aether/connector/asyncpackage org.sonatype.aether.connector.async; /******************************************************************************* * 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.net.MalformedURLException; import java.net.URL; import org.junit.Before; import org.junit.runner.RunWith; import org.sonatype.aether.repository.Authentication; import org.sonatype.aether.repository.Proxy; import org.sonatype.tests.http.runner.annotations.Configurators; import org.sonatype.tests.http.runner.junit.ConfigurationRunner; import org.sonatype.tests.http.server.jetty.configurations.HttpProxyAuthConfigurator; import org.sonatype.tests.http.server.jetty.configurations.HttpProxyConfigurator; /** * @author Benjamin Hanzelmann */ @RunWith( ConfigurationRunner.class ) @Configurators( { HttpProxyConfigurator.class, HttpProxyAuthConfigurator.class } ) public class ProxyGetTest extends GetTest { @Override @Before public void before() throws Exception { super.before(); Authentication auth = new Authentication( "puser", "password" ); Proxy proxy = new Proxy( "http", "localhost", provider().getPort(), auth ); repository().setProxy( proxy ); } @Override public String url() { URL orig; try { orig = new URL( super.url() ); return new URL( orig.getProtocol(), "proxiedhost", orig.getPort(), "" ).toString(); } catch ( MalformedURLException e ) { e.printStackTrace(); throw new IllegalStateException( e.getMessage(), e ); } } } ProxyPutTest.java000066400000000000000000000036241167050556700364750ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/test/java/org/sonatype/aether/connector/asyncpackage org.sonatype.aether.connector.async; /******************************************************************************* * 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.net.MalformedURLException; import java.net.URL; import org.junit.Before; import org.junit.runner.RunWith; import org.sonatype.aether.repository.Authentication; import org.sonatype.aether.repository.Proxy; import org.sonatype.tests.http.runner.annotations.Configurators; import org.sonatype.tests.http.runner.junit.ConfigurationRunner; import org.sonatype.tests.http.server.jetty.configurations.HttpProxyAuthConfigurator; import org.sonatype.tests.http.server.jetty.configurations.HttpProxyConfigurator; /** * @author Benjamin Hanzelmann */ @RunWith( ConfigurationRunner.class ) @Configurators( { HttpProxyConfigurator.class, HttpProxyAuthConfigurator.class } ) public class ProxyPutTest extends PutTest { @Override @Before public void before() throws Exception { super.before(); Authentication auth = new Authentication( "puser", "password" ); Proxy proxy = new Proxy( "http", "localhost", provider().getPort(), auth ); repository().setProxy( proxy ); } @Override public String url() { URL orig; try { orig = new URL( super.url() ); return new URL( orig.getProtocol(), "proxiedhost", orig.getPort(), "" ).toString(); } catch ( MalformedURLException e ) { e.printStackTrace(); throw new IllegalStateException( e.getMessage(), e ); } } } PutTest.java000066400000000000000000000116301167050556700354270ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/test/java/org/sonatype/aether/connector/asyncpackage org.sonatype.aether.connector.async; /******************************************************************************* * 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 static org.junit.Assert.*; import java.util.Arrays; import java.util.List; import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.metadata.Metadata; import org.sonatype.aether.spi.connector.ArtifactUpload; import org.sonatype.aether.spi.connector.MetadataUpload; import org.sonatype.aether.transfer.ArtifactTransferException; import org.sonatype.tests.http.runner.junit.ConfigurationRunner; /** * @author Benjamin Hanzelmann */ @RunWith( ConfigurationRunner.class ) public class PutTest extends AsyncConnectorSuiteConfiguration { @Test public void testArtifactUpload() throws Exception { addExpectation( "gid/aid/version/aid-version-classifier.extension", "artifact" ); addExpectation( "gid/aid/version/aid-version-classifier.extension.sha1", sha1( "artifact" ) ); addExpectation( "gid/aid/version/aid-version-classifier.extension.md5", md5( "artifact" ) ); Artifact artifact = artifact( "artifact" ); ArtifactUpload up = new ArtifactUpload( artifact, artifact.getFile() ); List uploads = Arrays.asList( up ); connector().put( uploads, null ); ArtifactTransferException ex = up.getException(); assertNull( ex != null ? ex.getMessage() : "", ex ); assertExpectations(); } @Test public void testMetadataUpload() throws Exception { String content = "metadata"; addExpectation( "gid/aid/version/maven-metadata.xml", content ); addExpectation( "gid/aid/version/maven-metadata.xml.sha1", sha1( content ) ); addExpectation( "gid/aid/version/maven-metadata.xml.md5", md5( content ) ); Metadata metadata = metadata( content ); List uploads = Arrays.asList( new MetadataUpload( metadata, metadata.getFile() ) ); connector().put( null, uploads ); assertExpectations(); } @Test( expected = Exception.class ) public void testClosedPut() throws Exception { connector().close(); Metadata metadata = metadata( "metadata" ); List uploads = Arrays.asList( new MetadataUpload( metadata, metadata.getFile() ) ); connector().put( null, uploads ); } @Test public void testCloseAfterArtifactUpload() throws Exception { Artifact artifact = artifact( "artifact" ); List uploads = Arrays.asList( new ArtifactUpload( artifact, artifact.getFile() ) ); connector().put( uploads, null ); connector().close(); } @Test public void testCloseAfterMetadataUpload() throws Exception { Metadata metadata = metadata( "metadata" ); List uploads = Arrays.asList( new MetadataUpload( metadata, metadata.getFile() ) ); connector().put( null, uploads ); connector().close(); } @Test @Ignore( "https://issues.sonatype.org/browse/AHC-5" ) public void testArtifactWithZeroBytesFile() throws Exception { String content = ""; addExpectation( "gid/aid/version/aid-version-classifier.extension", content ); addExpectation( "gid/aid/version/aid-version-classifier.extension.sha1", sha1( content ) ); addExpectation( "gid/aid/version/aid-version-classifier.extension.md5", md5( content ) ); Artifact artifact = artifact( content ); ArtifactUpload up = new ArtifactUpload( artifact, artifact.getFile() ); List uploads = Arrays.asList( up ); connector().put( uploads, null ); ArtifactTransferException ex = up.getException(); assertNull( ex != null ? ex.getMessage() : "", ex ); assertExpectations(); } @Test @Ignore( "https://issues.sonatype.org/browse/AHC-5" ) public void testMetadataWithZeroBytesFile() throws Exception { String content = ""; addExpectation( "gid/aid/version/maven-metadata.xml", content ); addExpectation( "gid/aid/version/maven-metadata.xml.sha1", sha1( content ) ); addExpectation( "gid/aid/version/maven-metadata.xml.md5", md5( content ) ); Metadata metadata = metadata( content ); List uploads = Arrays.asList( new MetadataUpload( metadata, metadata.getFile() ) ); connector().put( null, uploads ); assertExpectations(); } } RedirectGetTest.java000066400000000000000000000021401167050556700370540ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/test/java/org/sonatype/aether/connector/asyncpackage org.sonatype.aether.connector.async; /******************************************************************************* * 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.repository.RemoteRepository; import org.sonatype.tests.http.server.api.ServerProvider; import org.sonatype.tests.http.server.jetty.behaviour.Redirect; /** * @author Benjamin Hanzelmann * */ public class RedirectGetTest extends GetTest { @Override protected RemoteRepository repository() { return super.repository().setUrl( url( "redirect" ) ); } @Override public void configureProvider( ServerProvider provider ) { super.configureProvider( provider ); provider().addBehaviour( "/redirect/*", new Redirect( "^", "/repo" ) ); } } ResumeGetTest.java000066400000000000000000000151311167050556700365570ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/test/java/org/sonatype/aether/connector/asyncpackage org.sonatype.aether.connector.async; /******************************************************************************* * 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 static org.junit.Assert.*; import java.io.File; import java.io.IOException; import java.io.OutputStream; import java.net.HttpURLConnection; import java.util.Arrays; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.AbstractHandler; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.repository.RepositoryPolicy; import org.sonatype.aether.spi.connector.ArtifactDownload; import org.sonatype.aether.spi.connector.RepositoryConnector; import org.sonatype.aether.test.impl.SysoutLogger; import org.sonatype.aether.test.impl.TestFileProcessor; import org.sonatype.aether.test.impl.TestRepositorySystemSession; import org.sonatype.aether.test.util.TestFileUtils; import org.sonatype.aether.test.util.impl.StubArtifact; /** * */ public class ResumeGetTest { private AsyncRepositoryConnectorFactory factory; private TestRepositorySystemSession session; private Artifact artifact; private Server server; // NOTE: Length of pattern should not be divisable by 2 to catch data continuation errors during resume private static final int[] CONTENT_PATTERN = { 'a', 'B', ' ' }; @Before public void before() throws Exception { factory = new AsyncRepositoryConnectorFactory( new SysoutLogger(), new TestFileProcessor() ); session = new TestRepositorySystemSession(); artifact = new StubArtifact( "gid", "aid", "classifier", "extension", "version" ); server = new Server( 0 ); } @After public void after() throws Exception { if ( server != null ) { server.stop(); } factory = null; session = null; server = null; TestFileUtils.deleteTempFiles(); } private String url() { return "http://localhost:" + server.getConnectors()[0].getLocalPort() + "/"; } private void assertContentPattern( File file ) throws IOException { byte[] content = TestFileUtils.getContent( file ); for ( int i = 0; i < content.length; i++ ) { assertEquals( file.getAbsolutePath() + " corrupted at offset " + i, CONTENT_PATTERN[i % CONTENT_PATTERN.length], content[i] ); } } @Test public void testResumeInterruptedDownloadUsingRangeRequests() throws Exception { FlakyHandler flakyHandler = new FlakyHandler( 4 ); server.setHandler( flakyHandler ); server.start(); File file = TestFileUtils.createTempFile( "" ); file.delete(); ArtifactDownload download = new ArtifactDownload( artifact, "", file, RepositoryPolicy.CHECKSUM_POLICY_IGNORE ); RemoteRepository repo = new RemoteRepository( "test", "default", url() ); RepositoryConnector connector = factory.newInstance( session, repo ); try { connector.get( Arrays.asList( download ), null ); } finally { connector.close(); } assertNull( String.valueOf( download.getException() ), download.getException() ); assertTrue( "Missing " + file.getAbsolutePath(), file.isFile() ); assertEquals( "Bad size of " + file.getAbsolutePath(), flakyHandler.totalSize, file.length() ); assertContentPattern( file ); } private static class FlakyHandler extends AbstractHandler { private static final Pattern RANGE = Pattern.compile( "bytes=([0-9]+)-" ); private final int requiredRequests; private final Map madeRequests; private final int totalSize; private final int chunkSize; public FlakyHandler( int requiredRequests ) { this.requiredRequests = requiredRequests; madeRequests = new ConcurrentHashMap(); totalSize = 1024 * 128; chunkSize = ( requiredRequests > 1 ) ? totalSize / ( requiredRequests - 1 ) - 1 : totalSize; } public void handle( String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response ) throws IOException { Integer attempts = madeRequests.get( target ); attempts = ( attempts == null ) ? Integer.valueOf( 1 ) : Integer.valueOf( attempts.intValue() + 1 ); madeRequests.put( target, attempts ); if ( attempts.intValue() > requiredRequests ) { response.setStatus( HttpURLConnection.HTTP_BAD_REQUEST ); response.flushBuffer(); return; } int lb = 0, ub = totalSize - 1; String range = request.getHeader( "Range" ); if ( range != null && range.matches( RANGE.pattern() ) ) { Matcher m = RANGE.matcher( range ); m.matches(); lb = Integer.parseInt( m.group( 1 ) ); } response.setStatus( ( lb > 0 ) ? HttpURLConnection.HTTP_PARTIAL : HttpURLConnection.HTTP_OK ); response.setContentLength( totalSize - lb ); response.setContentType( "Content-type: text/plain; charset=UTF-8" ); if ( lb > 0 ) { response.setHeader( "Content-Range", "bytes " + lb + "-" + ub + "/" + totalSize ); } response.flushBuffer(); OutputStream out = response.getOutputStream(); for ( int i = lb, j = 0; i <= ub; i++, j++ ) { if ( j >= chunkSize ) { out.flush(); throw new IOException( "oups, we're dead" ); } out.write( CONTENT_PATTERN[i % CONTENT_PATTERN.length] ); } out.close(); } } } StutteringGetTest.java000066400000000000000000000016721167050556700374740ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/test/java/org/sonatype/aether/connector/asyncpackage org.sonatype.aether.connector.async; /******************************************************************************* * 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.junit.runner.RunWith; import org.sonatype.tests.http.runner.junit.ConfigurationRunner; import org.sonatype.tests.http.server.api.ServerProvider; /** * @author Benjamin Hanzelmann */ @RunWith( ConfigurationRunner.class ) public class StutteringGetTest extends GetTest { @Override public void configureProvider( ServerProvider provider ) { super.configureProvider( provider ); provide.setLatency( 100 ); } } TimeoutTest.java000066400000000000000000000042541167050556700363110ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/test/java/org/sonatype/aether/connector/asyncpackage org.sonatype.aether.connector.async; /******************************************************************************* * 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 static org.junit.Assert.*; import java.io.File; import java.util.Arrays; import java.util.Collection; import java.util.HashMap; import java.util.Map; import org.junit.Test; import org.junit.runner.RunWith; import org.sonatype.aether.ConfigurationProperties; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.repository.RepositoryPolicy; import org.sonatype.aether.spi.connector.ArtifactDownload; import org.sonatype.aether.test.util.TestFileUtils; import org.sonatype.tests.http.runner.junit.ConfigurationRunner; import org.sonatype.tests.http.server.api.ServerProvider; import org.sonatype.tests.http.server.jetty.behaviour.Pause; /** * @author Benjamin Hanzelmann */ @RunWith( ConfigurationRunner.class ) public class TimeoutTest extends AsyncConnectorSuiteConfiguration { @Override public void configureProvider( ServerProvider provider ) { provider.addBehaviour( "/repo/*", new Pause( 100000 ) ); } @Test( timeout = 3000 ) public void testRequestTimeout() throws Exception { Map configProps = new HashMap(); configProps.put( ConfigurationProperties.CONNECT_TIMEOUT, "60000" ); configProps.put( ConfigurationProperties.REQUEST_TIMEOUT, "1000" ); session().setConfigProperties( configProps ); File f = TestFileUtils.createTempFile( "" ); Artifact a = artifact( "foo" ); ArtifactDownload down = new ArtifactDownload( a, null, f, RepositoryPolicy.CHECKSUM_POLICY_FAIL ); Collection downs = Arrays.asList( down ); connector().get( downs, null ); assertNotNull( down.getException() ); } } aether-1.13.1/aether-connector-asynchttpclient/src/test/resources/000077500000000000000000000000001167050556700253135ustar00rootroot00000000000000aether-1.13.1/aether-connector-asynchttpclient/src/test/resources/logback-test.xml000066400000000000000000000014631167050556700304200ustar00rootroot00000000000000 %d{HH:mm:ss.SSS} [%-18thread] %c{1} [%p] %m%n aether-1.13.1/aether-connector-file/000077500000000000000000000000001167050556700172365ustar00rootroot00000000000000aether-1.13.1/aether-connector-file/pom.xml000066400000000000000000000043351167050556700205600ustar00rootroot00000000000000 4.0.0 org.sonatype.aether aether 1.13.1 aether-connector-file Aether :: Connector :: File A repository connector implementation for repositories using file:// URLs. org.sonatype.aether aether-api org.sonatype.aether aether-spi org.sonatype.aether aether-util org.codehaus.plexus plexus-component-annotations provided org.sonatype.sisu sisu-inject-plexus test junit junit test org.sonatype.aether aether-test-util test org.codehaus.mojo animal-sniffer-maven-plugin org.codehaus.plexus plexus-component-metadata aether-1.13.1/aether-connector-file/src/000077500000000000000000000000001167050556700200255ustar00rootroot00000000000000aether-1.13.1/aether-connector-file/src/main/000077500000000000000000000000001167050556700207515ustar00rootroot00000000000000aether-1.13.1/aether-connector-file/src/main/java/000077500000000000000000000000001167050556700216725ustar00rootroot00000000000000aether-1.13.1/aether-connector-file/src/main/java/org/000077500000000000000000000000001167050556700224615ustar00rootroot00000000000000aether-1.13.1/aether-connector-file/src/main/java/org/sonatype/000077500000000000000000000000001167050556700243235ustar00rootroot00000000000000aether-1.13.1/aether-connector-file/src/main/java/org/sonatype/aether/000077500000000000000000000000001167050556700255735ustar00rootroot00000000000000aether-1.13.1/aether-connector-file/src/main/java/org/sonatype/aether/connector/000077500000000000000000000000001167050556700275655ustar00rootroot00000000000000aether-1.13.1/aether-connector-file/src/main/java/org/sonatype/aether/connector/file/000077500000000000000000000000001167050556700305045ustar00rootroot00000000000000FileRepositoryConnector.java000066400000000000000000000111111167050556700361150ustar00rootroot00000000000000aether-1.13.1/aether-connector-file/src/main/java/org/sonatype/aether/connector/filepackage org.sonatype.aether.connector.file; /******************************************************************************* * 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 org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.spi.connector.ArtifactDownload; import org.sonatype.aether.spi.connector.ArtifactUpload; import org.sonatype.aether.spi.connector.MetadataDownload; import org.sonatype.aether.spi.connector.MetadataUpload; import org.sonatype.aether.spi.connector.RepositoryConnector; import org.sonatype.aether.spi.io.FileProcessor; import org.sonatype.aether.spi.log.Logger; import org.sonatype.aether.spi.log.NullLogger; import org.sonatype.aether.transfer.NoRepositoryConnectorException; import org.sonatype.aether.util.concurrency.RunnableErrorForwarder; /** * A connector for file://-URLs. * * @author Benjamin Hanzelmann */ public class FileRepositoryConnector extends ParallelRepositoryConnector implements RepositoryConnector { private RemoteRepository repository; private RepositorySystemSession session; private Logger logger = NullLogger.INSTANCE; private FileProcessor fileProcessor; public FileRepositoryConnector( RepositorySystemSession session, RemoteRepository repository, FileProcessor fileProcessor, Logger logger ) throws NoRepositoryConnectorException { if ( !"default".equals( repository.getContentType() ) ) { throw new NoRepositoryConnectorException( repository ); } this.session = session; this.repository = repository; this.fileProcessor = fileProcessor; this.logger = logger; initExecutor( session.getConfigProperties() ); } public void get( Collection artifactDownloads, Collection metadataDownloads ) { checkClosed(); artifactDownloads = notNull( artifactDownloads ); metadataDownloads = notNull( metadataDownloads ); RunnableErrorForwarder errorForwarder = new RunnableErrorForwarder(); for ( ArtifactDownload artifactDownload : artifactDownloads ) { FileRepositoryWorker worker = new FileRepositoryWorker( artifactDownload, repository, session ); worker.setLogger( logger ); worker.setFileProcessor( fileProcessor ); executor.execute( errorForwarder.wrap( worker ) ); } for ( MetadataDownload metadataDownload : metadataDownloads ) { FileRepositoryWorker worker = new FileRepositoryWorker( metadataDownload, repository, session ); worker.setLogger( logger ); worker.setFileProcessor( fileProcessor ); executor.execute( errorForwarder.wrap( worker ) ); } errorForwarder.await(); } private Collection notNull( Collection col ) { return col == null ? Collections. emptyList() : col; } public void put( Collection artifactUploads, Collection metadataUploads ) { checkClosed(); artifactUploads = notNull( artifactUploads ); metadataUploads = notNull( metadataUploads ); RunnableErrorForwarder errorForwarder = new RunnableErrorForwarder(); for ( ArtifactUpload artifactUpload : artifactUploads ) { FileRepositoryWorker worker = new FileRepositoryWorker( artifactUpload, repository, session ); worker.setLogger( logger ); worker.setFileProcessor( fileProcessor ); executor.execute( errorForwarder.wrap( worker ) ); } for ( MetadataUpload metadataUpload : metadataUploads ) { FileRepositoryWorker worker = new FileRepositoryWorker( metadataUpload, repository, session ); worker.setLogger( logger ); worker.setFileProcessor( fileProcessor ); executor.execute( errorForwarder.wrap( worker ) ); } errorForwarder.await(); } @Override public String toString() { return String.valueOf( repository ); } } FileRepositoryConnectorFactory.java000066400000000000000000000075261167050556700374640ustar00rootroot00000000000000aether-1.13.1/aether-connector-file/src/main/java/org/sonatype/aether/connector/filepackage org.sonatype.aether.connector.file; /******************************************************************************* * 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.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.component.annotations.Requirement; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.spi.connector.RepositoryConnector; import org.sonatype.aether.spi.connector.RepositoryConnectorFactory; import org.sonatype.aether.spi.io.FileProcessor; import org.sonatype.aether.spi.locator.Service; import org.sonatype.aether.spi.locator.ServiceLocator; import org.sonatype.aether.spi.log.Logger; import org.sonatype.aether.spi.log.NullLogger; import org.sonatype.aether.transfer.NoRepositoryConnectorException; /** * Factory creating {@link FileRepositoryConnector}s. * * @author Benjamin Hanzelmann */ @Component( role = RepositoryConnectorFactory.class, hint = "file" ) public class FileRepositoryConnectorFactory implements RepositoryConnectorFactory, Service { @Requirement private Logger logger = NullLogger.INSTANCE; @Requirement private FileProcessor fileProcessor; private int priority = 1; public static final String CFG_PREFIX = "aether.connector.file"; public FileRepositoryConnectorFactory() { // enables default constructor } public FileRepositoryConnectorFactory( Logger logger, FileProcessor fileProcessor ) { setLogger( logger ); setFileProcessor( fileProcessor ); } public void initService( ServiceLocator locator ) { setLogger( locator.getService( Logger.class ) ); setFileProcessor( locator.getService( FileProcessor.class ) ); } /** * Sets the logger to use for this component. * * @param logger The logger to use, may be {@code null} to disable logging. * @return This component for chaining, never {@code null}. */ public FileRepositoryConnectorFactory setLogger( Logger logger ) { this.logger = ( logger != null ) ? logger : NullLogger.INSTANCE; return this; } /** * Sets the file processor to use for this component. * * @param fileProcessor The file processor to use, must not be {@code null}. * @return This component for chaining, never {@code null}. */ public FileRepositoryConnectorFactory setFileProcessor( FileProcessor fileProcessor ) { if ( fileProcessor == null ) { throw new IllegalArgumentException( "file processor has not been specified" ); } this.fileProcessor = fileProcessor; return this; } public RepositoryConnector newInstance( RepositorySystemSession session, RemoteRepository repository ) throws NoRepositoryConnectorException { if ( "file".equalsIgnoreCase( repository.getProtocol() ) ) { FileRepositoryConnector connector = new FileRepositoryConnector( session, repository, fileProcessor, logger ); return connector; } throw new NoRepositoryConnectorException( repository ); } public int getPriority() { return priority; } /** * Sets the priority of this component. * * @param priority The priority. * @return This component for chaining, never {@code null}. */ public FileRepositoryConnectorFactory setPriority( int priority ) { this.priority = priority; return this; } } FileRepositoryWorker.java000066400000000000000000000410641167050556700354460ustar00rootroot00000000000000aether-1.13.1/aether-connector-file/src/main/java/org/sonatype/aether/connector/filepackage org.sonatype.aether.connector.file; /******************************************************************************* * 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.io.FileNotFoundException; import java.io.FileWriter; import java.io.IOException; import java.nio.ByteBuffer; import java.util.LinkedHashMap; import java.util.Map; import java.util.Map.Entry; import java.util.UUID; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.metadata.Metadata; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.repository.RepositoryPolicy; import org.sonatype.aether.spi.connector.ArtifactDownload; import org.sonatype.aether.spi.connector.ArtifactTransfer; import org.sonatype.aether.spi.connector.ArtifactUpload; import org.sonatype.aether.spi.connector.MetadataDownload; import org.sonatype.aether.spi.connector.MetadataTransfer; import org.sonatype.aether.spi.connector.MetadataUpload; import org.sonatype.aether.spi.connector.RepositoryConnector; import org.sonatype.aether.spi.connector.Transfer; import org.sonatype.aether.spi.connector.Transfer.State; import org.sonatype.aether.spi.io.FileProcessor; import org.sonatype.aether.spi.log.Logger; import org.sonatype.aether.spi.log.NullLogger; import org.sonatype.aether.transfer.ArtifactNotFoundException; import org.sonatype.aether.transfer.ArtifactTransferException; import org.sonatype.aether.transfer.ChecksumFailureException; import org.sonatype.aether.transfer.MetadataNotFoundException; import org.sonatype.aether.transfer.MetadataTransferException; import org.sonatype.aether.transfer.TransferCancelledException; import org.sonatype.aether.transfer.TransferEvent; import org.sonatype.aether.transfer.TransferEvent.RequestType; import org.sonatype.aether.util.ChecksumUtils; import org.sonatype.aether.util.layout.MavenDefaultLayout; import org.sonatype.aether.util.layout.RepositoryLayout; import org.sonatype.aether.util.listener.DefaultTransferEvent; import org.sonatype.aether.util.listener.DefaultTransferResource; /** * The actual class doing all the work. Handles artifact and metadata up- and downloads. * * @author Benjamin Hanzelmann */ class FileRepositoryWorker implements Runnable { private Logger logger = NullLogger.INSTANCE; private FileProcessor fileProcessor; private enum Direction { UPLOAD( TransferEvent.RequestType.PUT ), DOWNLOAD( TransferEvent.RequestType.GET ); TransferEvent.RequestType type; private Direction( TransferEvent.RequestType type ) { this.type = type; } public RequestType getType() { return type; } } private static LinkedHashMap checksumAlgos; private final RepositoryLayout layout = new MavenDefaultLayout(); private TransferWrapper transfer; private final RemoteRepository repository; private final TransferEventCatapult catapult; private final Direction direction; private DefaultTransferResource resource; static { checksumAlgos = new LinkedHashMap( 4 ); checksumAlgos.put( "SHA-1", ".sha1" ); checksumAlgos.put( "MD5", ".md5" ); } private FileRepositoryWorker( ArtifactTransfer transfer, RemoteRepository repository, Direction direction, RepositorySystemSession session ) { this( session, repository, direction ); if ( transfer == null ) { throw new IllegalArgumentException( "Transfer may not be null." ); } this.transfer = new TransferWrapper( transfer ); } private FileRepositoryWorker( MetadataTransfer transfer, RemoteRepository repository, Direction direction, RepositorySystemSession session ) { this( session, repository, direction ); if ( transfer == null ) { throw new IllegalArgumentException( "Transfer may not be null." ); } this.transfer = new TransferWrapper( transfer ); } /** * Initialize the worker for an artifact upload. * * @param transfer The actual {@link Transfer}-object. May not be null. * @param repository The repository definition. May not be null. * @param session The current repository system session. May not be null. */ public FileRepositoryWorker( ArtifactUpload transfer, RemoteRepository repository, RepositorySystemSession session ) { this( transfer, repository, Direction.UPLOAD, session ); } /** * Initialize the worker for an artifact download. * * @param transfer The actual {@link Transfer}-object. May not be null. * @param repository The repository definition. May not be null. * @param session The current repository system session. May not be null. */ public FileRepositoryWorker( ArtifactDownload transfer, RemoteRepository repository, RepositorySystemSession session ) { this( transfer, repository, Direction.DOWNLOAD, session ); } /** * Initialize the worker for an metadata download. * * @param transfer The actual {@link Transfer}-object. May not be null. * @param repository The repository definition. May not be null. * @param session The current repository system session. May not be null. */ public FileRepositoryWorker( MetadataDownload transfer, RemoteRepository repository, RepositorySystemSession session ) { this( transfer, repository, Direction.DOWNLOAD, session ); } /** * Initialize the worker for an metadata upload. * * @param transfer The actual {@link Transfer}-object. May not be null. * @param repository The repository definition. May not be null. * @param session The current repository system session. May not be null. */ public FileRepositoryWorker( MetadataUpload transfer, RemoteRepository repository, RepositorySystemSession session ) { this( transfer, repository, Direction.UPLOAD, session ); } private FileRepositoryWorker( RepositorySystemSession session, RemoteRepository repository, Direction direction ) { if ( repository == null ) { throw new IllegalArgumentException( "RemoteRepository may not be null." ); } if ( session == null ) { throw new IllegalArgumentException( "RepositorySystemSession may not be null." ); } this.catapult = new TransferEventCatapult( session.getTransferListener() ); this.direction = direction; this.repository = repository; } /** * Do transfer according to {@link RepositoryConnector} specifications. * * @see FileRepositoryConnector */ public void run() { File target = null; long totalTransferred = -1; try { transfer.setState( State.ACTIVE ); resource = newResource( transfer, repository ); DefaultTransferEvent event = newEvent( transfer ); catapult.fireInitiated( event ); File baseDir = new File( PathUtils.basedir( repository.getUrl() ) ); File localFile = transfer.getFile(); File repoFile = new File( baseDir, transfer.getRelativePath() ); File src = null; switch ( direction ) { case UPLOAD: src = localFile; target = repoFile; break; case DOWNLOAD: src = repoFile; target = localFile; break; } if ( transfer.isExistenceCheck() ) { if ( !src.exists() ) { throw new FileNotFoundException( src.getAbsolutePath() ); } } else { File tmp = tmpfile( target ); totalTransferred = copy( src, tmp ); fileProcessor.move( tmp, target ); switch ( direction ) { case UPLOAD: writeChecksum( src, target.getPath() ); break; case DOWNLOAD: verifyChecksum( src ); break; } } } catch ( FileNotFoundException e ) { switch ( transfer.getType() ) { case ARTIFACT: ArtifactTransferException artEx; if ( Direction.DOWNLOAD.equals( direction ) ) { artEx = new ArtifactNotFoundException( transfer.getArtifact(), repository ); } else { artEx = new ArtifactTransferException( transfer.getArtifact(), repository, e ); } transfer.setException( artEx ); break; case METADATA: MetadataTransferException mdEx; if ( Direction.DOWNLOAD.equals( direction ) ) { mdEx = new MetadataNotFoundException( transfer.getMetadata(), repository ); } else { mdEx = new MetadataTransferException( transfer.getMetadata(), repository, e ); } transfer.setException( mdEx ); break; } } catch ( Throwable t ) { logger.debug( t.getMessage(), t ); switch ( transfer.getType() ) { case ARTIFACT: transfer.setException( new ArtifactTransferException( transfer.getArtifact(), repository, t ) ); break; case METADATA: transfer.setException( new MetadataTransferException( transfer.getMetadata(), repository, t ) ); break; } } finally { transfer.setState( State.DONE ); if ( transfer.getException() == null ) { DefaultTransferEvent event = newEvent( transfer ); event.setTransferredBytes( (int) totalTransferred ); catapult.fireSucceeded( event ); } else { // cleanup if ( direction.equals( Direction.UPLOAD ) ) { for ( String ext : checksumAlgos.values() ) { new File( target.getPath() + ext ).delete(); } } if ( target != null ) { target.delete(); } DefaultTransferEvent event = newEvent( transfer ); catapult.fireFailed( event ); } } } private void writeChecksum( File src, String targetPath ) throws IOException, Throwable { // write checksum files Map crcs = ChecksumUtils.calc( src, checksumAlgos.keySet() ); for ( Entry crc : crcs.entrySet() ) { String name = crc.getKey(); Object sum = crc.getValue(); if ( sum instanceof Throwable ) { throw (Throwable) sum; } File crcTarget = new File( targetPath + checksumAlgos.get( name ) ); FileWriter crcWriter = new FileWriter( crcTarget ); crcWriter.write( sum.toString() ); crcWriter.close(); } } private void verifyChecksum( File src ) throws ChecksumFailureException, IOException, TransferCancelledException { if ( RepositoryPolicy.CHECKSUM_POLICY_IGNORE.equals( transfer.getChecksumPolicy() ) ) { return; } Map crcs = ChecksumUtils.calc( src, checksumAlgos.keySet() ); boolean verified = false; try { for ( Entry entry : checksumAlgos.entrySet() ) { try { String sum = ChecksumUtils.read( new File( src.getPath() + entry.getValue() ) ); verified = sum.equalsIgnoreCase( crcs.get( entry.getKey() ).toString() ); if ( !verified ) { throw new ChecksumFailureException( sum, crcs.get( entry.getKey() ).toString() ); } break; } catch ( IOException e ) { // skip verify - try next algorithm continue; } } // all algorithms checked if ( !verified ) { throw new ChecksumFailureException( "no supported algorithms found" ); } } catch ( ChecksumFailureException e ) { if ( RepositoryPolicy.CHECKSUM_POLICY_FAIL.equals( transfer.getChecksumPolicy() ) ) { throw e; } DefaultTransferEvent event = newEvent( transfer ); event.setException( e ); catapult.fireCorrupted( event ); } } private long copy( File src, File target ) throws TransferCancelledException, IOException { if ( src == null ) { throw new IllegalArgumentException( "source file not specified" ); } if ( !src.isFile() ) { throw new FileNotFoundException( src.getAbsolutePath() ); } if ( target == null ) { throw new IllegalArgumentException( "target file not specified" ); } resource.setContentLength( src.length() ); DefaultTransferEvent event = newEvent( transfer ); catapult.fireStarted( event ); return fileProcessor.copy( src, target, new FileProcessor.ProgressListener() { int total = 0; public void progressed( ByteBuffer buffer ) throws IOException { total += buffer.remaining(); DefaultTransferEvent event = newEvent( transfer ); event.setDataBuffer( buffer ).setTransferredBytes( total ); try { catapult.fireProgressed( event ); } catch ( TransferCancelledException e ) { throw new IOException( "Transfer was cancelled: " + e.getMessage() ); } } } ); } private DefaultTransferEvent newEvent( TransferWrapper transfer ) { DefaultTransferEvent event = new DefaultTransferEvent(); event.setResource( resource ); event.setRequestType( direction.getType() ); event.setException( transfer.getException() ); return event; } private DefaultTransferResource newResource( TransferWrapper transfer, RemoteRepository repository ) { String resourceName = null; switch ( transfer.getType() ) { case ARTIFACT: Artifact artifact = transfer.getArtifact(); resourceName = layout.getPath( artifact ).getPath(); break; case METADATA: Metadata metadata = transfer.getMetadata(); resourceName = layout.getPath( metadata ).getPath(); break; } return new DefaultTransferResource( PathUtils.decode( repository.getUrl() ), resourceName, transfer.getFile(), transfer.getTrace() ); } public void setLogger( Logger logger ) { this.logger = logger; } public void setFileProcessor( FileProcessor fileProcessor ) { this.fileProcessor = fileProcessor; } private File tmpfile( File target ) { return new File( target.getAbsolutePath() + ".tmp" + UUID.randomUUID().toString().replace( "-", "" ).substring( 0, 16 ) ); } } ParallelRepositoryConnector.java000066400000000000000000000061241167050556700370020ustar00rootroot00000000000000aether-1.13.1/aether-connector-file/src/main/java/org/sonatype/aether/connector/filepackage org.sonatype.aether.connector.file; /******************************************************************************* * 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 static org.sonatype.aether.connector.file.FileRepositoryConnectorFactory.*; import java.util.Map; import java.util.concurrent.Executor; import java.util.concurrent.ExecutorService; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.ThreadFactory; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import org.sonatype.aether.util.ConfigUtils; /** * Provides methods to configure the used {@link ThreadPoolExecutor}. * * @author Benjamin Hanzelmann */ abstract class ParallelRepositoryConnector { /* * Default Configuration */ private static final int MAX_POOL_SIZE = 5; private boolean closed = false; /** * The executor to use. * * @see #initExecutor() */ protected Executor executor; protected void initExecutor( Map config ) { if ( executor == null ) { int threads = ConfigUtils.getInteger( config, MAX_POOL_SIZE, CFG_PREFIX + ".threads" ); if ( threads <= 1 ) { executor = new Executor() { public void execute( Runnable command ) { command.run(); } }; } else { ThreadFactory threadFactory = new RepositoryConnectorThreadFactory( getClass().getSimpleName() ); executor = new ThreadPoolExecutor( threads, threads, 3, TimeUnit.SECONDS, new LinkedBlockingQueue(), threadFactory ); } } } public void close() { this.closed = true; if ( executor instanceof ExecutorService ) { ( (ExecutorService) executor ).shutdown(); } } protected void checkClosed() { if ( closed ) { throw new IllegalStateException( "Connector is closed" ); } } protected static class RepositoryConnectorThreadFactory implements ThreadFactory { private final AtomicInteger counter = new AtomicInteger( 1 ); private final String threadName; public RepositoryConnectorThreadFactory( String threadName ) { this.threadName = threadName; } public Thread newThread( Runnable r ) { Thread t = new Thread( r, threadName + "-" + counter.getAndIncrement() ); t.setDaemon( true ); return t; } } } aether-1.13.1/aether-connector-file/src/main/java/org/sonatype/aether/connector/file/PathUtils.java000066400000000000000000000101151167050556700332620ustar00rootroot00000000000000package org.sonatype.aether.connector.file; /******************************************************************************* * 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 *******************************************************************************/ /** * URL handling for file URLs. Based on org.apache.maven.wagon.PathUtils. * * @author Benjamin Hanzelmann */ final class PathUtils { private PathUtils() { } /** * Return the protocol name.
* E.g: for input http://www.codehause.org this method will return http * * @param url the url * @return the host name */ public static String protocol( final String url ) { final int pos = url.indexOf( ":" ); if ( pos == -1 ) { return ""; } return url.substring( 0, pos ).trim(); } /** * Derive the path portion of the given URL. * * @param url the file-repository URL * @return the basedir of the repository */ public static String basedir( String url ) { String protocol = PathUtils.protocol( url ); String retValue = null; if ( protocol.length() > 0 ) { retValue = url.substring( protocol.length() + 1 ); } else { retValue = url; } retValue = decode( retValue ); // special case: if omitted // on protocol, keep path as is if ( retValue.startsWith( "//" ) ) { retValue = retValue.substring( 2 ); if ( retValue.length() >= 2 && ( retValue.charAt( 1 ) == '|' || retValue.charAt( 1 ) == ':' ) ) { // special case: if there is a windows drive letter, then keep the original return value retValue = retValue.charAt( 0 ) + ":" + retValue.substring( 2 ); } else { // Now we expect the host int index = retValue.indexOf( "/" ); if ( index >= 0 ) { retValue = retValue.substring( index + 1 ); } // special case: if there is a windows drive letter, then keep the original return value if ( retValue.length() >= 2 && ( retValue.charAt( 1 ) == '|' || retValue.charAt( 1 ) == ':' ) ) { retValue = retValue.charAt( 0 ) + ":" + retValue.substring( 2 ); } else if ( index >= 0 ) { // leading / was previously stripped retValue = "/" + retValue; } } } // special case: if there is a windows drive letter using |, switch to : if ( retValue.length() >= 2 && retValue.charAt( 1 ) == '|' ) { retValue = retValue.charAt( 0 ) + ":" + retValue.substring( 2 ); } return retValue.trim(); } /** * Decodes the specified (portion of a) URL. Note: This decoder assumes that ISO-8859-1 is used to * convert URL-encoded octets to characters. * * @param url The URL to decode, may be null. * @return The decoded URL or null if the input was null. */ static String decode( String url ) { String decoded = url; if ( url != null ) { int pos = -1; while ( ( pos = decoded.indexOf( '%', pos + 1 ) ) >= 0 ) { if ( pos + 2 < decoded.length() ) { String hexStr = decoded.substring( pos + 1, pos + 3 ); char ch = (char) Integer.parseInt( hexStr, 16 ); decoded = decoded.substring( 0, pos ) + ch + decoded.substring( pos + 3 ); } } } return decoded; } } TransferEventCatapult.java000066400000000000000000000047601167050556700355630ustar00rootroot00000000000000aether-1.13.1/aether-connector-file/src/main/java/org/sonatype/aether/connector/filepackage org.sonatype.aether.connector.file; /******************************************************************************* * 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.AbstractTransferListener; import org.sonatype.aether.transfer.TransferCancelledException; import org.sonatype.aether.transfer.TransferEvent; import org.sonatype.aether.transfer.TransferListener; import org.sonatype.aether.util.listener.DefaultTransferEvent; /** * Helper for {@link TransferEvent}-handling. * * @author Benjamin Hanzelmann */ class TransferEventCatapult { private TransferListener listener; public TransferEventCatapult( TransferListener listener ) { if ( listener == null ) { this.listener = new NoTransferListener(); } else { this.listener = listener; } } protected void fireInitiated( DefaultTransferEvent event ) throws TransferCancelledException { event.setType( TransferEvent.EventType.INITIATED ); listener.transferInitiated( event ); } protected void fireStarted( DefaultTransferEvent event ) throws TransferCancelledException { event.setType( TransferEvent.EventType.STARTED ); listener.transferStarted( event ); } protected void fireSucceeded( DefaultTransferEvent event ) { event.setType( TransferEvent.EventType.SUCCEEDED ); listener.transferSucceeded( event ); } protected void fireFailed( DefaultTransferEvent event ) { event.setType( TransferEvent.EventType.FAILED ); listener.transferFailed( event ); } protected void fireCorrupted( DefaultTransferEvent event ) throws TransferCancelledException { event.setType( TransferEvent.EventType.FAILED ); listener.transferCorrupted( event ); } protected void fireProgressed( DefaultTransferEvent event ) throws TransferCancelledException { event.setType( TransferEvent.EventType.PROGRESSED ); listener.transferProgressed( event ); } private final class NoTransferListener extends AbstractTransferListener { } } TransferWrapper.java000066400000000000000000000125511167050556700344210ustar00rootroot00000000000000aether-1.13.1/aether-connector-file/src/main/java/org/sonatype/aether/connector/filepackage org.sonatype.aether.connector.file; /******************************************************************************* * 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 org.sonatype.aether.RequestTrace; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.metadata.Metadata; import org.sonatype.aether.spi.connector.ArtifactDownload; import org.sonatype.aether.spi.connector.ArtifactTransfer; import org.sonatype.aether.spi.connector.MetadataDownload; import org.sonatype.aether.spi.connector.MetadataTransfer; import org.sonatype.aether.spi.connector.Transfer; import org.sonatype.aether.spi.connector.Transfer.State; import org.sonatype.aether.transfer.ArtifactTransferException; import org.sonatype.aether.transfer.MetadataTransferException; import org.sonatype.aether.util.layout.MavenDefaultLayout; /** * Wrapper object for {@link ArtifactTransfer} and {@link MetadataTransfer} objects. * * @author Benjamin Hanzelmann */ class TransferWrapper { public enum Type { ARTIFACT, METADATA } private Type type; public Type getType() { return type; } private MetadataTransfer metadataTransfer; private ArtifactTransfer artifactTransfer; private Transfer transfer; private String checksumPolicy = null; private boolean existenceCheck = false; public TransferWrapper( ArtifactTransfer transfer ) { this.artifactTransfer = transfer; this.transfer = transfer; this.type = Type.ARTIFACT; if ( transfer instanceof ArtifactDownload ) { this.checksumPolicy = ( (ArtifactDownload) transfer ).getChecksumPolicy(); this.existenceCheck = ( (ArtifactDownload) transfer ).isExistenceCheck(); } } public TransferWrapper( MetadataTransfer transfer ) { this.metadataTransfer = transfer; this.transfer = transfer; this.type = Type.METADATA; if ( transfer instanceof MetadataDownload ) { this.checksumPolicy = ( (MetadataDownload) transfer ).getChecksumPolicy(); } } public void setState( State new1 ) { transfer.setState( new1 ); } public File getFile() { File ret = null; if ( metadataTransfer != null ) { ret = metadataTransfer.getFile(); } else if ( artifactTransfer != null ) { ret = artifactTransfer.getFile(); } if ( ret == null ) { if ( metadataTransfer != null ) { ret = metadataTransfer.getMetadata().getFile(); } else if ( artifactTransfer != null ) { ret = artifactTransfer.getArtifact().getFile(); } } return ret; } public Artifact getArtifact() { if ( artifactTransfer != null ) { return artifactTransfer.getArtifact(); } else { throw new IllegalStateException( "TransferWrapper holds the wrong type" ); } } public void setException( ArtifactTransferException exception ) { if ( artifactTransfer != null ) { artifactTransfer.setException( exception ); } else { throw new IllegalStateException( "TransferWrapper holds the wrong type" ); } } public void setException( MetadataTransferException exception ) { if ( metadataTransfer != null ) { metadataTransfer.setException( exception ); } else { throw new IllegalStateException( "TransferWrapper holds the wrong type" ); } } public Exception getException() { if ( artifactTransfer != null ) { return artifactTransfer.getException(); } else if ( metadataTransfer != null ) { return metadataTransfer.getException(); } else { throw new IllegalStateException( "TransferWrapper holds the wrong type" ); } } public Metadata getMetadata() { return metadataTransfer.getMetadata(); } public String getChecksumPolicy() { return this.checksumPolicy; } public boolean isExistenceCheck() { return existenceCheck; } public String getRelativePath() { if ( artifactTransfer != null ) { return new MavenDefaultLayout().getPath( getArtifact() ).getRawPath(); } else if ( metadataTransfer != null ) { return new MavenDefaultLayout().getPath( getMetadata() ).getRawPath(); } else { return null; } } public RequestTrace getTrace() { if ( artifactTransfer != null ) { return artifactTransfer.getTrace(); } else if ( metadataTransfer != null ) { return metadataTransfer.getTrace(); } else { return null; } } } aether-1.13.1/aether-connector-file/src/test/000077500000000000000000000000001167050556700210045ustar00rootroot00000000000000aether-1.13.1/aether-connector-file/src/test/java/000077500000000000000000000000001167050556700217255ustar00rootroot00000000000000aether-1.13.1/aether-connector-file/src/test/java/org/000077500000000000000000000000001167050556700225145ustar00rootroot00000000000000aether-1.13.1/aether-connector-file/src/test/java/org/sonatype/000077500000000000000000000000001167050556700243565ustar00rootroot00000000000000aether-1.13.1/aether-connector-file/src/test/java/org/sonatype/aether/000077500000000000000000000000001167050556700256265ustar00rootroot00000000000000aether-1.13.1/aether-connector-file/src/test/java/org/sonatype/aether/connector/000077500000000000000000000000001167050556700276205ustar00rootroot00000000000000aether-1.13.1/aether-connector-file/src/test/java/org/sonatype/aether/connector/file/000077500000000000000000000000001167050556700305375ustar00rootroot00000000000000ArtifactWorkerTest.java000066400000000000000000000145011167050556700351130ustar00rootroot00000000000000aether-1.13.1/aether-connector-file/src/test/java/org/sonatype/aether/connector/filepackage org.sonatype.aether.connector.file; /******************************************************************************* * 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 static org.junit.Assert.*; import java.io.File; import java.io.IOException; import java.net.URI; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.metadata.Metadata.Nature; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.repository.RepositoryPolicy; import org.sonatype.aether.spi.connector.ArtifactDownload; import org.sonatype.aether.spi.connector.ArtifactUpload; import org.sonatype.aether.spi.connector.MetadataDownload; import org.sonatype.aether.spi.connector.MetadataUpload; import org.sonatype.aether.test.impl.TestFileProcessor; import org.sonatype.aether.test.impl.TestRepositorySystemSession; import org.sonatype.aether.test.util.TestFileUtils; import org.sonatype.aether.transfer.ArtifactTransferException; import org.sonatype.aether.transfer.MetadataTransferException; import org.sonatype.aether.util.artifact.DefaultArtifact; import org.sonatype.aether.util.layout.MavenDefaultLayout; import org.sonatype.aether.util.layout.RepositoryLayout; import org.sonatype.aether.util.metadata.DefaultMetadata; public class ArtifactWorkerTest { private RemoteRepository repository; private TestRepositorySystemSession session; private RepositoryLayout layout; @Before public void setup() throws IOException { repository = new RemoteRepository( "test", "default", TestFileUtils.createTempDir( "test-remote-repository" ).toURL().toString() ); session = new TestRepositorySystemSession(); layout = new MavenDefaultLayout(); } @After public void cleanup() throws Exception { TestFileUtils.delete( new File( new URI( repository.getUrl() ) ) ); } @Test public void testArtifactTransfer() throws IOException, ArtifactTransferException { DefaultArtifact artifact = new DefaultArtifact( "test", "artId1", "jar", "1" ); String expectedContent = "Dies ist ein Test."; uploadArtifact( artifact, expectedContent ); File file = downloadArtifact( artifact ); assertContentEquals( file, expectedContent ); } private File downloadArtifact( DefaultArtifact artifact ) throws IOException, ArtifactTransferException { File file = TestFileUtils.createTempFile( "" ); ArtifactDownload down = new ArtifactDownload( artifact, "", file, "" ); down.setChecksumPolicy( RepositoryPolicy.CHECKSUM_POLICY_FAIL ); FileRepositoryWorker worker = new FileRepositoryWorker( down, repository, session ); worker.setFileProcessor( TestFileProcessor.INSTANCE ); worker.run(); if ( down.getException() != null ) { throw down.getException(); } return file; } private void uploadArtifact( Artifact artifact, String content ) throws IOException, ArtifactTransferException { File file = TestFileUtils.createTempFile( content ); ArtifactUpload transfer = new ArtifactUpload( artifact, file ); FileRepositoryWorker worker = new FileRepositoryWorker( transfer, repository, session ); worker.setFileProcessor( TestFileProcessor.INSTANCE ); worker.run(); TestFileUtils.delete( file ); if ( transfer.getException() != null ) { throw transfer.getException(); } } @Test public void testMetadataTransfer() throws IOException, MetadataTransferException { String expectedContent = "Dies ist ein Test."; File srcFile = TestFileUtils.createTempFile( expectedContent ); DefaultMetadata metadata = new DefaultMetadata( "test", "artId1", "1", "jar", Nature.RELEASE_OR_SNAPSHOT ); MetadataUpload up = new MetadataUpload( metadata, srcFile ); FileRepositoryWorker worker = new FileRepositoryWorker( up, repository, session ); worker.setFileProcessor( TestFileProcessor.INSTANCE ); worker.run(); if ( up.getException() != null ) { throw up.getException(); } File targetFile = TestFileUtils.createTempFile( "" ); TestFileUtils.delete( targetFile ); MetadataDownload down = new MetadataDownload(); down.setChecksumPolicy( RepositoryPolicy.CHECKSUM_POLICY_FAIL ); down.setMetadata( metadata ).setFile( targetFile ); worker = new FileRepositoryWorker( down, repository, session ); worker.setFileProcessor( TestFileProcessor.INSTANCE ); worker.run(); if ( down.getException() != null ) { throw down.getException(); } assertTrue( "download did not happen.", targetFile.exists() ); assertContentEquals( targetFile, expectedContent ); } private void assertContentEquals( File file, String expectedContent ) throws IOException { byte[] expected = expectedContent.getBytes( "UTF-8" ); byte[] actual = TestFileUtils.getContent( file ); assertArrayEquals( expected, actual ); } @Test public void testDecodeURL() throws ArtifactTransferException, IOException { String enc = "%72%65%70%6F"; File dir = TestFileUtils.createTempDir(); String repoDir = dir.toURI().toURL().toString() + "/" + enc; repository = new RemoteRepository( "test", "default", repoDir ); Artifact artifact = new DefaultArtifact( "gid", "aid", "jar", "ver" ); String content = "test content"; uploadArtifact( artifact, content ); File repo = new File( dir, "repo" ); assertTrue( "Repository from encoded URL does not exist.", repo.exists() ); assertTrue( "Artifact was not uploaded correctly.", new File( repo, layout.getPath( artifact ).getRawPath() ).exists() ); TestFileUtils.delete( dir ); } } PlexusSupportTest.java000066400000000000000000000025211167050556700350400ustar00rootroot00000000000000aether-1.13.1/aether-connector-file/src/test/java/org/sonatype/aether/connector/filepackage org.sonatype.aether.connector.file; /******************************************************************************* * 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.codehaus.plexus.PlexusTestCase; import org.sonatype.aether.spi.connector.RepositoryConnectorFactory; import org.sonatype.aether.spi.io.FileProcessor; import org.sonatype.aether.spi.log.Logger; import org.sonatype.aether.test.impl.SysoutLogger; import org.sonatype.aether.test.impl.TestFileProcessor; /** */ public class PlexusSupportTest extends PlexusTestCase { public void testExistenceOfPlexusComponentMetadata() throws Exception { getContainer().addComponent( new SysoutLogger(), Logger.class, null ); getContainer().addComponent( new TestFileProcessor(), FileProcessor.class, null ); RepositoryConnectorFactory factory = lookup( RepositoryConnectorFactory.class, "file" ); assertNotNull( factory ); assertEquals( FileRepositoryConnectorFactory.class, factory.getClass() ); } } aether-1.13.1/aether-connector-file/src/test/java/org/sonatype/aether/connector/file/TestSuite.java000066400000000000000000000047271167050556700333450ustar00rootroot00000000000000package org.sonatype.aether.connector.file; /******************************************************************************* * 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.io.IOException; import java.net.MalformedURLException; import java.util.Map; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.spi.connector.RepositoryConnectorFactory; import org.sonatype.aether.test.impl.TestFileProcessor; import org.sonatype.aether.test.util.TestFileUtils; import org.sonatype.aether.test.util.connector.suite.ConnectorTestSetup.AbstractConnectorTestSetup; import org.sonatype.aether.test.util.connector.suite.ConnectorTestSuite; /** * @author Benjamin Hanzelmann */ public class TestSuite extends ConnectorTestSuite { /** * @author Benjamin Hanzelmann */ private static final class FileConnectorTestSetup extends AbstractConnectorTestSetup { private File repoFile; public RepositoryConnectorFactory factory() { return new FileRepositoryConnectorFactory().setFileProcessor( TestFileProcessor.INSTANCE ); } @Override public void after( RepositorySystemSession session, RemoteRepository repository, Map context ) throws Exception { TestFileUtils.delete( repoFile ); } public RemoteRepository before( RepositorySystemSession session, Map context ) throws IOException { RemoteRepository repo = null; repoFile = TestFileUtils.createTempDir( "test-repo" ); try { repo = new RemoteRepository( "test-file", "default", repoFile.toURI().toURL().toString() ); } catch ( MalformedURLException e ) { throw new UnsupportedOperationException( "File.toURI().toURL() failed" ); } return repo; } } public TestSuite() { super( new FileConnectorTestSetup() ); } } aether-1.13.1/aether-connector-wagon/000077500000000000000000000000001167050556700174325ustar00rootroot00000000000000aether-1.13.1/aether-connector-wagon/pom.xml000066400000000000000000000057711167050556700207610ustar00rootroot00000000000000 4.0.0 org.sonatype.aether aether 1.13.1 aether-connector-wagon Aether :: Connector :: Wagon A repository connector implementation based on Maven Wagon. 1.0-beta-6 org.sonatype.aether aether-api org.sonatype.aether aether-spi org.sonatype.aether aether-util org.apache.maven.wagon wagon-provider-api ${wagonVersion} org.codehaus.plexus plexus-component-annotations provided org.codehaus.plexus plexus-classworlds 2.4 org.codehaus.plexus plexus-utils 2.0.7 org.sonatype.sisu sisu-inject-plexus org.sonatype.aether aether-test-util test org.apache.maven.wagon wagon-http-lightweight ${wagonVersion} test org.sonatype.http-testing-harness server-provider 0.4.1 test org.codehaus.mojo animal-sniffer-maven-plugin org.codehaus.plexus plexus-component-metadata aether-1.13.1/aether-connector-wagon/src/000077500000000000000000000000001167050556700202215ustar00rootroot00000000000000aether-1.13.1/aether-connector-wagon/src/main/000077500000000000000000000000001167050556700211455ustar00rootroot00000000000000aether-1.13.1/aether-connector-wagon/src/main/java/000077500000000000000000000000001167050556700220665ustar00rootroot00000000000000aether-1.13.1/aether-connector-wagon/src/main/java/org/000077500000000000000000000000001167050556700226555ustar00rootroot00000000000000aether-1.13.1/aether-connector-wagon/src/main/java/org/sonatype/000077500000000000000000000000001167050556700245175ustar00rootroot00000000000000aether-1.13.1/aether-connector-wagon/src/main/java/org/sonatype/aether/000077500000000000000000000000001167050556700257675ustar00rootroot00000000000000aether-1.13.1/aether-connector-wagon/src/main/java/org/sonatype/aether/connector/000077500000000000000000000000001167050556700277615ustar00rootroot00000000000000aether-1.13.1/aether-connector-wagon/src/main/java/org/sonatype/aether/connector/wagon/000077500000000000000000000000001167050556700310745ustar00rootroot00000000000000PlexusWagonConfigurator.java000066400000000000000000000062531167050556700365250ustar00rootroot00000000000000aether-1.13.1/aether-connector-wagon/src/main/java/org/sonatype/aether/connector/wagonpackage org.sonatype.aether.connector.wagon; /******************************************************************************* * 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.apache.maven.wagon.Wagon; import org.codehaus.plexus.PlexusContainer; import org.codehaus.plexus.classworlds.realm.ClassRealm; import org.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.component.annotations.Requirement; import org.codehaus.plexus.component.configurator.AbstractComponentConfigurator; import org.codehaus.plexus.component.configurator.ComponentConfigurationException; import org.codehaus.plexus.component.configurator.ConfigurationListener; import org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter; import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator; import org.codehaus.plexus.configuration.PlexusConfiguration; import org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration; import org.codehaus.plexus.util.xml.Xpp3Dom; /** * A wagon configurator based on the Plexus component configuration framework. * * @author Benjamin Bentmann */ @Component( role = WagonConfigurator.class, hint = "plexus" ) public class PlexusWagonConfigurator implements WagonConfigurator { @Requirement private PlexusContainer container; public void configure( Wagon wagon, Object configuration ) throws Exception { PlexusConfiguration config = null; if ( configuration instanceof PlexusConfiguration ) { config = (PlexusConfiguration) configuration; } else if ( configuration instanceof Xpp3Dom ) { config = new XmlPlexusConfiguration( (Xpp3Dom) configuration ); } else if ( configuration == null ) { return; } else { throw new IllegalArgumentException( "Unexpected configuration type: " + configuration.getClass().getName() ); } WagonComponentConfigurator configurator = new WagonComponentConfigurator(); configurator.configureComponent( wagon, config, container.getContainerRealm() ); } static class WagonComponentConfigurator extends AbstractComponentConfigurator { @Override public void configureComponent( Object component, PlexusConfiguration configuration, ExpressionEvaluator expressionEvaluator, ClassRealm containerRealm, ConfigurationListener listener ) throws ComponentConfigurationException { ObjectWithFieldsConverter converter = new ObjectWithFieldsConverter(); converter.processConfiguration( converterLookup, component, containerRealm, configuration, expressionEvaluator, listener ); } } } PlexusWagonProvider.java000066400000000000000000000026201167050556700356470ustar00rootroot00000000000000aether-1.13.1/aether-connector-wagon/src/main/java/org/sonatype/aether/connector/wagonpackage org.sonatype.aether.connector.wagon; /******************************************************************************* * 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.apache.maven.wagon.Wagon; import org.codehaus.plexus.PlexusContainer; import org.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.component.annotations.Requirement; /** * A wagon provider backed by a Plexus container and the wagons registered with this container. * * @author Benjamin Bentmann */ @Component( role = WagonProvider.class, hint = "plexus" ) public class PlexusWagonProvider implements WagonProvider { @Requirement private PlexusContainer container; public Wagon lookup( String roleHint ) throws Exception { return container.lookup( Wagon.class, roleHint ); } public void release( Wagon wagon ) { try { if ( wagon != null ) { container.release( wagon ); } } catch ( Exception e ) { // too bad } } } WagonCancelledException.java000066400000000000000000000017111167050556700364050ustar00rootroot00000000000000aether-1.13.1/aether-connector-wagon/src/main/java/org/sonatype/aether/connector/wagonpackage org.sonatype.aether.connector.wagon; /******************************************************************************* * 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.TransferCancelledException; /** * @author Benjamin Bentmann */ class WagonCancelledException extends RuntimeException { public WagonCancelledException( TransferCancelledException cause ) { super( cause ); } public static Exception unwrap( Exception e ) { if ( e instanceof WagonCancelledException ) { e = (Exception) e.getCause(); } return e; } } WagonConfigurator.java000066400000000000000000000021721167050556700353200ustar00rootroot00000000000000aether-1.13.1/aether-connector-wagon/src/main/java/org/sonatype/aether/connector/wagonpackage org.sonatype.aether.connector.wagon; /******************************************************************************* * 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.apache.maven.wagon.Wagon; /** * A component to configure wagon instances with provider-specific parameters. * * @author Benjamin Bentmann */ public interface WagonConfigurator { /** * Configures the specified wagon instance with the given configuration. * * @param wagon The wagon instance to configure, must not be {@code null}. * @param configuration The configuration to apply to the wagon instance, must not be {@code null}. * @throws Exception If the configuration could not be applied to the wagon. */ void configure( Wagon wagon, Object configuration ) throws Exception; } WagonProvider.java000066400000000000000000000026621167050556700344540ustar00rootroot00000000000000aether-1.13.1/aether-connector-wagon/src/main/java/org/sonatype/aether/connector/wagonpackage org.sonatype.aether.connector.wagon; /******************************************************************************* * 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.apache.maven.wagon.Wagon; /** * A component to acquire and release wagon instances for uploads/downloads. * * @author Benjamin Bentmann */ public interface WagonProvider { /** * Acquires a wagon instance that matches the specified role hint. The role hint is derived from the URI scheme, * e.g. "http" or "file". * * @param roleHint The role hint to get a wagon for, must not be {@code null}. * @return The requested wagon instance, never {@code null}. * @throws Exception If no wagon could be retrieved for the specified role hint. */ Wagon lookup( String roleHint ) throws Exception; /** * Releases the specified wagon. A wagon provider may either free any resources allocated for the wagon instance or * return the instance back to a pool for future use. * * @param wagon The wagon to release, may be {@code null}. */ void release( Wagon wagon ); } WagonRepositoryConnector.java000066400000000000000000000771241167050556700367210ustar00rootroot00000000000000aether-1.13.1/aether-connector-wagon/src/main/java/org/sonatype/aether/connector/wagonpackage org.sonatype.aether.connector.wagon; /******************************************************************************* * 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.ByteArrayInputStream; import java.io.File; import java.io.IOException; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.LinkedHashMap; import java.util.Locale; import java.util.Map; import java.util.Properties; import java.util.Queue; import java.util.UUID; import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.Executor; import java.util.concurrent.ExecutorService; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; import org.apache.maven.wagon.ResourceDoesNotExistException; import org.apache.maven.wagon.StreamingWagon; import org.apache.maven.wagon.Wagon; import org.apache.maven.wagon.WagonException; import org.apache.maven.wagon.authentication.AuthenticationInfo; import org.apache.maven.wagon.observers.ChecksumObserver; import org.apache.maven.wagon.proxy.ProxyInfo; import org.apache.maven.wagon.proxy.ProxyInfoProvider; import org.apache.maven.wagon.repository.Repository; import org.apache.maven.wagon.repository.RepositoryPermissions; import org.sonatype.aether.ConfigurationProperties; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.repository.Authentication; import org.sonatype.aether.repository.Proxy; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.repository.RepositoryPolicy; import org.sonatype.aether.spi.connector.ArtifactDownload; import org.sonatype.aether.spi.connector.ArtifactTransfer; import org.sonatype.aether.spi.connector.ArtifactUpload; import org.sonatype.aether.spi.connector.MetadataDownload; import org.sonatype.aether.spi.connector.MetadataTransfer; import org.sonatype.aether.spi.connector.MetadataUpload; import org.sonatype.aether.spi.connector.RepositoryConnector; import org.sonatype.aether.spi.connector.Transfer; import org.sonatype.aether.spi.io.FileProcessor; import org.sonatype.aether.spi.log.Logger; import org.sonatype.aether.transfer.ArtifactNotFoundException; import org.sonatype.aether.transfer.ArtifactTransferException; import org.sonatype.aether.transfer.ChecksumFailureException; import org.sonatype.aether.transfer.MetadataNotFoundException; import org.sonatype.aether.transfer.MetadataTransferException; import org.sonatype.aether.transfer.NoRepositoryConnectorException; import org.sonatype.aether.transfer.TransferEvent; import org.sonatype.aether.transfer.TransferListener; import org.sonatype.aether.util.ChecksumUtils; import org.sonatype.aether.util.ConfigUtils; import org.sonatype.aether.util.concurrency.RunnableErrorForwarder; import org.sonatype.aether.util.layout.MavenDefaultLayout; import org.sonatype.aether.util.layout.RepositoryLayout; import org.sonatype.aether.util.listener.DefaultTransferEvent; /** * A repository connector that uses Maven Wagon for the transfer. * * @author Benjamin Bentmann */ class WagonRepositoryConnector implements RepositoryConnector { private static final String PROP_THREADS = "aether.connector.wagon.threads"; private static final String PROP_CONFIG = "aether.connector.wagon.config"; private static final String PROP_FILE_MODE = "aether.connector.perms.fileMode"; private static final String PROP_DIR_MODE = "aether.connector.perms.dirMode"; private static final String PROP_GROUP = "aether.connector.perms.group"; private final Logger logger; private final FileProcessor fileProcessor; private final RemoteRepository repository; private final RepositorySystemSession session; private final WagonProvider wagonProvider; private final WagonConfigurator wagonConfigurator; private final String wagonHint; private final Repository wagonRepo; private final AuthenticationInfo wagonAuth; private final ProxyInfoProvider wagonProxy; private final RepositoryLayout layout = new MavenDefaultLayout(); private final TransferListener listener; private final Queue wagons = new ConcurrentLinkedQueue(); private final Executor executor; private boolean closed; private final Map checksumAlgos; private final Properties headers; public WagonRepositoryConnector( WagonProvider wagonProvider, WagonConfigurator wagonConfigurator, RemoteRepository repository, RepositorySystemSession session, FileProcessor fileProcessor, Logger logger ) throws NoRepositoryConnectorException { this.logger = logger; this.fileProcessor = fileProcessor; this.wagonProvider = wagonProvider; this.wagonConfigurator = wagonConfigurator; this.repository = repository; this.session = session; this.listener = session.getTransferListener(); if ( !"default".equals( repository.getContentType() ) ) { throw new NoRepositoryConnectorException( repository ); } wagonRepo = new Repository( repository.getId(), repository.getUrl() ); wagonRepo.setPermissions( getPermissions( repository.getId(), session ) ); wagonHint = wagonRepo.getProtocol().toLowerCase( Locale.ENGLISH ); if ( wagonHint == null || wagonHint.length() <= 0 ) { throw new NoRepositoryConnectorException( repository ); } try { wagons.add( lookupWagon() ); } catch ( Exception e ) { logger.debug( e.getMessage(), e ); throw new NoRepositoryConnectorException( repository ); } wagonAuth = getAuthenticationInfo( repository ); wagonProxy = getProxy( repository ); int threads = ConfigUtils.getInteger( session, 5, PROP_THREADS, "maven.artifact.threads" ); executor = getExecutor( threads ); checksumAlgos = new LinkedHashMap(); checksumAlgos.put( "SHA-1", ".sha1" ); checksumAlgos.put( "MD5", ".md5" ); headers = new Properties(); headers.put( "User-Agent", ConfigUtils.getString( session, ConfigurationProperties.DEFAULT_USER_AGENT, ConfigurationProperties.USER_AGENT ) ); Map headers = ConfigUtils.getMap( session, null, ConfigurationProperties.HTTP_HEADERS + "." + repository.getId(), ConfigurationProperties.HTTP_HEADERS ); if ( headers != null ) { this.headers.putAll( headers ); } } private Executor getExecutor( int threads ) { if ( threads <= 1 ) { return new Executor() { public void execute( Runnable command ) { command.run(); } }; } else { return new ThreadPoolExecutor( threads, threads, 3, TimeUnit.SECONDS, new LinkedBlockingQueue() ); } } private static RepositoryPermissions getPermissions( String repoId, RepositorySystemSession session ) { RepositoryPermissions result = null; RepositoryPermissions perms = new RepositoryPermissions(); String suffix = '.' + repoId; String fileMode = ConfigUtils.getString( session, (String) null, PROP_FILE_MODE + suffix ); if ( fileMode != null ) { perms.setFileMode( fileMode ); result = perms; } String dirMode = ConfigUtils.getString( session, (String) null, PROP_DIR_MODE + suffix ); if ( dirMode != null ) { perms.setDirectoryMode( dirMode ); result = perms; } String group = ConfigUtils.getString( session, (String) null, PROP_GROUP + suffix ); if ( group != null ) { perms.setGroup( group ); result = perms; } return result; } private AuthenticationInfo getAuthenticationInfo( RemoteRepository repository ) { AuthenticationInfo auth = null; Authentication a = repository.getAuthentication(); if ( a != null ) { auth = new AuthenticationInfo(); auth.setUserName( a.getUsername() ); auth.setPassword( a.getPassword() ); auth.setPrivateKey( a.getPrivateKeyFile() ); auth.setPassphrase( a.getPassphrase() ); } return auth; } private ProxyInfoProvider getProxy( RemoteRepository repository ) { ProxyInfoProvider proxy = null; Proxy p = repository.getProxy(); if ( p != null ) { final ProxyInfo prox = new ProxyInfo(); prox.setType( p.getType() ); prox.setHost( p.getHost() ); prox.setPort( p.getPort() ); if ( p.getAuthentication() != null ) { prox.setUserName( p.getAuthentication().getUsername() ); prox.setPassword( p.getAuthentication().getPassword() ); } proxy = new ProxyInfoProvider() { public ProxyInfo getProxyInfo( String protocol ) { return prox; } }; } return proxy; } private Wagon lookupWagon() throws Exception { return wagonProvider.lookup( wagonHint ); } private void releaseWagon( Wagon wagon ) { wagonProvider.release( wagon ); } private void connectWagon( Wagon wagon ) throws Exception { if ( !headers.isEmpty() ) { try { Method setHttpHeaders = wagon.getClass().getMethod( "setHttpHeaders", Properties.class ); setHttpHeaders.invoke( wagon, headers ); } catch ( NoSuchMethodException e ) { // normal for non-http wagons } catch ( Exception e ) { logger.debug( "Could not set user agent for wagon " + wagon.getClass().getName() + ": " + e ); } } int connectTimeout = ConfigUtils.getInteger( session, ConfigurationProperties.DEFAULT_CONNECT_TIMEOUT, ConfigurationProperties.CONNECT_TIMEOUT ); int requestTimeout = ConfigUtils.getInteger( session, ConfigurationProperties.DEFAULT_REQUEST_TIMEOUT, ConfigurationProperties.REQUEST_TIMEOUT ); wagon.setTimeout( Math.max( Math.max( connectTimeout, requestTimeout ), 0 ) ); wagon.setInteractive( ConfigUtils.getBoolean( session, ConfigurationProperties.DEFAULT_INTERACTIVE, ConfigurationProperties.INTERACTIVE ) ); Object configuration = ConfigUtils.getObject( session, null, PROP_CONFIG + "." + repository.getId() ); if ( configuration != null && wagonConfigurator != null ) { try { wagonConfigurator.configure( wagon, configuration ); } catch ( Exception e ) { String msg = "Could not apply configuration for " + repository.getId() + " to wagon " + wagon.getClass().getName() + ":" + e.getMessage(); if ( logger.isDebugEnabled() ) { logger.warn( msg, e ); } else { logger.warn( msg ); } } } wagon.connect( wagonRepo, wagonAuth, wagonProxy ); } private void disconnectWagon( Wagon wagon ) { try { if ( wagon != null ) { wagon.disconnect(); } } catch ( Exception e ) { // too bad } } Wagon pollWagon() throws Exception { Wagon wagon = wagons.poll(); if ( wagon == null ) { try { wagon = lookupWagon(); connectWagon( wagon ); } catch ( Exception e ) { releaseWagon( wagon ); throw e; } } else if ( wagon.getRepository() == null ) { try { connectWagon( wagon ); } catch ( Exception e ) { wagons.add( wagon ); throw e; } } return wagon; } private Collection safe( Collection items ) { return ( items != null ) ? items : Collections. emptyList(); } private File getTmpFile( String path ) { File file; do { file = new File( path + ".tmp" + UUID.randomUUID().toString().replace( "-", "" ).substring( 0, 16 ) ); } while ( file.exists() ); return file; } public void get( Collection artifactDownloads, Collection metadataDownloads ) { if ( closed ) { throw new IllegalStateException( "connector closed" ); } artifactDownloads = safe( artifactDownloads ); metadataDownloads = safe( metadataDownloads ); Collection> tasks = new ArrayList>(); RunnableErrorForwarder errorForwarder = new RunnableErrorForwarder(); for ( MetadataDownload download : metadataDownloads ) { String resource = layout.getPath( download.getMetadata() ).getPath(); GetTask task = new GetTask( resource, download.getFile(), download.getChecksumPolicy(), download, METADATA ); tasks.add( task ); executor.execute( errorForwarder.wrap( task ) ); } for ( ArtifactDownload download : artifactDownloads ) { String resource = layout.getPath( download.getArtifact() ).getPath(); GetTask task = new GetTask( resource, download.isExistenceCheck() ? null : download.getFile(), download.getChecksumPolicy(), download, ARTIFACT ); tasks.add( task ); executor.execute( errorForwarder.wrap( task ) ); } errorForwarder.await(); } public void put( Collection artifactUploads, Collection metadataUploads ) { if ( closed ) { throw new IllegalStateException( "connector closed" ); } artifactUploads = safe( artifactUploads ); metadataUploads = safe( metadataUploads ); for ( ArtifactUpload upload : artifactUploads ) { String path = layout.getPath( upload.getArtifact() ).getPath(); PutTask task = new PutTask( path, upload.getFile(), upload, ARTIFACT ); task.run(); } for ( MetadataUpload upload : metadataUploads ) { String path = layout.getPath( upload.getMetadata() ).getPath(); PutTask task = new PutTask( path, upload.getFile(), upload, METADATA ); task.run(); } } public void close() { closed = true; for ( Wagon wagon = wagons.poll(); wagon != null; wagon = wagons.poll() ) { disconnectWagon( wagon ); releaseWagon( wagon ); } shutdown( executor ); } private void shutdown( Executor executor ) { if ( executor instanceof ExecutorService ) { ( (ExecutorService) executor ).shutdown(); } } @Override protected void finalize() throws Throwable { try { close(); } finally { super.finalize(); } } @Override public String toString() { return String.valueOf( repository ); } class GetTask implements Runnable { private final T download; private final String path; private final File file; private final String checksumPolicy; private final ExceptionWrapper wrapper; public GetTask( String path, File file, String checksumPolicy, T download, ExceptionWrapper wrapper ) { this.path = path; this.file = file; this.checksumPolicy = checksumPolicy; this.download = download; this.wrapper = wrapper; } public T getDownload() { return download; } public void run() { download.setState( Transfer.State.ACTIVE ); WagonTransferListenerAdapter wagonListener = null; if ( listener != null ) { wagonListener = new WagonTransferListenerAdapter( listener, wagonRepo.getUrl(), path, file, download.getTrace() ); } try { if ( listener != null ) { DefaultTransferEvent event = wagonListener.newEvent(); event.setRequestType( TransferEvent.RequestType.GET ); event.setType( TransferEvent.EventType.INITIATED ); listener.transferInitiated( event ); } File tmp = ( file != null ) ? getTmpFile( file.getPath() ) : null; Wagon wagon = pollWagon(); try { if ( file == null ) { if ( !wagon.resourceExists( path ) ) { throw new ResourceDoesNotExistException( "Could not find " + path + " in " + wagonRepo.getUrl() ); } } else { for ( int trial = 1; trial >= 0; trial-- ) { ChecksumObserver sha1 = new ChecksumObserver( "SHA-1" ); ChecksumObserver md5 = new ChecksumObserver( "MD5" ); try { wagon.addTransferListener( wagonListener ); wagon.addTransferListener( md5 ); wagon.addTransferListener( sha1 ); /* * NOTE: AbstractWagon.createParentDirectories() uses File.mkdirs() which is not * thread-safe in all JREs. */ fileProcessor.mkdirs( tmp.getParentFile() ); wagon.get( path, tmp ); } finally { wagon.removeTransferListener( wagonListener ); wagon.removeTransferListener( md5 ); wagon.removeTransferListener( sha1 ); } if ( RepositoryPolicy.CHECKSUM_POLICY_IGNORE.equals( checksumPolicy ) ) { break; } else { try { if ( !verifyChecksum( wagon, sha1.getActualChecksum(), ".sha1" ) && !verifyChecksum( wagon, md5.getActualChecksum(), ".md5" ) ) { trial = 0; throw new ChecksumFailureException( "Checksum validation failed" + ", no checksums available from the repository" ); } break; } catch ( ChecksumFailureException e ) { if ( trial <= 0 && RepositoryPolicy.CHECKSUM_POLICY_FAIL.equals( checksumPolicy ) ) { throw e; } if ( listener != null ) { DefaultTransferEvent event = wagonListener.newEvent(); event.setRequestType( TransferEvent.RequestType.GET ); event.setType( TransferEvent.EventType.CORRUPTED ); event.setException( e ); listener.transferCorrupted( event ); } } } } rename( tmp, file ); } wrapper.wrap( download, null, repository ); if ( listener != null ) { DefaultTransferEvent event = wagonListener.newEvent(); event.setRequestType( TransferEvent.RequestType.GET ); event.setType( TransferEvent.EventType.SUCCEEDED ); listener.transferSucceeded( event ); } } finally { if ( tmp != null ) { tmp.delete(); } wagons.add( wagon ); } } catch ( Exception e ) { e = wrapper.wrap( download, e, repository ); if ( listener != null ) { DefaultTransferEvent event = wagonListener.newEvent(); event.setRequestType( TransferEvent.RequestType.GET ); event.setType( TransferEvent.EventType.FAILED ); event.setException( e ); listener.transferFailed( event ); } } finally { download.setState( Transfer.State.DONE ); } } private boolean verifyChecksum( Wagon wagon, String actual, String ext ) throws ChecksumFailureException { File tmp = getTmpFile( file.getPath() + ext ); try { try { wagon.get( path + ext, tmp ); } catch ( ResourceDoesNotExistException e ) { return false; } catch ( WagonException e ) { throw new ChecksumFailureException( e ); } String expected; try { expected = ChecksumUtils.read( tmp ); } catch ( IOException e ) { throw new ChecksumFailureException( e ); } if ( expected.equalsIgnoreCase( actual ) ) { try { rename( tmp, new File( file.getPath() + ext ) ); } catch ( IOException e ) { logger.debug( "Failed to write checksum file " + file.getPath() + ext + ": " + e.getMessage(), e ); } } else { throw new ChecksumFailureException( expected, actual ); } } finally { tmp.delete(); } return true; } private void rename( File from, File to ) throws IOException { if ( !from.exists() ) { /* * NOTE: Wagon (1.0-beta-6) doesn't create the destination file when transferring a 0-byte resource. So * if the resource we asked for didn't cause any exception but doesn't show up in the tmp file either, * Wagon tells us in its weird way the file is empty. */ fileProcessor.write( to, "" ); } else { fileProcessor.move( from, to ); } } } class PutTask implements Runnable { private final T upload; private final ExceptionWrapper wrapper; private final String path; private final File file; public PutTask( String path, File file, T upload, ExceptionWrapper wrapper ) { this.path = path; this.file = file; this.upload = upload; this.wrapper = wrapper; } public void run() { upload.setState( Transfer.State.ACTIVE ); WagonTransferListenerAdapter wagonListener = null; if ( listener != null ) { wagonListener = new WagonTransferListenerAdapter( listener, wagonRepo.getUrl(), path, file, upload.getTrace() ); } try { if ( listener != null ) { DefaultTransferEvent event = wagonListener.newEvent(); event.setRequestType( TransferEvent.RequestType.PUT ); event.setType( TransferEvent.EventType.INITIATED ); listener.transferInitiated( event ); } Wagon wagon = pollWagon(); try { try { wagon.addTransferListener( wagonListener ); wagon.put( file, path ); } finally { wagon.removeTransferListener( wagonListener ); } uploadChecksums( wagon, file, path ); wrapper.wrap( upload, null, repository ); if ( listener != null ) { DefaultTransferEvent event = wagonListener.newEvent(); event.setRequestType( TransferEvent.RequestType.PUT ); event.setType( TransferEvent.EventType.SUCCEEDED ); listener.transferSucceeded( event ); } } finally { wagons.add( wagon ); } } catch ( Exception e ) { e = wrapper.wrap( upload, e, repository ); if ( listener != null ) { DefaultTransferEvent event = wagonListener.newEvent(); event.setRequestType( TransferEvent.RequestType.PUT ); event.setType( TransferEvent.EventType.FAILED ); event.setException( e ); listener.transferFailed( event ); } } finally { upload.setState( Transfer.State.DONE ); } } private void uploadChecksums( Wagon wagon, File file, String path ) { try { Map checksums = ChecksumUtils.calc( file, checksumAlgos.keySet() ); for ( Map.Entry entry : checksums.entrySet() ) { uploadChecksum( wagon, file, path, entry.getKey(), entry.getValue() ); } } catch ( IOException e ) { logger.debug( "Failed to upload checksums for " + file + ": " + e.getMessage(), e ); } } private void uploadChecksum( Wagon wagon, File file, String path, String algo, Object checksum ) { try { if ( checksum instanceof Exception ) { throw (Exception) checksum; } String ext = checksumAlgos.get( algo ); String dst = path + ext; String sum = String.valueOf( checksum ); if ( wagon instanceof StreamingWagon ) { byte[] data = sum.getBytes( "UTF-8" ); ( (StreamingWagon) wagon ).putFromStream( new ByteArrayInputStream( data ), dst, data.length, -1 ); } else { File tmpFile = File.createTempFile( "wagon" + UUID.randomUUID().toString().replace( "-", "" ), ext ); try { fileProcessor.write( tmpFile, sum ); wagon.put( tmpFile, dst ); } finally { tmpFile.delete(); } } } catch ( Exception e ) { logger.warn( "Failed to upload " + algo + " checksum for " + file + ": " + e.getMessage(), e ); } } } static interface ExceptionWrapper { Exception wrap( T transfer, Exception e, RemoteRepository repository ); } private static final ExceptionWrapper METADATA = new ExceptionWrapper() { public Exception wrap( MetadataTransfer transfer, Exception e, RemoteRepository repository ) { MetadataTransferException ex = null; e = WagonCancelledException.unwrap( e ); if ( e instanceof ResourceDoesNotExistException ) { ex = new MetadataNotFoundException( transfer.getMetadata(), repository ); } else if ( e != null ) { ex = new MetadataTransferException( transfer.getMetadata(), repository, e ); } transfer.setException( ex ); return ex; } }; private static final ExceptionWrapper ARTIFACT = new ExceptionWrapper() { public Exception wrap( ArtifactTransfer transfer, Exception e, RemoteRepository repository ) { ArtifactTransferException ex = null; e = WagonCancelledException.unwrap( e ); if ( e instanceof ResourceDoesNotExistException ) { ex = new ArtifactNotFoundException( transfer.getArtifact(), repository ); } else if ( e != null ) { ex = new ArtifactTransferException( transfer.getArtifact(), repository, e ); } transfer.setException( ex ); return ex; } }; } WagonRepositoryConnectorFactory.java000066400000000000000000000117271167050556700402460ustar00rootroot00000000000000aether-1.13.1/aether-connector-wagon/src/main/java/org/sonatype/aether/connector/wagonpackage org.sonatype.aether.connector.wagon; /******************************************************************************* * 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.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.component.annotations.Requirement; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.spi.connector.RepositoryConnector; import org.sonatype.aether.spi.connector.RepositoryConnectorFactory; import org.sonatype.aether.spi.io.FileProcessor; import org.sonatype.aether.spi.locator.Service; import org.sonatype.aether.spi.locator.ServiceLocator; import org.sonatype.aether.spi.log.Logger; import org.sonatype.aether.spi.log.NullLogger; import org.sonatype.aether.transfer.NoRepositoryConnectorException; /** * A repository connector factory that uses Maven Wagon for the transfers. * * @author Benjamin Bentmann */ @Component( role = RepositoryConnectorFactory.class, hint = "wagon" ) public class WagonRepositoryConnectorFactory implements RepositoryConnectorFactory, Service { @Requirement private Logger logger = NullLogger.INSTANCE; @Requirement private FileProcessor fileProcessor; @Requirement private WagonProvider wagonProvider; @Requirement private WagonConfigurator wagonConfigurator; private int priority; public WagonRepositoryConnectorFactory() { // enables default constructor } public WagonRepositoryConnectorFactory( Logger logger, FileProcessor fileProcessor, WagonProvider wagonProvider, WagonConfigurator wagonConfigurator ) { setLogger( logger ); setFileProcessor( fileProcessor ); setWagonProvider( wagonProvider ); setWagonConfigurator( wagonConfigurator ); } public void initService( ServiceLocator locator ) { setLogger( locator.getService( Logger.class ) ); setFileProcessor( locator.getService( FileProcessor.class ) ); setWagonProvider( locator.getService( WagonProvider.class ) ); setWagonConfigurator( locator.getService( WagonConfigurator.class ) ); } /** * Sets the logger to use for this component. * * @param logger The logger to use, may be {@code null} to disable logging. * @return This component for chaining, never {@code null}. */ public WagonRepositoryConnectorFactory setLogger( Logger logger ) { this.logger = ( logger != null ) ? logger : NullLogger.INSTANCE; return this; } /** * Sets the file processor to use for this component. * * @param fileProcessor The file processor to use, must not be {@code null}. * @return This component for chaining, never {@code null}. */ public WagonRepositoryConnectorFactory setFileProcessor( FileProcessor fileProcessor ) { if ( fileProcessor == null ) { throw new IllegalArgumentException( "file processor has not been specified" ); } this.fileProcessor = fileProcessor; return this; } /** * Sets the wagon provider to use to acquire and release wagon instances. * * @param wagonProvider The wagon provider to use, may be {@code null}. * @return This factory for chaining, never {@code null}. */ public WagonRepositoryConnectorFactory setWagonProvider( WagonProvider wagonProvider ) { this.wagonProvider = wagonProvider; return this; } /** * Sets the wagon configurator to use to apply provider-specific configuration to wagon instances. * * @param wagonConfigurator The wagon configurator to use, may be {@code null}. * @return This factory for chaining, never {@code null}. */ public WagonRepositoryConnectorFactory setWagonConfigurator( WagonConfigurator wagonConfigurator ) { this.wagonConfigurator = wagonConfigurator; return this; } public int getPriority() { return priority; } /** * Sets the priority of this component. * * @param priority The priority. * @return This component for chaining, never {@code null}. */ public WagonRepositoryConnectorFactory setPriority( int priority ) { this.priority = priority; return this; } public RepositoryConnector newInstance( RepositorySystemSession session, RemoteRepository repository ) throws NoRepositoryConnectorException { return new WagonRepositoryConnector( wagonProvider, wagonConfigurator, repository, session, fileProcessor, logger ); } } WagonTransferListenerAdapter.java000066400000000000000000000062551167050556700374570ustar00rootroot00000000000000aether-1.13.1/aether-connector-wagon/src/main/java/org/sonatype/aether/connector/wagonpackage org.sonatype.aether.connector.wagon; /******************************************************************************* * 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 org.apache.maven.wagon.events.TransferEvent; import org.apache.maven.wagon.observers.AbstractTransferListener; import org.sonatype.aether.RequestTrace; import org.sonatype.aether.transfer.TransferCancelledException; import org.sonatype.aether.transfer.TransferEvent.EventType; import org.sonatype.aether.transfer.TransferEvent.RequestType; import org.sonatype.aether.transfer.TransferListener; import org.sonatype.aether.util.listener.DefaultTransferEvent; import org.sonatype.aether.util.listener.DefaultTransferResource; /** * An adapter to transform transfer events from Wagon into events for the repository system. * * @author Benjamin Bentmann */ class WagonTransferListenerAdapter extends AbstractTransferListener { private final DefaultTransferResource resource; private final TransferListener delegate; private long transferredBytes; public WagonTransferListenerAdapter( TransferListener delegate, String repositoryUrl, String resourceName, File file, RequestTrace trace ) { this.delegate = delegate; resource = new DefaultTransferResource( repositoryUrl, resourceName, file, trace ); } @Override public void transferStarted( TransferEvent event ) { transferredBytes = 0; resource.setContentLength( event.getResource().getContentLength() ); try { delegate.transferStarted( wrap( event, EventType.STARTED ) ); } catch ( TransferCancelledException e ) { /* * NOTE: Wagon transfers are not freely abortable. In particular, aborting from * AbstractWagon.fire(Get|Put)Started() would result in unclosed streams so we avoid this case. */ } } @Override public void transferProgress( TransferEvent event, byte[] buffer, int length ) { transferredBytes += length; try { delegate.transferProgressed( wrap( event, EventType.PROGRESSED ).setDataBuffer( buffer, 0, length ) ); } catch ( TransferCancelledException e ) { throw new WagonCancelledException( e ); } } private DefaultTransferEvent wrap( TransferEvent event, EventType type ) { DefaultTransferEvent e = newEvent(); e.setRequestType( event.getRequestType() == TransferEvent.REQUEST_PUT ? RequestType.PUT : RequestType.GET ); e.setType( type ); return e; } public DefaultTransferEvent newEvent() { DefaultTransferEvent e = new DefaultTransferEvent(); e.setResource( resource ); e.setTransferredBytes( transferredBytes ); return e; } } aether-1.13.1/aether-connector-wagon/src/test/000077500000000000000000000000001167050556700212005ustar00rootroot00000000000000aether-1.13.1/aether-connector-wagon/src/test/java/000077500000000000000000000000001167050556700221215ustar00rootroot00000000000000aether-1.13.1/aether-connector-wagon/src/test/java/org/000077500000000000000000000000001167050556700227105ustar00rootroot00000000000000aether-1.13.1/aether-connector-wagon/src/test/java/org/sonatype/000077500000000000000000000000001167050556700245525ustar00rootroot00000000000000aether-1.13.1/aether-connector-wagon/src/test/java/org/sonatype/aether/000077500000000000000000000000001167050556700260225ustar00rootroot00000000000000aether-1.13.1/aether-connector-wagon/src/test/java/org/sonatype/aether/connector/000077500000000000000000000000001167050556700300145ustar00rootroot00000000000000aether-1.13.1/aether-connector-wagon/src/test/java/org/sonatype/aether/connector/wagon/000077500000000000000000000000001167050556700311275ustar00rootroot00000000000000PlexusSupportTest.java000066400000000000000000000025241167050556700354330ustar00rootroot00000000000000aether-1.13.1/aether-connector-wagon/src/test/java/org/sonatype/aether/connector/wagonpackage org.sonatype.aether.connector.wagon; /******************************************************************************* * 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.codehaus.plexus.PlexusTestCase; import org.sonatype.aether.spi.connector.RepositoryConnectorFactory; import org.sonatype.aether.spi.io.FileProcessor; import org.sonatype.aether.spi.log.Logger; import org.sonatype.aether.test.impl.SysoutLogger; import org.sonatype.aether.test.impl.TestFileProcessor; /** */ public class PlexusSupportTest extends PlexusTestCase { public void testExistenceOfPlexusComponentMetadata() throws Exception { getContainer().addComponent( new SysoutLogger(), Logger.class, null ); getContainer().addComponent( new TestFileProcessor(), FileProcessor.class, null ); RepositoryConnectorFactory factory = lookup( RepositoryConnectorFactory.class, "wagon" ); assertNotNull( factory ); assertEquals( WagonRepositoryConnectorFactory.class, factory.getClass() ); } } TestSuiteHttpWagon.java000066400000000000000000000074371167050556700355130ustar00rootroot00000000000000aether-1.13.1/aether-connector-wagon/src/test/java/org/sonatype/aether/connector/wagonpackage org.sonatype.aether.connector.wagon; /******************************************************************************* * 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.apache.maven.wagon.ConnectionException; import org.apache.maven.wagon.Wagon; import org.apache.maven.wagon.providers.http.LightweightHttpWagon; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.spi.connector.RepositoryConnector; import org.sonatype.aether.spi.connector.RepositoryConnectorFactory; import org.sonatype.aether.spi.log.NullLogger; import org.sonatype.aether.test.impl.TestFileProcessor; import org.sonatype.aether.test.util.connector.suite.ConnectorTestSetup.AbstractConnectorTestSetup; import org.sonatype.aether.test.util.connector.suite.ConnectorTestSuite; import org.sonatype.aether.transfer.NoRepositoryConnectorException; import org.sonatype.tests.http.server.jetty.behaviour.ResourceServer; import org.sonatype.tests.http.server.jetty.impl.JettyServerProvider; /** * @author Benjamin Hanzelmann */ public class TestSuiteHttpWagon extends ConnectorTestSuite { private static class JettyConnectorTestSetup extends AbstractConnectorTestSetup { private JettyServerProvider provider; public RemoteRepository before( RepositorySystemSession session, Map context ) throws Exception { provider = new JettyServerProvider(); provider.initServer(); provider.addBehaviour( "/*", new ResourceServer() ); provider.start(); return new RemoteRepository( "jetty-repo", "default", provider.getUrl().toString() + "/repo" ); } public RepositoryConnectorFactory factory() { return new RepositoryConnectorFactory() { public RepositoryConnector newInstance( RepositorySystemSession session, RemoteRepository repository ) throws NoRepositoryConnectorException { return new WagonRepositoryConnector( new WagonProvider() { public void release( Wagon wagon ) { try { wagon.disconnect(); } catch ( ConnectionException e ) { throw new RuntimeException( e.getMessage(), e ); } } public Wagon lookup( String roleHint ) throws Exception { return new LightweightHttpWagon(); } }, null, repository, session, TestFileProcessor.INSTANCE, NullLogger.INSTANCE ); } public int getPriority() { return 0; } }; } @Override public void after( RepositorySystemSession session, RemoteRepository repository, Map context ) throws Exception { if ( provider != null ) { provider.stop(); provider = null; } } } public TestSuiteHttpWagon() { super( new JettyConnectorTestSetup() ); } } aether-1.13.1/aether-connector-wagon/src/test/resources/000077500000000000000000000000001167050556700232125ustar00rootroot00000000000000aether-1.13.1/aether-connector-wagon/src/test/resources/logback-test.xml000066400000000000000000000014621167050556700263160ustar00rootroot00000000000000 %d{HH:mm:ss.SSS} [%-18thread] %c{1} [%p] %m%n aether-1.13.1/aether-demo/000077500000000000000000000000001167050556700152535ustar00rootroot00000000000000aether-1.13.1/aether-demo/pom.xml000066400000000000000000000062201167050556700165700ustar00rootroot00000000000000 4.0.0 org.sonatype.aether aether 1.13.1 aether-demo Aether :: Demo A module to demonstrate the usage of Aether. 3.0.3 1.0 org.sonatype.aether aether-api org.sonatype.aether aether-spi org.sonatype.aether aether-util org.sonatype.aether aether-impl org.sonatype.aether aether-connector-file org.sonatype.aether aether-connector-wagon org.apache.maven maven-aether-provider ${mavenVersion} org.apache.maven.wagon wagon-provider-api ${wagonVersion} org.apache.maven.wagon wagon-http-lightweight ${wagonVersion} org.apache.maven.wagon wagon-http-shared org.codehaus.plexus plexus-utils 2.0.7 org.sonatype.sisu sisu-inject-plexus maven-deploy-plugin true org.codehaus.mojo animal-sniffer-maven-plugin aether-1.13.1/aether-demo/src/000077500000000000000000000000001167050556700160425ustar00rootroot00000000000000aether-1.13.1/aether-demo/src/main/000077500000000000000000000000001167050556700167665ustar00rootroot00000000000000aether-1.13.1/aether-demo/src/main/java/000077500000000000000000000000001167050556700177075ustar00rootroot00000000000000aether-1.13.1/aether-demo/src/main/java/demo/000077500000000000000000000000001167050556700206335ustar00rootroot00000000000000aether-1.13.1/aether-demo/src/main/java/demo/AllAetherDemos.java000066400000000000000000000017551167050556700243370ustar00rootroot00000000000000package demo; /******************************************************************************* * 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 *******************************************************************************/ /** * Runs all demos at once. */ public class AllAetherDemos { public static void main( String[] args ) throws Exception { FindAvailableVersions.main( args ); FindNewestVersion.main( args ); GetDirectDependencies.main( args ); GetDependencyTree.main( args ); GetDependencyTreeWithMirror.main( args ); ResolveArtifact.main( args ); ResolveTransitiveDependencies.main( args ); InstallArtifacts.main( args ); DeployArtifacts.main( args ); } } aether-1.13.1/aether-demo/src/main/java/demo/DeployArtifacts.java000066400000000000000000000040211167050556700245700ustar00rootroot00000000000000package demo; /******************************************************************************* * 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 org.sonatype.aether.RepositorySystem; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.deployment.DeployRequest; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.util.artifact.DefaultArtifact; import org.sonatype.aether.util.artifact.SubArtifact; import demo.util.Booter; /** * Deploys a JAR and its POM to a remote repository. */ public class DeployArtifacts { public static void main( String[] args ) throws Exception { System.out.println( "------------------------------------------------------------" ); System.out.println( DeployArtifacts.class.getSimpleName() ); RepositorySystem system = Booter.newRepositorySystem(); RepositorySystemSession session = Booter.newRepositorySystemSession( system ); Artifact jarArtifact = new DefaultArtifact( "test", "demo", "", "jar", "0.1-SNAPSHOT" ); jarArtifact = jarArtifact.setFile( new File( "demo.jar" ) ); Artifact pomArtifact = new SubArtifact( jarArtifact, "", "pom" ); pomArtifact = pomArtifact.setFile( new File( "pom.xml" ) ); RemoteRepository distRepo = new RemoteRepository( "demo", "default", new File( "target/dist-repo" ).toURI().toString() ); DeployRequest deployRequest = new DeployRequest(); deployRequest.addArtifact( jarArtifact ).addArtifact( pomArtifact ); deployRequest.setRepository( distRepo ); system.deploy( session, deployRequest ); } } aether-1.13.1/aether-demo/src/main/java/demo/FindAvailableVersions.java000066400000000000000000000036761167050556700257240ustar00rootroot00000000000000package demo; /******************************************************************************* * 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.RepositorySystem; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.resolution.VersionRangeRequest; import org.sonatype.aether.resolution.VersionRangeResult; import org.sonatype.aether.util.artifact.DefaultArtifact; import org.sonatype.aether.version.Version; import demo.util.Booter; /** * Determines all available versions of an artifact. */ public class FindAvailableVersions { public static void main( String[] args ) throws Exception { System.out.println( "------------------------------------------------------------" ); System.out.println( FindAvailableVersions.class.getSimpleName() ); RepositorySystem system = Booter.newRepositorySystem(); RepositorySystemSession session = Booter.newRepositorySystemSession( system ); Artifact artifact = new DefaultArtifact( "org.sonatype.aether:aether-util:[0,)" ); RemoteRepository repo = Booter.newCentralRepository(); VersionRangeRequest rangeRequest = new VersionRangeRequest(); rangeRequest.setArtifact( artifact ); rangeRequest.addRepository( repo ); VersionRangeResult rangeResult = system.resolveVersionRange( session, rangeRequest ); List versions = rangeResult.getVersions(); System.out.println( "Available versions " + versions ); } } aether-1.13.1/aether-demo/src/main/java/demo/FindNewestVersion.java000066400000000000000000000037571167050556700251260ustar00rootroot00000000000000package demo; /******************************************************************************* * 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.RepositorySystem; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.resolution.VersionRangeRequest; import org.sonatype.aether.resolution.VersionRangeResult; import org.sonatype.aether.util.artifact.DefaultArtifact; import org.sonatype.aether.version.Version; import demo.util.Booter; /** * Determines the newest version of an artifact. */ public class FindNewestVersion { public static void main( String[] args ) throws Exception { System.out.println( "------------------------------------------------------------" ); System.out.println( FindNewestVersion.class.getSimpleName() ); RepositorySystem system = Booter.newRepositorySystem(); RepositorySystemSession session = Booter.newRepositorySystemSession( system ); Artifact artifact = new DefaultArtifact( "org.sonatype.aether:aether-util:[0,)" ); RemoteRepository repo = Booter.newCentralRepository(); VersionRangeRequest rangeRequest = new VersionRangeRequest(); rangeRequest.setArtifact( artifact ); rangeRequest.addRepository( repo ); VersionRangeResult rangeResult = system.resolveVersionRange( session, rangeRequest ); Version newestVersion = rangeResult.getHighestVersion(); System.out.println( "Newest version " + newestVersion + " from repository " + rangeResult.getRepository( newestVersion ) ); } } aether-1.13.1/aether-demo/src/main/java/demo/GetDependencyTree.java000066400000000000000000000036551167050556700250450ustar00rootroot00000000000000package demo; /******************************************************************************* * 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.RepositorySystem; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.collection.CollectRequest; import org.sonatype.aether.collection.CollectResult; import org.sonatype.aether.graph.Dependency; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.util.artifact.DefaultArtifact; import demo.util.Booter; import demo.util.ConsoleDependencyGraphDumper; /** * Collects the transitive dependencies of an artifact. */ public class GetDependencyTree { public static void main( String[] args ) throws Exception { System.out.println( "------------------------------------------------------------" ); System.out.println( GetDependencyTree.class.getSimpleName() ); RepositorySystem system = Booter.newRepositorySystem(); RepositorySystemSession session = Booter.newRepositorySystemSession( system ); Artifact artifact = new DefaultArtifact( "org.apache.maven:maven-aether-provider:3.0.2" ); RemoteRepository repo = Booter.newCentralRepository(); CollectRequest collectRequest = new CollectRequest(); collectRequest.setRoot( new Dependency( artifact, "" ) ); collectRequest.addRepository( repo ); CollectResult collectResult = system.collectDependencies( session, collectRequest ); collectResult.getRoot().accept( new ConsoleDependencyGraphDumper() ); } } aether-1.13.1/aether-demo/src/main/java/demo/GetDependencyTreeWithMirror.java000066400000000000000000000044311167050556700270650ustar00rootroot00000000000000package demo; /******************************************************************************* * 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.RepositorySystem; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.collection.CollectRequest; import org.sonatype.aether.collection.CollectResult; import org.sonatype.aether.graph.Dependency; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.util.artifact.DefaultArtifact; import org.sonatype.aether.util.repository.DefaultMirrorSelector; import demo.util.Booter; import demo.util.ConsoleDependencyGraphDumper; /** * Collects the transitive dependencies of an artifact, and demonstrate * mirror resolution. */ public class GetDependencyTreeWithMirror { public static void main( String[] args ) throws Exception { System.out.println( "------------------------------------------------------------" ); System.out.println( GetDependencyTreeWithMirror.class.getSimpleName() ); RepositorySystem system = Booter.newRepositorySystem(); RepositorySystemSession session = Booter.newRepositorySystemSession( system ); Artifact artifact = new DefaultArtifact( "org.apache.maven:maven-aether-provider:3.0.2" ); RemoteRepository central = new RemoteRepository( "central", "default", "http://repo1.maven.org/maven2/" ); DefaultMirrorSelector dms = (DefaultMirrorSelector) session.getMirrorSelector(); dms.add( "mirror", "http://repo1.maven.org/maven2/", "default", true, "central", "*" ); CollectRequest collectRequest = new CollectRequest(); collectRequest.setRoot( new Dependency( artifact, "" ) ); collectRequest.addRepository( central ); CollectResult collectResult = system.collectDependencies( session, collectRequest ); collectResult.getRoot().accept( new ConsoleDependencyGraphDumper() ); } } aether-1.13.1/aether-demo/src/main/java/demo/GetDirectDependencies.java000066400000000000000000000040361167050556700256620ustar00rootroot00000000000000package demo; /******************************************************************************* * 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.RepositorySystem; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.graph.Dependency; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.resolution.ArtifactDescriptorRequest; import org.sonatype.aether.resolution.ArtifactDescriptorResult; import org.sonatype.aether.util.artifact.DefaultArtifact; import demo.util.Booter; /** * Determines the direct dependencies of an artifact as declared in its artifact descriptor (POM). */ public class GetDirectDependencies { public static void main( String[] args ) throws Exception { System.out.println( "------------------------------------------------------------" ); System.out.println( GetDirectDependencies.class.getSimpleName() ); RepositorySystem system = Booter.newRepositorySystem(); RepositorySystemSession session = Booter.newRepositorySystemSession( system ); Artifact artifact = new DefaultArtifact( "org.sonatype.aether:aether-impl:1.9" ); RemoteRepository repo = Booter.newCentralRepository(); ArtifactDescriptorRequest descriptorRequest = new ArtifactDescriptorRequest(); descriptorRequest.setArtifact( artifact ); descriptorRequest.addRepository( repo ); ArtifactDescriptorResult descriptorResult = system.readArtifactDescriptor( session, descriptorRequest ); for ( Dependency dependency : descriptorResult.getDependencies() ) { System.out.println( dependency ); } } } aether-1.13.1/aether-demo/src/main/java/demo/InstallArtifacts.java000066400000000000000000000034461167050556700247540ustar00rootroot00000000000000package demo; /******************************************************************************* * 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 org.sonatype.aether.RepositorySystem; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.installation.InstallRequest; import org.sonatype.aether.util.artifact.DefaultArtifact; import org.sonatype.aether.util.artifact.SubArtifact; import demo.util.Booter; /** * Installs a JAR and its POM to the local repository. */ public class InstallArtifacts { public static void main( String[] args ) throws Exception { System.out.println( "------------------------------------------------------------" ); System.out.println( InstallArtifacts.class.getSimpleName() ); RepositorySystem system = Booter.newRepositorySystem(); RepositorySystemSession session = Booter.newRepositorySystemSession( system ); Artifact jarArtifact = new DefaultArtifact( "test", "demo", "", "jar", "0.1-SNAPSHOT" ); jarArtifact = jarArtifact.setFile( new File( "demo.jar" ) ); Artifact pomArtifact = new SubArtifact( jarArtifact, "", "pom" ); pomArtifact = pomArtifact.setFile( new File( "pom.xml" ) ); InstallRequest installRequest = new InstallRequest(); installRequest.addArtifact( jarArtifact ).addArtifact( pomArtifact ); system.install( session, installRequest ); } } aether-1.13.1/aether-demo/src/main/java/demo/ResolveArtifact.java000066400000000000000000000035231167050556700245760ustar00rootroot00000000000000package demo; /******************************************************************************* * 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.RepositorySystem; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.resolution.ArtifactRequest; import org.sonatype.aether.resolution.ArtifactResult; import org.sonatype.aether.util.artifact.DefaultArtifact; import demo.util.Booter; /** * Resolves a single artifact. */ public class ResolveArtifact { public static void main( String[] args ) throws Exception { System.out.println( "------------------------------------------------------------" ); System.out.println( ResolveArtifact.class.getSimpleName() ); RepositorySystem system = Booter.newRepositorySystem(); RepositorySystemSession session = Booter.newRepositorySystemSession( system ); Artifact artifact = new DefaultArtifact( "org.sonatype.aether:aether-util:1.9" ); RemoteRepository repo = Booter.newCentralRepository(); ArtifactRequest artifactRequest = new ArtifactRequest(); artifactRequest.setArtifact( artifact ); artifactRequest.addRepository( repo ); ArtifactResult artifactResult = system.resolveArtifact( session, artifactRequest ); artifact = artifactResult.getArtifact(); System.out.println( artifact + " resolved to " + artifact.getFile() ); } } aether-1.13.1/aether-demo/src/main/java/demo/ResolveTransitiveDependencies.java000066400000000000000000000050351167050556700275000ustar00rootroot00000000000000package demo; /******************************************************************************* * 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.RepositorySystem; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.collection.CollectRequest; import org.sonatype.aether.graph.Dependency; import org.sonatype.aether.graph.DependencyFilter; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.resolution.ArtifactResult; import org.sonatype.aether.resolution.DependencyRequest; import org.sonatype.aether.util.artifact.DefaultArtifact; import org.sonatype.aether.util.artifact.JavaScopes; import org.sonatype.aether.util.filter.DependencyFilterUtils; import demo.util.Booter; /** * Resolves the transitive (compile) dependencies of an artifact. */ public class ResolveTransitiveDependencies { public static void main( String[] args ) throws Exception { System.out.println( "------------------------------------------------------------" ); System.out.println( ResolveTransitiveDependencies.class.getSimpleName() ); RepositorySystem system = Booter.newRepositorySystem(); RepositorySystemSession session = Booter.newRepositorySystemSession( system ); Artifact artifact = new DefaultArtifact( "org.sonatype.aether:aether-impl:1.9" ); RemoteRepository repo = Booter.newCentralRepository(); DependencyFilter classpathFlter = DependencyFilterUtils.classpathFilter( JavaScopes.COMPILE ); CollectRequest collectRequest = new CollectRequest(); collectRequest.setRoot( new Dependency( artifact, JavaScopes.COMPILE ) ); collectRequest.addRepository( repo ); DependencyRequest dependencyRequest = new DependencyRequest( collectRequest, classpathFlter ); List artifactResults = system.resolveDependencies( session, dependencyRequest ).getArtifactResults(); for ( ArtifactResult artifactResult : artifactResults ) { System.out.println( artifactResult.getArtifact() + " resolved to " + artifactResult.getArtifact().getFile() ); } } } aether-1.13.1/aether-demo/src/main/java/demo/aether/000077500000000000000000000000001167050556700221035ustar00rootroot00000000000000aether-1.13.1/aether-demo/src/main/java/demo/aether/Aether.java000066400000000000000000000115271167050556700241640ustar00rootroot00000000000000package demo.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.ByteArrayOutputStream; import java.io.PrintStream; import org.apache.maven.repository.internal.MavenRepositorySystemSession; import org.sonatype.aether.RepositorySystem; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.collection.CollectRequest; import org.sonatype.aether.deployment.DeployRequest; import org.sonatype.aether.deployment.DeploymentException; import org.sonatype.aether.graph.Dependency; import org.sonatype.aether.graph.DependencyNode; import org.sonatype.aether.installation.InstallRequest; import org.sonatype.aether.installation.InstallationException; import org.sonatype.aether.repository.Authentication; import org.sonatype.aether.repository.LocalRepository; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.resolution.DependencyRequest; import org.sonatype.aether.resolution.DependencyResolutionException; import org.sonatype.aether.util.artifact.DefaultArtifact; import org.sonatype.aether.util.graph.PreorderNodeListGenerator; import demo.util.Booter; import demo.util.ConsoleDependencyGraphDumper; import demo.util.ConsoleRepositoryListener; import demo.util.ConsoleTransferListener; public class Aether { private String remoteRepository; private RepositorySystem repositorySystem; private LocalRepository localRepository; public Aether( String remoteRepository, String localRepository ) { this.remoteRepository = remoteRepository; this.repositorySystem = Booter.newRepositorySystem(); this.localRepository = new LocalRepository( localRepository ); } private RepositorySystemSession newSession() { MavenRepositorySystemSession session = new MavenRepositorySystemSession(); session.setLocalRepositoryManager( repositorySystem.newLocalRepositoryManager( localRepository ) ); session.setTransferListener( new ConsoleTransferListener() ); session.setRepositoryListener( new ConsoleRepositoryListener() ); return session; } public AetherResult resolve( String groupId, String artifactId, String version ) throws DependencyResolutionException { RepositorySystemSession session = newSession(); Dependency dependency = new Dependency( new DefaultArtifact( groupId, artifactId, "", "jar", version ), "runtime" ); RemoteRepository central = new RemoteRepository( "central", "default", remoteRepository ); CollectRequest collectRequest = new CollectRequest(); collectRequest.setRoot( dependency ); collectRequest.addRepository( central ); DependencyRequest dependencyRequest = new DependencyRequest(); dependencyRequest.setCollectRequest( collectRequest ); DependencyNode rootNode = repositorySystem.resolveDependencies( session, dependencyRequest ).getRoot(); StringBuilder dump = new StringBuilder(); displayTree( rootNode, dump ); PreorderNodeListGenerator nlg = new PreorderNodeListGenerator(); rootNode.accept( nlg ); return new AetherResult( rootNode, nlg.getFiles(), nlg.getClassPath() ); } public void install( Artifact artifact, Artifact pom ) throws InstallationException { RepositorySystemSession session = newSession(); InstallRequest installRequest = new InstallRequest(); installRequest.addArtifact( artifact ).addArtifact( pom ); repositorySystem.install( session, installRequest ); } public void deploy( Artifact artifact, Artifact pom, String remoteRepository ) throws DeploymentException { RepositorySystemSession session = newSession(); RemoteRepository nexus = new RemoteRepository( "nexus", "default", remoteRepository ); Authentication authentication = new Authentication( "admin", "admin123" ); nexus.setAuthentication( authentication ); DeployRequest deployRequest = new DeployRequest(); deployRequest.addArtifact( artifact ).addArtifact( pom ); deployRequest.setRepository( nexus ); repositorySystem.deploy( session, deployRequest ); } private void displayTree( DependencyNode node, StringBuilder sb ) { ByteArrayOutputStream os = new ByteArrayOutputStream( 1024 ); node.accept( new ConsoleDependencyGraphDumper( new PrintStream( os ) ) ); sb.append( os.toString() ); } } aether-1.13.1/aether-demo/src/main/java/demo/aether/AetherDemo.java000066400000000000000000000047521167050556700247730ustar00rootroot00000000000000package demo.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.deployment.DeploymentException; import org.sonatype.aether.graph.DependencyNode; import org.sonatype.aether.installation.InstallationException; import org.sonatype.aether.resolution.DependencyResolutionException; import org.sonatype.aether.util.artifact.DefaultArtifact; import org.sonatype.aether.util.artifact.SubArtifact; @SuppressWarnings( "unused" ) public class AetherDemo { public void resolve() throws DependencyResolutionException { Aether aether = new Aether( "http://localhost:8081/nexus/content/groups/public", "/Users/jvanzyl/aether-repo" ); AetherResult result = aether.resolve( "com.mycompany.app", "super-app", "1.0" ); // Get the root of the resolved tree of artifacts // DependencyNode root = result.getRoot(); // Get the list of files for the artifacts resolved // List artifacts = result.getResolvedFiles(); // Get the classpath of the artifacts resolved // String classpath = result.getResolvedClassPath(); } public void installAndDeploy() throws InstallationException, DeploymentException { Aether aether = new Aether( "http://localhost:8081/nexus/content/groups/public", "/Users/jvanzyl/aether-repo" ); Artifact artifact = new DefaultArtifact( "com.mycompany.super", "super-core", "jar", "0.1-SNAPSHOT" ); artifact = artifact.setFile( new File( "jar-from-whatever-process.jar" ) ); Artifact pom = new SubArtifact( artifact, null, "pom" ); pom = pom.setFile( new File( "pom-from-whatever-process.xml" ) ); // Install into the local repository specified // aether.install( artifact, pom ); // Deploy to a remote reposistory // aether.deploy( artifact, pom, "http://localhost:8081/nexus/content/repositories/snapshots/" ); } } aether-1.13.1/aether-demo/src/main/java/demo/aether/AetherResult.java000066400000000000000000000022461167050556700253610ustar00rootroot00000000000000package demo.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.graph.DependencyNode; public class AetherResult { private DependencyNode root; private List resolvedFiles; private String resolvedClassPath; public AetherResult( DependencyNode root, List resolvedFiles, String resolvedClassPath ) { this.root = root; this.resolvedFiles = resolvedFiles; this.resolvedClassPath = resolvedClassPath; } public DependencyNode getRoot() { return root; } public List getResolvedFiles() { return resolvedFiles; } public String getResolvedClassPath() { return resolvedClassPath; } } aether-1.13.1/aether-demo/src/main/java/demo/manual/000077500000000000000000000000001167050556700221105ustar00rootroot00000000000000aether-1.13.1/aether-demo/src/main/java/demo/manual/ManualRepositorySystemFactory.java000066400000000000000000000034111167050556700310240ustar00rootroot00000000000000package demo.manual; /******************************************************************************* * 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.apache.maven.repository.internal.DefaultServiceLocator; import org.sonatype.aether.RepositorySystem; import org.sonatype.aether.connector.file.FileRepositoryConnectorFactory; import org.sonatype.aether.connector.wagon.WagonProvider; import org.sonatype.aether.connector.wagon.WagonRepositoryConnectorFactory; import org.sonatype.aether.spi.connector.RepositoryConnectorFactory; /** * A factory for repository system instances that employs Aether's built-in service locator infrastructure to wire up * the system's components. */ public class ManualRepositorySystemFactory { public static RepositorySystem newRepositorySystem() { /* * Aether's components implement org.sonatype.aether.spi.locator.Service to ease manual wiring and using the * prepopulated DefaultServiceLocator, we only need to register the repository connector factories. */ DefaultServiceLocator locator = new DefaultServiceLocator(); locator.addService( RepositoryConnectorFactory.class, FileRepositoryConnectorFactory.class ); locator.addService( RepositoryConnectorFactory.class, WagonRepositoryConnectorFactory.class ); locator.setServices( WagonProvider.class, new ManualWagonProvider() ); return locator.getService( RepositorySystem.class ); } } aether-1.13.1/aether-demo/src/main/java/demo/manual/ManualWagonProvider.java000066400000000000000000000020571167050556700267030ustar00rootroot00000000000000package demo.manual; /******************************************************************************* * 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.apache.maven.wagon.Wagon; import org.apache.maven.wagon.providers.http.LightweightHttpWagon; import org.sonatype.aether.connector.wagon.WagonProvider; /** * A simplistic provider for wagon instances when no Plexus-compatible IoC container is used. */ public class ManualWagonProvider implements WagonProvider { public Wagon lookup( String roleHint ) throws Exception { if ( "http".equals( roleHint ) ) { return new LightweightHttpWagon(); } return null; } public void release( Wagon wagon ) { } } aether-1.13.1/aether-demo/src/main/java/demo/plexus/000077500000000000000000000000001167050556700221535ustar00rootroot00000000000000aether-1.13.1/aether-demo/src/main/java/demo/plexus/PlexusRepositorySystemFactory.java000066400000000000000000000023711167050556700311360ustar00rootroot00000000000000package demo.plexus; /******************************************************************************* * 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.codehaus.plexus.DefaultPlexusContainer; import org.sonatype.aether.RepositorySystem; /** * A factory for repository system instances that employs Plexus to wire up the system's components. */ public class PlexusRepositorySystemFactory { public static RepositorySystem newRepositorySystem() { /* * Aether's components are equipped with plexus-specific metadata to enable discovery and wiring of components * by a Plexus container so this is as easy as looking up the implementation. */ try { return new DefaultPlexusContainer().lookup( RepositorySystem.class ); } catch ( Exception e ) { throw new IllegalStateException( "dependency injection failed", e ); } } } aether-1.13.1/aether-demo/src/main/java/demo/util/000077500000000000000000000000001167050556700216105ustar00rootroot00000000000000aether-1.13.1/aether-demo/src/main/java/demo/util/Booter.java000066400000000000000000000035031167050556700237060ustar00rootroot00000000000000package demo.util; /******************************************************************************* * 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.apache.maven.repository.internal.MavenRepositorySystemSession; import org.sonatype.aether.RepositorySystem; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.repository.LocalRepository; import org.sonatype.aether.repository.RemoteRepository; import demo.manual.ManualRepositorySystemFactory; /** * A helper to boot the repository system and a repository system session. */ public class Booter { public static RepositorySystem newRepositorySystem() { return ManualRepositorySystemFactory.newRepositorySystem(); } public static RepositorySystemSession newRepositorySystemSession( RepositorySystem system ) { MavenRepositorySystemSession session = new MavenRepositorySystemSession(); LocalRepository localRepo = new LocalRepository( "target/local-repo" ); session.setLocalRepositoryManager( system.newLocalRepositoryManager( localRepo ) ); session.setTransferListener( new ConsoleTransferListener() ); session.setRepositoryListener( new ConsoleRepositoryListener() ); // uncomment to generate dirty trees // session.setDependencyGraphTransformer( null ); return session; } public static RemoteRepository newCentralRepository() { return new RemoteRepository( "central", "default", "http://repo1.maven.org/maven2/" ); } } aether-1.13.1/aether-demo/src/main/java/demo/util/ConsoleDependencyGraphDumper.java000066400000000000000000000027431167050556700302210ustar00rootroot00000000000000package demo.util; /******************************************************************************* * 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.PrintStream; import org.sonatype.aether.graph.DependencyNode; import org.sonatype.aether.graph.DependencyVisitor; /** * A dependency visitor that dumps the graph to the console. */ public class ConsoleDependencyGraphDumper implements DependencyVisitor { private PrintStream out; private String currentIndent = ""; public ConsoleDependencyGraphDumper() { this( null ); } public ConsoleDependencyGraphDumper( PrintStream out ) { this.out = ( out != null ) ? out : System.out; } public boolean visitEnter( DependencyNode node ) { out.println( currentIndent + node ); if ( currentIndent.length() <= 0 ) { currentIndent = "+- "; } else { currentIndent = "| " + currentIndent; } return true; } public boolean visitLeave( DependencyNode node ) { currentIndent = currentIndent.substring( 3, currentIndent.length() ); return true; } } aether-1.13.1/aether-demo/src/main/java/demo/util/ConsoleRepositoryListener.java000066400000000000000000000073411167050556700276700ustar00rootroot00000000000000package demo.util; /******************************************************************************* * 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.PrintStream; import org.sonatype.aether.AbstractRepositoryListener; import org.sonatype.aether.RepositoryEvent; /** * A simplistic repository listener that logs events to the console. */ public class ConsoleRepositoryListener extends AbstractRepositoryListener { private PrintStream out; public ConsoleRepositoryListener() { this( null ); } public ConsoleRepositoryListener( PrintStream out ) { this.out = ( out != null ) ? out : System.out; } public void artifactDeployed( RepositoryEvent event ) { out.println( "Deployed " + event.getArtifact() + " to " + event.getRepository() ); } public void artifactDeploying( RepositoryEvent event ) { out.println( "Deploying " + event.getArtifact() + " to " + event.getRepository() ); } public void artifactDescriptorInvalid( RepositoryEvent event ) { out.println( "Invalid artifact descriptor for " + event.getArtifact() + ": " + event.getException().getMessage() ); } public void artifactDescriptorMissing( RepositoryEvent event ) { out.println( "Missing artifact descriptor for " + event.getArtifact() ); } public void artifactInstalled( RepositoryEvent event ) { out.println( "Installed " + event.getArtifact() + " to " + event.getFile() ); } public void artifactInstalling( RepositoryEvent event ) { out.println( "Installing " + event.getArtifact() + " to " + event.getFile() ); } public void artifactResolved( RepositoryEvent event ) { out.println( "Resolved artifact " + event.getArtifact() + " from " + event.getRepository() ); } public void artifactDownloading( RepositoryEvent event ) { out.println( "Downloading artifact " + event.getArtifact() + " from " + event.getRepository() ); } public void artifactDownloaded( RepositoryEvent event ) { out.println( "Downloaded artifact " + event.getArtifact() + " from " + event.getRepository() ); } public void artifactResolving( RepositoryEvent event ) { out.println( "Resolving artifact " + event.getArtifact() ); } public void metadataDeployed( RepositoryEvent event ) { out.println( "Deployed " + event.getMetadata() + " to " + event.getRepository() ); } public void metadataDeploying( RepositoryEvent event ) { out.println( "Deploying " + event.getMetadata() + " to " + event.getRepository() ); } public void metadataInstalled( RepositoryEvent event ) { out.println( "Installed " + event.getMetadata() + " to " + event.getFile() ); } public void metadataInstalling( RepositoryEvent event ) { out.println( "Installing " + event.getMetadata() + " to " + event.getFile() ); } public void metadataInvalid( RepositoryEvent event ) { out.println( "Invalid metadata " + event.getMetadata() ); } public void metadataResolved( RepositoryEvent event ) { out.println( "Resolved metadata " + event.getMetadata() + " from " + event.getRepository() ); } public void metadataResolving( RepositoryEvent event ) { out.println( "Resolving metadata " + event.getMetadata() + " from " + event.getRepository() ); } } aether-1.13.1/aether-demo/src/main/java/demo/util/ConsoleTransferListener.java000066400000000000000000000115471167050556700273000ustar00rootroot00000000000000package demo.util; /******************************************************************************* * 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.PrintStream; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; import java.util.Locale; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import org.sonatype.aether.transfer.AbstractTransferListener; import org.sonatype.aether.transfer.TransferEvent; import org.sonatype.aether.transfer.TransferResource; /** * A simplistic transfer listener that logs uploads/downloads to the console. */ public class ConsoleTransferListener extends AbstractTransferListener { private PrintStream out; private Map downloads = new ConcurrentHashMap(); private int lastLength; public ConsoleTransferListener() { this( null ); } public ConsoleTransferListener( PrintStream out ) { this.out = ( out != null ) ? out : System.out; } @Override public void transferInitiated( TransferEvent event ) { String message = event.getRequestType() == TransferEvent.RequestType.PUT ? "Uploading" : "Downloading"; out.println( message + ": " + event.getResource().getRepositoryUrl() + event.getResource().getResourceName() ); } @Override public void transferProgressed( TransferEvent event ) { TransferResource resource = event.getResource(); downloads.put( resource, Long.valueOf( event.getTransferredBytes() ) ); StringBuilder buffer = new StringBuilder( 64 ); for ( Map.Entry entry : downloads.entrySet() ) { long total = entry.getKey().getContentLength(); long complete = entry.getValue().longValue(); buffer.append( getStatus( complete, total ) ).append( " " ); } int pad = lastLength - buffer.length(); lastLength = buffer.length(); pad( buffer, pad ); buffer.append( '\r' ); out.print( buffer ); } private String getStatus( long complete, long total ) { if ( total >= 1024 ) { return toKB( complete ) + "/" + toKB( total ) + " KB "; } else if ( total >= 0 ) { return complete + "/" + total + " B "; } else if ( complete >= 1024 ) { return toKB( complete ) + " KB "; } else { return complete + " B "; } } private void pad( StringBuilder buffer, int spaces ) { String block = " "; while ( spaces > 0 ) { int n = Math.min( spaces, block.length() ); buffer.append( block, 0, n ); spaces -= n; } } @Override public void transferSucceeded( TransferEvent event ) { transferCompleted( event ); TransferResource resource = event.getResource(); long contentLength = event.getTransferredBytes(); if ( contentLength >= 0 ) { String type = ( event.getRequestType() == TransferEvent.RequestType.PUT ? "Uploaded" : "Downloaded" ); String len = contentLength >= 1024 ? toKB( contentLength ) + " KB" : contentLength + " B"; String throughput = ""; long duration = System.currentTimeMillis() - resource.getTransferStartTime(); if ( duration > 0 ) { DecimalFormat format = new DecimalFormat( "0.0", new DecimalFormatSymbols( Locale.ENGLISH ) ); double kbPerSec = ( contentLength / 1024.0 ) / ( duration / 1000.0 ); throughput = " at " + format.format( kbPerSec ) + " KB/sec"; } out.println( type + ": " + resource.getRepositoryUrl() + resource.getResourceName() + " (" + len + throughput + ")" ); } } @Override public void transferFailed( TransferEvent event ) { transferCompleted( event ); event.getException().printStackTrace( out ); } private void transferCompleted( TransferEvent event ) { downloads.remove( event.getResource() ); StringBuilder buffer = new StringBuilder( 64 ); pad( buffer, lastLength ); buffer.append( '\r' ); out.print( buffer ); } public void transferCorrupted( TransferEvent event ) { event.getException().printStackTrace( out ); } protected long toKB( long bytes ) { return ( bytes + 1023 ) / 1024; } } aether-1.13.1/aether-impl/000077500000000000000000000000001167050556700152705ustar00rootroot00000000000000aether-1.13.1/aether-impl/pom.xml000066400000000000000000000045371167050556700166160ustar00rootroot00000000000000 4.0.0 org.sonatype.aether aether 1.13.1 aether-impl Aether :: Implementation An implementation of the repository system. org.sonatype.aether aether-api org.sonatype.aether aether-spi org.sonatype.aether aether-util org.codehaus.plexus plexus-component-annotations provided org.sonatype.sisu sisu-inject-plexus provided org.slf4j slf4j-api 1.6.1 provided junit junit test org.sonatype.aether aether-test-util test org.codehaus.mojo animal-sniffer-maven-plugin org.codehaus.plexus plexus-component-metadata aether-1.13.1/aether-impl/src/000077500000000000000000000000001167050556700160575ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/main/000077500000000000000000000000001167050556700170035ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/main/java/000077500000000000000000000000001167050556700177245ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/main/java/org/000077500000000000000000000000001167050556700205135ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/main/java/org/sonatype/000077500000000000000000000000001167050556700223555ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/000077500000000000000000000000001167050556700236255ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/000077500000000000000000000000001167050556700245665ustar00rootroot00000000000000AbstractLocalRepositoryMaintainer.java000066400000000000000000000017731167050556700342100ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/implpackage org.sonatype.aether.impl; /******************************************************************************* * 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 local repository maintainers. The callback methods in this class do nothing. * * @author Benjamin Bentmann * @deprecated As of version 1.9, use a global {@link org.sonatype.aether.RepositoryListener} instead. */ @Deprecated public abstract class AbstractLocalRepositoryMaintainer implements LocalRepositoryMaintainer { public void artifactInstalled( LocalRepositoryEvent event ) { } public void artifactDownloaded( LocalRepositoryEvent event ) { } } aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/ArtifactDescriptorReader.java000066400000000000000000000025371167050556700323570ustar00rootroot00000000000000package org.sonatype.aether.impl; /******************************************************************************* * 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; import org.sonatype.aether.resolution.ArtifactDescriptorException; import org.sonatype.aether.resolution.ArtifactDescriptorRequest; import org.sonatype.aether.resolution.ArtifactDescriptorResult; /** * @author Benjamin Bentmann */ public interface ArtifactDescriptorReader { /** * Gets information about an artifact like its direct dependencies. * * @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. */ ArtifactDescriptorResult readArtifactDescriptor( RepositorySystemSession session, ArtifactDescriptorRequest request ) throws ArtifactDescriptorException; } aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/ArtifactResolver.java000066400000000000000000000025411167050556700307120ustar00rootroot00000000000000package org.sonatype.aether.impl; /******************************************************************************* * 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.RepositorySystemSession; import org.sonatype.aether.resolution.ArtifactRequest; import org.sonatype.aether.resolution.ArtifactResolutionException; import org.sonatype.aether.resolution.ArtifactResult; /** * @author Benjamin Bentmann */ public interface ArtifactResolver { /** * Resolves the path for an artifact. The artifact will be downloaded if necessary. */ ArtifactResult resolveArtifact( RepositorySystemSession session, ArtifactRequest request ) throws ArtifactResolutionException; /** * Resolves the paths for a collection of artifacts. Artifacts will be downloaded if necessary. */ List resolveArtifacts( RepositorySystemSession session, Collection requests ) throws ArtifactResolutionException; } aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/DependencyCollector.java000066400000000000000000000023151167050556700313570ustar00rootroot00000000000000package org.sonatype.aether.impl; /******************************************************************************* * 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.RepositorySystem; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.collection.CollectRequest; import org.sonatype.aether.collection.CollectResult; import org.sonatype.aether.collection.DependencyCollectionException; /** * This collector fulfills the contract of * {@link RepositorySystem#collectDependencies(RepositorySystemSession, CollectRequest)}. * * @author Benjamin Bentmann */ public interface DependencyCollector { /** * @see RepositorySystem#collectDependencies(RepositorySystemSession, CollectRequest) */ CollectResult collectDependencies( RepositorySystemSession session, CollectRequest request ) throws DependencyCollectionException; } aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/Deployer.java000066400000000000000000000026351167050556700272220ustar00rootroot00000000000000package org.sonatype.aether.impl; /******************************************************************************* * 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.RepositorySystem; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.deployment.DeployRequest; import org.sonatype.aether.deployment.DeployResult; import org.sonatype.aether.deployment.DeploymentException; /** * @author Benjamin Bentmann */ public interface Deployer { /** * 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. * @see RepositorySystem#deploy(RepositorySystemSession, DeployRequest) */ DeployResult deploy( RepositorySystemSession session, DeployRequest request ) throws DeploymentException; } aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/Installer.java000066400000000000000000000026701167050556700273730ustar00rootroot00000000000000package org.sonatype.aether.impl; /******************************************************************************* * 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.RepositorySystem; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.installation.InstallRequest; import org.sonatype.aether.installation.InstallResult; import org.sonatype.aether.installation.InstallationException; /** * @author Benjamin Bentmann */ public interface Installer { /** * 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. * @see RepositorySystem#install(RepositorySystemSession, InstallRequest) */ InstallResult install( RepositorySystemSession session, InstallRequest request ) throws InstallationException; } aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/LocalRepositoryEvent.java000066400000000000000000000040731167050556700315710ustar00rootroot00000000000000package org.sonatype.aether.impl; /******************************************************************************* * 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 org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.repository.LocalRepository; /** * An event describing an update to the local repository. * * @author Benjamin Bentmann * @see LocalRepositoryMaintainer * @deprecated As of version 1.9, use a global {@link org.sonatype.aether.RepositoryListener} instead. */ @Deprecated public interface LocalRepositoryEvent { /** * The type of the event. */ enum EventType { ARTIFACT_INSTALLED, ARTIFACT_DOWNLOADED } /** * Gets the type of the event. * * @return The type of the event, never {@code null}. */ EventType getType(); /** * Gets the repository session from which this event originates. * * @return The repository session, never {@code null}. */ RepositorySystemSession getSession(); /** * Gets the local repository which has been updated. * * @return The local repository, never {@code null}. */ LocalRepository getRepository(); /** * Gets the artifact that was updated. Note that the file associated with this artifact need not point at the * artifact's location within the local repository, use {@link #getFile()} to query this path. * * @return The artifact, never {@code null}. */ Artifact getArtifact(); /** * Gets the path to the artifact within the local repository. * * @return The path to the artifact in the local repository, never {@code null}. */ File getFile(); } aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/LocalRepositoryMaintainer.java000066400000000000000000000031171167050556700325750ustar00rootroot00000000000000package org.sonatype.aether.impl; /******************************************************************************* * 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 *******************************************************************************/ /** * Performs housekeeping tasks in response to updates to the local repository. This provides an extension point to * integrators to perform things like updating indexes. Note: Implementors are strongly advised to inherit from * {@link AbstractLocalRepositoryMaintainer} instead of directly implementing this interface. * * @author Benjamin Bentmann * @deprecated As of version 1.9, use a global {@link org.sonatype.aether.RepositoryListener} instead. */ @Deprecated public interface LocalRepositoryMaintainer { /** * Notifies the maintainer of the addition of an artifact to the local repository by a local build. * * @param event The event that holds details about the artifact, must not be {@code null}. */ void artifactInstalled( LocalRepositoryEvent event ); /** * Notifies the maintainer of the addition of an artifact to the local repository by download from a remote * repository. * * @param event The event that holds details about the artifact, must not be {@code null}. */ void artifactDownloaded( LocalRepositoryEvent event ); } aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/LocalRepositoryProvider.java000066400000000000000000000016061167050556700323010ustar00rootroot00000000000000package org.sonatype.aether.impl; /******************************************************************************* * 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.repository.LocalRepository; import org.sonatype.aether.repository.LocalRepositoryManager; import org.sonatype.aether.repository.NoLocalRepositoryManagerException; /** * @author Benjamin Bentmann */ public interface LocalRepositoryProvider { LocalRepositoryManager newLocalRepositoryManager( LocalRepository localRepository ) throws NoLocalRepositoryManagerException; } aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/MetadataGenerator.java000066400000000000000000000035251167050556700310250ustar00rootroot00000000000000package org.sonatype.aether.impl; /******************************************************************************* * 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 metadata generator that participates in the installation/deployment of artifacts. * * @author Benjamin Bentmann */ public interface MetadataGenerator { /** * Prepares the generator to transform artifacts. * * @param artifacts The artifacts to install/deploy, must not be {@code null}. * @return The metadata to process (e.g. merge with existing metadata) before artifact transformations, never * {@code null}. */ Collection prepare( Collection artifacts ); /** * Enables the metadata generator to transform the specified artifact. * * @param artifact The artifact to transform, must not be {@code null}. * @return The transformed artifact (or just the input artifact), never {@code null}. */ Artifact transformArtifact( Artifact artifact ); /** * Allows for metadata generation based on the transformed artifacts. * * @param artifacts The (transformed) artifacts to install/deploy, must not be {@code null}. * @return The additional metadata to process after artifact transformations, never {@code null}. */ Collection finish( Collection artifacts ); } aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/MetadataGeneratorFactory.java000066400000000000000000000040421167050556700323500ustar00rootroot00000000000000package org.sonatype.aether.impl; /******************************************************************************* * 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; import org.sonatype.aether.deployment.DeployRequest; import org.sonatype.aether.installation.InstallRequest; /** * A factory to create metadata generators. Metadata generators can contribute additional metadata during the * installation/deployment of artifacts. * * @author Benjamin Bentmann */ public interface MetadataGeneratorFactory { /** * Creates a new metadata generator for the specified install request. * * @param session The repository system session from which to configure the generator, must not be {@code null}. * @param request The install request the metadata generator is used for, must not be {@code null}. * @return The metadata generator for the request or {@code null} if none. */ MetadataGenerator newInstance( RepositorySystemSession session, InstallRequest request ); /** * Creates a new metadata generator for the specified deploy request. * * @param session The repository system session from which to configure the generator, must not be {@code null}. * @param request The deploy request the metadata generator is used for, must not be {@code null}. * @return The metadata generator for the request or {@code null} if none. */ MetadataGenerator newInstance( RepositorySystemSession session, DeployRequest request ); /** * The priority of this factory. Factories with higher priority are invoked before those with lower priority. * * @return The priority of this factory. */ int getPriority(); } aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/MetadataResolver.java000066400000000000000000000017741167050556700307040ustar00rootroot00000000000000package org.sonatype.aether.impl; /******************************************************************************* * 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.RepositorySystemSession; import org.sonatype.aether.resolution.MetadataRequest; import org.sonatype.aether.resolution.MetadataResult; /** * @author Benjamin Bentmann */ public interface MetadataResolver { /** * Resolves the paths for a collection of metadata. Metadata will be downloaded if necessary. */ List resolveMetadata( RepositorySystemSession session, Collection requests ); } aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/RemoteRepositoryManager.java000066400000000000000000000027551167050556700322700ustar00rootroot00000000000000package org.sonatype.aether.impl; /******************************************************************************* * 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.repository.RemoteRepository; import org.sonatype.aether.repository.RepositoryPolicy; import org.sonatype.aether.spi.connector.RepositoryConnector; import org.sonatype.aether.transfer.NoRepositoryConnectorException; /** * @author Benjamin Bentmann */ public interface RemoteRepositoryManager { List aggregateRepositories( RepositorySystemSession session, List dominantRepositories, List recessiveRepositories, boolean recessiveIsRaw ); RepositoryPolicy getPolicy( RepositorySystemSession session, RemoteRepository repository, boolean releases, boolean snapshots ); RepositoryConnector getRepositoryConnector( RepositorySystemSession session, RemoteRepository repository ) throws NoRepositoryConnectorException; } aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/RepositoryEventDispatcher.java000066400000000000000000000016001167050556700326160ustar00rootroot00000000000000package org.sonatype.aether.impl; /******************************************************************************* * 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.RepositoryEvent; /** * Dispatches repository events to registered listeners. * * @author Benjamin Bentmann */ public interface RepositoryEventDispatcher { /** * Dispatches the specified repository event to all registered listeners. * * @param event The event to dispatch, must not be {@code null}. */ void dispatch( RepositoryEvent event ); } aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/SyncContextFactory.java000066400000000000000000000024641167050556700312500ustar00rootroot00000000000000package org.sonatype.aether.impl; /******************************************************************************* * 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; import org.sonatype.aether.SyncContext; /** * A factory to create synchronization contexts. A synchronization context is used to coordinate concurrent access to * artifacts or metadata. */ public interface SyncContextFactory { /** * 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 newInstance( RepositorySystemSession session, boolean shared ); } aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/UpdateCheck.java000066400000000000000000000177321167050556700276230ustar00rootroot00000000000000package org.sonatype.aether.impl; /******************************************************************************* * 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 org.sonatype.aether.RepositoryException; import org.sonatype.aether.repository.RemoteRepository; /** * A request to check if an update of an artifact/metadata from a remote repository is needed. * * @see UpdateCheckManager * @author Benjamin Bentmann */ public class UpdateCheck { private long localLastUpdated; private T item; private File file; private boolean fileValid = true; private String policy; private RemoteRepository repository; private RemoteRepository authoritativeRepository; private boolean required; private E exception; /** * Gets the last-modified timestamp of the corresponding item produced by a local installation. If non-zero, a * remote update will be surpressed if the local item is up-to-date, even if the remote item has not been cached * locally. * * @return The last-modified timestamp of the corresponding item produced by a local installation or {@code 0} to * ignore any local item. */ public long getLocalLastUpdated() { return localLastUpdated; } /** * Sets the last-modified timestamp of the corresponding item produced by a local installation. If non-zero, a * remote update will be surpressed if the local item is up-to-date, even if the remote item has not been cached * locally. * * @param localLastUpdated The last-modified timestamp of the corresponding item produced by a local installation or * {@code 0} to ignore any local item. * @return This object for chaining. */ public UpdateCheck setLocalLastUpdated( long localLastUpdated ) { this.localLastUpdated = localLastUpdated; return this; } /** * Gets the item of the check. * * @return The item of the check, never {@code null}. */ public T getItem() { return item; } /** * Sets the item of the check. * * @param item The item of the check, must not be {@code null}. * @return This object for chaining. */ public UpdateCheck setItem( T item ) { this.item = item; return this; } /** * Returns the local file of the item. * * @return The local file of the item. */ public File getFile() { return file; } /** * Sets the local file of the item. * * @param file The file of the item, never {@code null} . * @return This object for chaining. */ public UpdateCheck setFile( File file ) { this.file = file; return this; } /** * Indicates whether the local file given by {@link #getFile()}, if existent, should be considered valid or not. An * invalid file is equivalent to a physically missing file. * * @return {@code true} if the file should be considered valid if existent, {@code false} if the file should be * treated as if it was missing. */ public boolean isFileValid() { return fileValid; } /** * Controls whether the local file given by {@link #getFile()}, if existent, should be considered valid or not. An * invalid file is equivalent to a physically missing file. * * @param fileValid {@code true} if the file should be considered valid if existent, {@code false} if the file * should be treated as if it was missing. * @return This object for chaining. */ public UpdateCheck setFileValid( boolean fileValid ) { this.fileValid = fileValid; return this; } /** * Gets the policy to use for the check. * * @return The policy to use for the check. * @see org.sonatype.aether.repository.RepositoryPolicy */ public String getPolicy() { return policy; } /** * Sets the policy to use for the check. * * @param policy The policy to use for the check, may be {@code null}. * @return This object for chaining. * @see org.sonatype.aether.repository.RepositoryPolicy */ public UpdateCheck setPolicy( String policy ) { this.policy = policy; return this; } /** * Gets the repository from which a potential update/download will performed. * * @return The repository to use for the check. */ public RemoteRepository getRepository() { return repository; } /** * Sets the repository from which a potential update/download will performed. * * @param repository The repository to use for the check, must not be {@code null}. * @return This object for chaining. */ public UpdateCheck setRepository( RemoteRepository repository ) { this.repository = repository; return this; } /** * Gets the repository which ultimately hosts the metadata to update. This will be different from the repository * given by {@link #getRepository()} in case the latter denotes a repository manager. * * @return The actual repository hosting the authoritative copy of the metadata to update, never {@code null} for a * metadata update check. */ public RemoteRepository getAuthoritativeRepository() { return authoritativeRepository != null ? authoritativeRepository : repository; } /** * Sets the repository which ultimately hosts the metadata to update. This will be different from the repository * given by {@link #getRepository()} in case the latter denotes a repository manager. * * @param authoritativeRepository The actual repository hosting the authoritative copy of the metadata to update, * must not be {@code null} for a metadata update check. * @return This object for chaining. */ public UpdateCheck setAuthoritativeRepository( RemoteRepository authoritativeRepository ) { this.authoritativeRepository = authoritativeRepository; return this; } /** * Gets the result of a check, denoting whether the remote repository should be checked for updates. * * @return The result of a check. */ public boolean isRequired() { return required; } /** * Sets the result of an update check. * * @param required The result of an update check. In case of {@code false} and the local file given by * {@link #getFile()} does actually not exist, {@link #setException(RepositoryException)} should be used * to provide the previous/cached failure that explains the absence of the file. * @return This object for chaining. */ public UpdateCheck setRequired( boolean required ) { this.required = required; return this; } /** * Gets the exception that occurred during the update check. * * @return The occurred exception or {@code null} if the update check was successful. */ public E getException() { return exception; } /** * Sets the exception for this update check. * * @param exception The exception for this update check, may be {@code null} if the check was successful. * @return This object for chaining. */ public UpdateCheck setException( E exception ) { this.exception = exception; return this; } @Override public String toString() { return getPolicy() + ": " + getFile() + " < " + getRepository(); } } aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/UpdateCheckManager.java000066400000000000000000000071401167050556700311060ustar00rootroot00000000000000package org.sonatype.aether.impl; /******************************************************************************* * 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; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.metadata.Metadata; import org.sonatype.aether.transfer.ArtifactTransferException; import org.sonatype.aether.transfer.MetadataTransferException; /** * Determines if updates of artifacts and metadata from remote repositories are needed. * * @author Benjamin Bentmann */ public interface UpdateCheckManager { /** * Returns the policy with the shorter update interval. * * @param session The repository system session during which the request is made, must not be {@code null}. * @param policy1 A policy to compare, may be {@code null}. * @param policy2 A policy to compare, may be {@code null}. * @return The policy with the shorter update interval. */ String getEffectiveUpdatePolicy( RepositorySystemSession session, String policy1, String policy2 ); /** * Determines whether the specified modification timestamp satisfies the freshness constraint expressed by the given * update policy. * * @param session The repository system session during which the check is made, must not be {@code null}. * @param lastModified The timestamp to check against the update policy. * @param policy The update policy, may be {@code null}. * @return {@code true} if the specified timestamp is older than acceptable by the update policy, {@code false} * otherwise. */ boolean isUpdatedRequired( RepositorySystemSession session, long lastModified, String policy ); /** * Checks whether an artifact has to be updated from a remote repository. * * @param session The repository system session during which the request is made, must not be {@code null}. * @param check The update check request, must not be {@code null}. */ void checkArtifact( RepositorySystemSession session, UpdateCheck check ); /** * Updates the timestamp for the artifact contained in the update check. * * @param session The repository system session during which the request is made, must not be {@code null}. * @param check The update check request, must not be {@code null}. */ void touchArtifact( RepositorySystemSession session, UpdateCheck check ); /** * Checks whether metadata has to be updated from a remote repository. * * @param session The repository system session during which the request is made, must not be {@code null}. * @param check The update check request, must not be {@code null}. */ void checkMetadata( RepositorySystemSession session, UpdateCheck check ); /** * Updates the timestamp for the metadata contained in the update check. * * @param session The repository system session during which the request is made, must not be {@code null}. * @param check The update check request, must not be {@code null}. */ void touchMetadata( RepositorySystemSession session, UpdateCheck check ); } aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/VersionRangeResolver.java000066400000000000000000000021601167050556700315540ustar00rootroot00000000000000package org.sonatype.aether.impl; /******************************************************************************* * 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; import org.sonatype.aether.resolution.VersionRangeRequest; import org.sonatype.aether.resolution.VersionRangeResolutionException; import org.sonatype.aether.resolution.VersionRangeResult; /** * @author Benjamin Bentmann */ public interface VersionRangeResolver { /** * 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"]. */ VersionRangeResult resolveVersionRange( RepositorySystemSession session, VersionRangeRequest request ) throws VersionRangeResolutionException; } aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/VersionResolver.java000066400000000000000000000026001167050556700305760ustar00rootroot00000000000000package org.sonatype.aether.impl; /******************************************************************************* * 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; import org.sonatype.aether.resolution.VersionRequest; import org.sonatype.aether.resolution.VersionResolutionException; import org.sonatype.aether.resolution.VersionResult; /** * @author Benjamin Bentmann */ public interface VersionResolver { /** * Resolves an artifact's meta version (if any) to a concrete version. For example, resolves "1.0-SNAPSHOT" to * "1.0-20090208.132618-23" or "RELEASE"/"LATEST" to "2.0". * * @param session The repository session, must not be {@code null}. * @param request The version request, must not be {@code null} * @return The version result, never {@code null}. * @throws VersionResolutionException If the metaversion could not be resolved. */ VersionResult resolveVersion( RepositorySystemSession session, VersionRequest request ) throws VersionResolutionException; } aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/internal/000077500000000000000000000000001167050556700264025ustar00rootroot00000000000000ArtifactRequestBuilder.java000066400000000000000000000030261167050556700336040ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/internalpackage org.sonatype.aether.impl.internal; /******************************************************************************* * 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.RequestTrace; import org.sonatype.aether.graph.DependencyNode; import org.sonatype.aether.graph.DependencyVisitor; import org.sonatype.aether.resolution.ArtifactRequest; /** * @author Benjamin Bentmann */ class ArtifactRequestBuilder implements DependencyVisitor { private final RequestTrace trace; private List requests; public ArtifactRequestBuilder( RequestTrace trace ) { this.trace = trace; this.requests = new ArrayList(); } public List getRequests() { return requests; } public boolean visitEnter( DependencyNode node ) { if ( node.getDependency() != null ) { ArtifactRequest request = new ArtifactRequest( node ); request.setTrace( trace ); requests.add( request ); } return true; } public boolean visitLeave( DependencyNode node ) { return true; } } aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/internal/CacheUtils.java000066400000000000000000000100041167050556700312640ustar00rootroot00000000000000package org.sonatype.aether.impl.internal; /******************************************************************************* * 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.Iterator; import java.util.List; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.repository.ArtifactRepository; import org.sonatype.aether.repository.LocalRepository; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.repository.RepositoryPolicy; import org.sonatype.aether.repository.WorkspaceReader; import org.sonatype.aether.repository.WorkspaceRepository; /** * @author Benjamin Bentmann */ public class CacheUtils { public static boolean eq( T s1, T s2 ) { return s1 != null ? s1.equals( s2 ) : s2 == null; } public static int hash( Object obj ) { return obj != null ? obj.hashCode() : 0; } public static int repositoriesHashCode( List repositories ) { int result = 17; for ( RemoteRepository repository : repositories ) { result = 31 * result + repositoryHashCode( repository ); } return result; } private static int repositoryHashCode( RemoteRepository repository ) { int result = 17; result = 31 * result + hash( repository.getUrl() ); return result; } private static boolean repositoryEquals( RemoteRepository r1, RemoteRepository r2 ) { if ( r1 == r2 ) { return true; } return eq( r1.getId(), r2.getId() ) && eq( r1.getUrl(), r2.getUrl() ) && policyEquals( r1.getPolicy( false ), r2.getPolicy( false ) ) && policyEquals( r1.getPolicy( true ), r2.getPolicy( true ) ); } private static boolean policyEquals( RepositoryPolicy p1, RepositoryPolicy p2 ) { if ( p1 == p2 ) { return true; } // update policy doesn't affect contents return p1.isEnabled() == p2.isEnabled() && eq( p1.getChecksumPolicy(), p2.getChecksumPolicy() ); } public static boolean repositoriesEquals( List r1, List r2 ) { if ( r1.size() != r2.size() ) { return false; } for ( Iterator it1 = r1.iterator(), it2 = r2.iterator(); it1.hasNext(); ) { if ( !repositoryEquals( it1.next(), it2.next() ) ) { return false; } } return true; } public static WorkspaceRepository getWorkspace( RepositorySystemSession session ) { WorkspaceReader reader = session.getWorkspaceReader(); return ( reader != null ) ? reader.getRepository() : null; } public static ArtifactRepository getRepository( RepositorySystemSession session, List repositories, Class repoClass, String repoId ) { if ( repoClass != null ) { if ( WorkspaceRepository.class.isAssignableFrom( repoClass ) ) { return session.getWorkspaceReader().getRepository(); } else if ( LocalRepository.class.isAssignableFrom( repoClass ) ) { return session.getLocalRepository(); } else { for ( RemoteRepository repository : repositories ) { if ( repoId.equals( repository.getId() ) ) { return repository; } } } } return null; } } CachingArtifactTypeRegistry.java000066400000000000000000000034221167050556700345740ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/internalpackage org.sonatype.aether.impl.internal; /******************************************************************************* * 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.HashMap; import java.util.Map; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.artifact.ArtifactType; import org.sonatype.aether.artifact.ArtifactTypeRegistry; /** * A short-lived artifact type registry that caches results from a presumedly slower type registry. * * @author Benjamin Bentmann */ class CachingArtifactTypeRegistry implements ArtifactTypeRegistry { private final ArtifactTypeRegistry delegate; private final Map types; public static ArtifactTypeRegistry newInstance( RepositorySystemSession session ) { return newInstance( session.getArtifactTypeRegistry() ); } public static ArtifactTypeRegistry newInstance( ArtifactTypeRegistry delegate ) { return ( delegate != null ) ? new CachingArtifactTypeRegistry( delegate ) : null; } private CachingArtifactTypeRegistry( ArtifactTypeRegistry delegate ) { this.delegate = delegate; types = new HashMap(); } public ArtifactType get( String typeId ) { ArtifactType type = types.get( typeId ); if ( type == null ) { type = delegate.get( typeId ); types.put( typeId, type ); } return type; } } aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/internal/DataPool.java000066400000000000000000000336171167050556700307620ustar00rootroot00000000000000package org.sonatype.aether.impl.internal; /******************************************************************************* * 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 java.util.Collections; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.WeakHashMap; import org.sonatype.aether.RepositoryCache; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.collection.DependencyManager; import org.sonatype.aether.collection.DependencySelector; import org.sonatype.aether.collection.DependencyTraverser; import org.sonatype.aether.graph.Dependency; import org.sonatype.aether.repository.ArtifactRepository; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.resolution.ArtifactDescriptorException; import org.sonatype.aether.resolution.ArtifactDescriptorRequest; import org.sonatype.aether.resolution.ArtifactDescriptorResult; import org.sonatype.aether.resolution.VersionRangeRequest; import org.sonatype.aether.resolution.VersionRangeResult; import org.sonatype.aether.version.Version; import org.sonatype.aether.version.VersionConstraint; /** * @author Benjamin Bentmann */ final class DataPool { private static final String ARTIFACT_POOL = DataPool.class.getName() + "$Artifact"; private static final String DEPENDENCY_POOL = DataPool.class.getName() + "$Dependency"; private static final String DESCRIPTORS = DataPool.class.getName() + "$Descriptors"; public static final ArtifactDescriptorResult NO_DESCRIPTOR = new ArtifactDescriptorResult( new ArtifactDescriptorRequest() ); private ObjectPool artifacts; private ObjectPool dependencies; private Map descriptors; private Map constraints = new WeakHashMap(); private Map nodes = new HashMap( 256 ); @SuppressWarnings( "unchecked" ) public DataPool( RepositorySystemSession session ) { RepositoryCache cache = session.getCache(); if ( cache != null ) { artifacts = (ObjectPool) cache.get( session, ARTIFACT_POOL ); dependencies = (ObjectPool) cache.get( session, DEPENDENCY_POOL ); descriptors = (Map) cache.get( session, DESCRIPTORS ); } if ( artifacts == null ) { artifacts = new ObjectPool(); if ( cache != null ) { cache.put( session, ARTIFACT_POOL, artifacts ); } } if ( dependencies == null ) { dependencies = new ObjectPool(); if ( cache != null ) { cache.put( session, DEPENDENCY_POOL, dependencies ); } } if ( descriptors == null ) { descriptors = Collections.synchronizedMap( new WeakHashMap( 256 ) ); if ( cache != null ) { cache.put( session, DESCRIPTORS, descriptors ); } } } public Artifact intern( Artifact artifact ) { return artifacts.intern( artifact ); } public Dependency intern( Dependency dependency ) { return dependencies.intern( dependency ); } public Object toKey( ArtifactDescriptorRequest request ) { return request.getArtifact(); } public ArtifactDescriptorResult getDescriptor( Object key, ArtifactDescriptorRequest request ) { Descriptor descriptor = descriptors.get( key ); if ( descriptor != null ) { return descriptor.toResult( request ); } return null; } public void putDescriptor( Object key, ArtifactDescriptorResult result ) { descriptors.put( key, new GoodDescriptor( result ) ); } public void putDescriptor( Object key, ArtifactDescriptorException e ) { descriptors.put( key, BadDescriptor.INSTANCE ); } public Object toKey( VersionRangeRequest request ) { return new ConstraintKey( request ); } public VersionRangeResult getConstraint( Object key, VersionRangeRequest request ) { Constraint constraint = constraints.get( key ); if ( constraint != null ) { return constraint.toResult( request ); } return null; } public void putConstraint( Object key, VersionRangeResult result ) { constraints.put( key, new Constraint( result ) ); } public Object toKey( Artifact artifact, List repositories ) { return new NodeKey( artifact, repositories ); } public Object toKey( Artifact artifact, List repositories, DependencySelector selector, DependencyManager manager, DependencyTraverser traverser ) { return new GraphKey( artifact, repositories, selector, manager, traverser ); } public GraphNode getNode( Object key ) { return nodes.get( key ); } public void putNode( Object key, GraphNode node ) { nodes.put( key, node ); } static abstract class Descriptor { public abstract ArtifactDescriptorResult toResult( ArtifactDescriptorRequest request ); } static class GoodDescriptor extends Descriptor { final Artifact artifact; final Map properties; final List relocations; final List repositories; final List dependencies; final List managedDependencies; public GoodDescriptor( ArtifactDescriptorResult result ) { artifact = result.getArtifact(); properties = result.getProperties(); relocations = result.getRelocations(); dependencies = result.getDependencies(); managedDependencies = result.getManagedDependencies(); repositories = clone( result.getRepositories() ); } public ArtifactDescriptorResult toResult( ArtifactDescriptorRequest request ) { ArtifactDescriptorResult result = new ArtifactDescriptorResult( request ); result.setArtifact( artifact ); result.setProperties( properties ); result.setRelocations( relocations ); result.setDependencies( dependencies ); result.setManagedDependencies( dependencies ); result.setRepositories( clone( repositories ) ); return result; } private static List clone( List repositories ) { List clones = new ArrayList( repositories.size() ); for ( RemoteRepository repository : repositories ) { RemoteRepository clone = new RemoteRepository( repository ); clone.setMirroredRepositories( new ArrayList( repository.getMirroredRepositories() ) ); clones.add( clone ); } return clones; } } static class BadDescriptor extends Descriptor { static final BadDescriptor INSTANCE = new BadDescriptor(); public ArtifactDescriptorResult toResult( ArtifactDescriptorRequest request ) { return NO_DESCRIPTOR; } } static class Constraint { final Map repositories; final VersionConstraint versionConstraint; public Constraint( VersionRangeResult result ) { versionConstraint = result.getVersionConstraint(); repositories = new LinkedHashMap(); for ( Version version : result.getVersions() ) { repositories.put( version, result.getRepository( version ) ); } } public VersionRangeResult toResult( VersionRangeRequest request ) { VersionRangeResult result = new VersionRangeResult( request ); for ( Map.Entry entry : repositories.entrySet() ) { result.addVersion( entry.getKey() ); result.setRepository( entry.getKey(), entry.getValue() ); } result.setVersionConstraint( versionConstraint ); return result; } } static class ConstraintKey { private final Artifact artifact; private final List repositories; private final int hashCode; public ConstraintKey( VersionRangeRequest request ) { artifact = request.getArtifact(); repositories = request.getRepositories(); hashCode = artifact.hashCode(); } @Override public boolean equals( Object obj ) { if ( obj == this ) { return true; } else if ( !( obj instanceof ConstraintKey ) ) { return false; } ConstraintKey that = (ConstraintKey) obj; return artifact.equals( that.artifact ) && equals( repositories, that.repositories ); } private static boolean equals( Collection repos1, Collection repos2 ) { if ( repos1.size() != repos2.size() ) { return false; } for ( Iterator it1 = repos1.iterator(), it2 = repos2.iterator(); it1.hasNext(); ) { RemoteRepository repo1 = it1.next(); RemoteRepository repo2 = it2.next(); if ( repo1.isRepositoryManager() != repo2.isRepositoryManager() ) { return false; } if ( repo1.isRepositoryManager() ) { if ( !equals( repo1.getMirroredRepositories(), repo2.getMirroredRepositories() ) ) { return false; } } else if ( !repo1.getUrl().equals( repo2.getUrl() ) ) { return false; } else if ( repo1.getPolicy( true ).isEnabled() != repo2.getPolicy( true ).isEnabled() ) { return false; } else if ( repo1.getPolicy( false ).isEnabled() != repo2.getPolicy( false ).isEnabled() ) { return false; } } return true; } @Override public int hashCode() { return hashCode; } } static class NodeKey { private final Artifact artifact; private final List repositories; private final int hashCode; public NodeKey( Artifact artifact, List repositories ) { this.artifact = artifact; this.repositories = repositories; int hash = 17; hash = hash * 31 + artifact.hashCode(); hash = hash * 31 + repositories.hashCode(); hashCode = hash; } @Override public boolean equals( Object obj ) { if ( obj == this ) { return true; } else if ( !( obj instanceof NodeKey ) ) { return false; } NodeKey that = (NodeKey) obj; return artifact.equals( that.artifact ) && repositories.equals( that.repositories ); } @Override public int hashCode() { return hashCode; } } static class GraphKey { private final Artifact artifact; private final List repositories; private final DependencySelector selector; private final DependencyManager manager; private final DependencyTraverser traverser; private final int hashCode; public GraphKey( Artifact artifact, List repositories, DependencySelector selector, DependencyManager manager, DependencyTraverser traverser ) { this.artifact = artifact; this.repositories = repositories; this.selector = selector; this.manager = manager; this.traverser = traverser; int hash = 17; hash = hash * 31 + artifact.hashCode(); hash = hash * 31 + repositories.hashCode(); hash = hash * 31 + selector.hashCode(); hash = hash * 31 + manager.hashCode(); hash = hash * 31 + traverser.hashCode(); hashCode = hash; } @Override public boolean equals( Object obj ) { if ( obj == this ) { return true; } else if ( !( obj instanceof GraphKey ) ) { return false; } GraphKey that = (GraphKey) obj; return artifact.equals( that.artifact ) && repositories.equals( that.repositories ) && selector.equals( that.selector ) && manager.equals( that.manager ) && traverser.equals( that.traverser ); } @Override public int hashCode() { return hashCode; } } } DefaultArtifactResolver.java000066400000000000000000000643321167050556700337620ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/internalpackage org.sonatype.aether.impl.internal; /******************************************************************************* * 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.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; import org.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.component.annotations.Requirement; import org.sonatype.aether.RepositoryEvent.EventType; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.RequestTrace; import org.sonatype.aether.SyncContext; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.impl.ArtifactResolver; import org.sonatype.aether.impl.RemoteRepositoryManager; import org.sonatype.aether.impl.RepositoryEventDispatcher; import org.sonatype.aether.impl.SyncContextFactory; import org.sonatype.aether.impl.UpdateCheck; import org.sonatype.aether.impl.UpdateCheckManager; import org.sonatype.aether.impl.VersionResolver; import org.sonatype.aether.repository.ArtifactRepository; import org.sonatype.aether.repository.LocalArtifactRegistration; import org.sonatype.aether.repository.LocalArtifactRequest; import org.sonatype.aether.repository.LocalArtifactResult; import org.sonatype.aether.repository.LocalRepository; import org.sonatype.aether.repository.LocalRepositoryManager; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.repository.RepositoryPolicy; import org.sonatype.aether.repository.WorkspaceReader; import org.sonatype.aether.resolution.ArtifactRequest; import org.sonatype.aether.resolution.ArtifactResolutionException; import org.sonatype.aether.resolution.ArtifactResult; import org.sonatype.aether.resolution.VersionRequest; import org.sonatype.aether.resolution.VersionResolutionException; import org.sonatype.aether.resolution.VersionResult; import org.sonatype.aether.spi.connector.ArtifactDownload; import org.sonatype.aether.spi.connector.RepositoryConnector; import org.sonatype.aether.spi.io.FileProcessor; import org.sonatype.aether.spi.locator.Service; import org.sonatype.aether.spi.locator.ServiceLocator; import org.sonatype.aether.spi.log.Logger; import org.sonatype.aether.spi.log.NullLogger; import org.sonatype.aether.transfer.ArtifactNotFoundException; import org.sonatype.aether.transfer.ArtifactTransferException; import org.sonatype.aether.transfer.NoRepositoryConnectorException; import org.sonatype.aether.util.ConfigUtils; import org.sonatype.aether.util.DefaultRequestTrace; import org.sonatype.aether.util.artifact.ArtifactProperties; import org.sonatype.aether.util.listener.DefaultRepositoryEvent; /** * @author Benjamin Bentmann */ @Component( role = ArtifactResolver.class ) public class DefaultArtifactResolver implements ArtifactResolver, Service { @Requirement private Logger logger = NullLogger.INSTANCE; @Requirement private FileProcessor fileProcessor; @Requirement private RepositoryEventDispatcher repositoryEventDispatcher; @Requirement private VersionResolver versionResolver; @Requirement private UpdateCheckManager updateCheckManager; @Requirement private RemoteRepositoryManager remoteRepositoryManager; @Requirement private SyncContextFactory syncContextFactory; public DefaultArtifactResolver() { // enables default constructor } public DefaultArtifactResolver( Logger logger, FileProcessor fileProcessor, RepositoryEventDispatcher repositoryEventDispatcher, VersionResolver versionResolver, UpdateCheckManager updateCheckManager, RemoteRepositoryManager remoteRepositoryManager, SyncContextFactory syncContextFactory ) { setLogger( logger ); setFileProcessor( fileProcessor ); setRepositoryEventDispatcher( repositoryEventDispatcher ); setVersionResolver( versionResolver ); setUpdateCheckManager( updateCheckManager ); setRemoteRepositoryManager( remoteRepositoryManager ); setSyncContextFactory( syncContextFactory ); } public void initService( ServiceLocator locator ) { setLogger( locator.getService( Logger.class ) ); setFileProcessor( locator.getService( FileProcessor.class ) ); setRepositoryEventDispatcher( locator.getService( RepositoryEventDispatcher.class ) ); setVersionResolver( locator.getService( VersionResolver.class ) ); setUpdateCheckManager( locator.getService( UpdateCheckManager.class ) ); setRemoteRepositoryManager( locator.getService( RemoteRepositoryManager.class ) ); setSyncContextFactory( locator.getService( SyncContextFactory.class ) ); } public DefaultArtifactResolver setLogger( Logger logger ) { this.logger = ( logger != null ) ? logger : NullLogger.INSTANCE; return this; } public DefaultArtifactResolver setFileProcessor( FileProcessor fileProcessor ) { if ( fileProcessor == null ) { throw new IllegalArgumentException( "file processor has not been specified" ); } this.fileProcessor = fileProcessor; return this; } public DefaultArtifactResolver setRepositoryEventDispatcher( RepositoryEventDispatcher repositoryEventDispatcher ) { if ( repositoryEventDispatcher == null ) { throw new IllegalArgumentException( "repository event dispatcher has not been specified" ); } this.repositoryEventDispatcher = repositoryEventDispatcher; return this; } public DefaultArtifactResolver setVersionResolver( VersionResolver versionResolver ) { if ( versionResolver == null ) { throw new IllegalArgumentException( "version resolver has not been specified" ); } this.versionResolver = versionResolver; return this; } public DefaultArtifactResolver setUpdateCheckManager( UpdateCheckManager updateCheckManager ) { if ( updateCheckManager == null ) { throw new IllegalArgumentException( "update check manager has not been specified" ); } this.updateCheckManager = updateCheckManager; return this; } public DefaultArtifactResolver setRemoteRepositoryManager( RemoteRepositoryManager remoteRepositoryManager ) { if ( remoteRepositoryManager == null ) { throw new IllegalArgumentException( "remote repository manager has not been specified" ); } this.remoteRepositoryManager = remoteRepositoryManager; return this; } public DefaultArtifactResolver setSyncContextFactory( SyncContextFactory syncContextFactory ) { if ( syncContextFactory == null ) { throw new IllegalArgumentException( "sync context factory has not been specified" ); } this.syncContextFactory = syncContextFactory; return this; } public ArtifactResult resolveArtifact( RepositorySystemSession session, ArtifactRequest request ) throws ArtifactResolutionException { return resolveArtifacts( session, Collections.singleton( request ) ).get( 0 ); } public List resolveArtifacts( RepositorySystemSession session, Collection requests ) throws ArtifactResolutionException { SyncContext syncContext = syncContextFactory.newInstance( session, false ); try { Collection artifacts = new ArrayList( requests.size() ); for ( ArtifactRequest request : requests ) { if ( request.getArtifact().getProperty( ArtifactProperties.LOCAL_PATH, null ) != null ) { continue; } artifacts.add( request.getArtifact() ); } syncContext.acquire( artifacts, null ); return resolve( session, requests ); } finally { syncContext.release(); } } private List resolve( RepositorySystemSession session, Collection requests ) throws ArtifactResolutionException { List results = new ArrayList( requests.size() ); boolean failures = false; LocalRepositoryManager lrm = session.getLocalRepositoryManager(); WorkspaceReader workspace = session.getWorkspaceReader(); List groups = new ArrayList(); for ( ArtifactRequest request : requests ) { RequestTrace trace = DefaultRequestTrace.newChild( request.getTrace(), request ); ArtifactResult result = new ArtifactResult( request ); results.add( result ); Artifact artifact = request.getArtifact(); List repos = request.getRepositories(); artifactResolving( session, trace, artifact ); String localPath = artifact.getProperty( ArtifactProperties.LOCAL_PATH, null ); if ( localPath != null ) { // unhosted artifact, just validate file File file = new File( localPath ); if ( !file.isFile() ) { failures = true; result.addException( new ArtifactNotFoundException( artifact, null ) ); } else { artifact = artifact.setFile( file ); result.setArtifact( artifact ); artifactResolved( session, trace, artifact, null, result.getExceptions() ); } continue; } VersionResult versionResult; try { VersionRequest versionRequest = new VersionRequest( artifact, repos, request.getRequestContext() ); versionRequest.setTrace( trace ); versionResult = versionResolver.resolveVersion( session, versionRequest ); } catch ( VersionResolutionException e ) { result.addException( e ); continue; } artifact = artifact.setVersion( versionResult.getVersion() ); if ( versionResult.getRepository() != null ) { if ( versionResult.getRepository() instanceof RemoteRepository ) { repos = Collections.singletonList( (RemoteRepository) versionResult.getRepository() ); } else { repos = Collections.emptyList(); } } if ( workspace != null ) { File file = workspace.findArtifact( artifact ); if ( file != null ) { artifact = artifact.setFile( file ); result.setArtifact( artifact ); result.setRepository( workspace.getRepository() ); artifactResolved( session, trace, artifact, result.getRepository(), null ); continue; } } LocalArtifactResult local = lrm.find( session, new LocalArtifactRequest( artifact, repos, request.getRequestContext() ) ); if ( isLocallyInstalled( local, versionResult ) ) { if ( local.getRepository() != null ) { result.setRepository( local.getRepository() ); } else { result.setRepository( lrm.getRepository() ); } try { artifact = artifact.setFile( getFile( session, artifact, local.getFile() ) ); result.setArtifact( artifact ); artifactResolved( session, trace, artifact, result.getRepository(), null ); } catch ( ArtifactTransferException e ) { result.addException( e ); } if ( !local.isAvailable() ) { /* * NOTE: Interop with simple local repository: An artifact installed by a simple local repo manager * will not show up in the repository tracking file of the enhanced local repository. If however the * maven-metadata-local.xml tells us the artifact was installed locally, we sync the repository * tracking file. */ lrm.add( session, new LocalArtifactRegistration( artifact ) ); } continue; } else if ( local.getFile() != null ) { logger.debug( "Verifying availability of " + local.getFile() + " from " + repos ); } if ( session.isOffline() ) { Exception exception = new ArtifactNotFoundException( artifact, null, "The repository system is offline but the artifact " + artifact + " is not available in the local repository." ); result.addException( exception ); artifactResolved( session, trace, artifact, null, result.getExceptions() ); continue; } AtomicBoolean resolved = new AtomicBoolean( false ); Iterator groupIt = groups.iterator(); for ( RemoteRepository repo : repos ) { if ( !repo.getPolicy( artifact.isSnapshot() ).isEnabled() ) { continue; } ResolutionGroup group = null; while ( groupIt.hasNext() ) { ResolutionGroup t = groupIt.next(); if ( t.matches( repo ) ) { group = t; break; } } if ( group == null ) { group = new ResolutionGroup( repo ); groups.add( group ); groupIt = Collections. emptyList().iterator(); } group.items.add( new ResolutionItem( trace, artifact, resolved, result, local, repo ) ); } } for ( ResolutionGroup group : groups ) { List downloads = new ArrayList(); for ( ResolutionItem item : group.items ) { Artifact artifact = item.artifact; if ( item.resolved.get() ) { // resolved in previous resolution group continue; } ArtifactDownload download = new ArtifactDownload(); download.setArtifact( artifact ); download.setRequestContext( item.request.getRequestContext() ); download.setTrace( item.trace ); if ( item.local.getFile() != null ) { download.setFile( item.local.getFile() ); download.setExistenceCheck( true ); } else { String path = lrm.getPathForRemoteArtifact( artifact, group.repository, item.request.getRequestContext() ); download.setFile( new File( lrm.getRepository().getBasedir(), path ) ); } boolean snapshot = artifact.isSnapshot(); RepositoryPolicy policy = remoteRepositoryManager.getPolicy( session, group.repository, !snapshot, snapshot ); if ( session.isNotFoundCachingEnabled() || session.isTransferErrorCachingEnabled() ) { UpdateCheck check = new UpdateCheck(); check.setItem( artifact ); check.setFile( download.getFile() ); check.setFileValid( !download.isExistenceCheck() ); check.setRepository( group.repository ); check.setPolicy( policy.getUpdatePolicy() ); item.updateCheck = check; updateCheckManager.checkArtifact( session, check ); if ( !check.isRequired() ) { item.result.addException( check.getException() ); continue; } } download.setChecksumPolicy( policy.getChecksumPolicy() ); download.setRepositories( item.repository.getMirroredRepositories() ); downloads.add( download ); item.download = download; } if ( downloads.isEmpty() ) { continue; } for ( ArtifactDownload download : downloads ) { artifactDownloading( session, download.getTrace(), download.getArtifact(), group.repository ); } try { RepositoryConnector connector = remoteRepositoryManager.getRepositoryConnector( session, group.repository ); try { connector.get( downloads, null ); } finally { connector.close(); } } catch ( NoRepositoryConnectorException e ) { for ( ArtifactDownload download : downloads ) { download.setException( new ArtifactTransferException( download.getArtifact(), group.repository, e ) ); } } for ( ResolutionItem item : group.items ) { ArtifactDownload download = item.download; if ( download == null ) { continue; } if ( item.updateCheck != null ) { item.updateCheck.setException( download.getException() ); updateCheckManager.touchArtifact( session, item.updateCheck ); } if ( download.getException() == null ) { item.resolved.set( true ); item.result.setRepository( group.repository ); Artifact artifact = download.getArtifact(); try { artifact = artifact.setFile( getFile( session, artifact, download.getFile() ) ); item.result.setArtifact( artifact ); } catch ( ArtifactTransferException e ) { item.result.addException( e ); continue; } lrm.add( session, new LocalArtifactRegistration( artifact, group.repository, download.getSupportedContexts() ) ); artifactDownloaded( session, download.getTrace(), artifact, group.repository, null ); artifactResolved( session, download.getTrace(), artifact, group.repository, null ); } else { item.result.addException( download.getException() ); artifactDownloaded( session, download.getTrace(), download.getArtifact(), group.repository, download.getException() ); } } } for ( ArtifactResult result : results ) { ArtifactRequest request = result.getRequest(); Artifact artifact = result.getArtifact(); if ( artifact == null || artifact.getFile() == null ) { failures = true; if ( result.getExceptions().isEmpty() ) { Exception exception = new ArtifactNotFoundException( request.getArtifact(), null ); result.addException( exception ); } RequestTrace trace = DefaultRequestTrace.newChild( request.getTrace(), request ); artifactResolved( session, trace, request.getArtifact(), null, result.getExceptions() ); } } if ( failures ) { throw new ArtifactResolutionException( results ); } return results; } private boolean isLocallyInstalled( LocalArtifactResult lar, VersionResult vr ) { if ( lar.isAvailable() ) { return true; } if ( lar.getFile() != null ) { if ( vr.getRepository() instanceof LocalRepository ) { // resolution of (snapshot) version found locally installed artifact return true; } else if ( vr.getRepository() == null && lar.getRequest().getRepositories().isEmpty() ) { // resolution of version range found locally installed artifact return true; } } return false; } private File getFile( RepositorySystemSession session, Artifact artifact, File file ) throws ArtifactTransferException { if ( artifact.isSnapshot() && !artifact.getVersion().equals( artifact.getBaseVersion() ) && ConfigUtils.getBoolean( session, true, "aether.artifactResolver.snapshotNormalization" ) ) { String name = file.getName().replace( artifact.getVersion(), artifact.getBaseVersion() ); File dst = new File( file.getParent(), name ); boolean copy = dst.length() != file.length() || dst.lastModified() != file.lastModified(); if ( copy ) { try { fileProcessor.copy( file, dst, null ); dst.setLastModified( file.lastModified() ); } catch ( IOException e ) { throw new ArtifactTransferException( artifact, null, e ); } } file = dst; } return file; } private void artifactResolving( RepositorySystemSession session, RequestTrace trace, Artifact artifact ) { DefaultRepositoryEvent event = new DefaultRepositoryEvent( EventType.ARTIFACT_RESOLVING, session, trace ); event.setArtifact( artifact ); repositoryEventDispatcher.dispatch( event ); } private void artifactResolved( RepositorySystemSession session, RequestTrace trace, Artifact artifact, ArtifactRepository repository, List exceptions ) { DefaultRepositoryEvent event = new DefaultRepositoryEvent( EventType.ARTIFACT_RESOLVED, session, trace ); event.setArtifact( artifact ); event.setRepository( repository ); event.setExceptions( exceptions ); if ( artifact != null ) { event.setFile( artifact.getFile() ); } repositoryEventDispatcher.dispatch( event ); } private void artifactDownloading( RepositorySystemSession session, RequestTrace trace, Artifact artifact, RemoteRepository repository ) { DefaultRepositoryEvent event = new DefaultRepositoryEvent( EventType.ARTIFACT_DOWNLOADING, session, trace ); event.setArtifact( artifact ); event.setRepository( repository ); repositoryEventDispatcher.dispatch( event ); } private void artifactDownloaded( RepositorySystemSession session, RequestTrace trace, Artifact artifact, RemoteRepository repository, Exception exception ) { DefaultRepositoryEvent event = new DefaultRepositoryEvent( EventType.ARTIFACT_DOWNLOADED, session, trace ); event.setArtifact( artifact ); event.setRepository( repository ); event.setException( exception ); if ( artifact != null ) { event.setFile( artifact.getFile() ); } repositoryEventDispatcher.dispatch( event ); } static class ResolutionGroup { final RemoteRepository repository; final List items = new ArrayList(); ResolutionGroup( RemoteRepository repository ) { this.repository = repository; } boolean matches( RemoteRepository repo ) { return repository.getUrl().equals( repo.getUrl() ) && repository.getContentType().equals( repo.getContentType() ) && repository.isRepositoryManager() == repo.isRepositoryManager(); } } static class ResolutionItem { final RequestTrace trace; final ArtifactRequest request; final ArtifactResult result; final LocalArtifactResult local; final RemoteRepository repository; final Artifact artifact; final AtomicBoolean resolved; ArtifactDownload download; UpdateCheck updateCheck; ResolutionItem( RequestTrace trace, Artifact artifact, AtomicBoolean resolved, ArtifactResult result, LocalArtifactResult local, RemoteRepository repository ) { this.trace = trace; this.artifact = artifact; this.resolved = resolved; this.result = result; this.request = result.getRequest(); this.local = local; this.repository = repository; } } } DefaultDependencyCollectionContext.java000066400000000000000000000035161167050556700361370ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/internalpackage org.sonatype.aether.impl.internal; /******************************************************************************* * 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.collection.DependencyCollectionContext; import org.sonatype.aether.graph.Dependency; /** * @author Benjamin Bentmann * @see DefaultDependencyCollector */ class DefaultDependencyCollectionContext implements DependencyCollectionContext { private RepositorySystemSession session; private Dependency dependency; private List managedDependencies; public DefaultDependencyCollectionContext( RepositorySystemSession session, Dependency dependency, List managedDependencies ) { this.session = session; this.dependency = dependency; this.managedDependencies = managedDependencies; } public RepositorySystemSession getSession() { return session; } public Dependency getDependency() { return dependency; } public List getManagedDependencies() { return managedDependencies; } public void set( Dependency dependency, List managedDependencies ) { this.dependency = dependency; this.managedDependencies = managedDependencies; } @Override public String toString() { return String.valueOf( getDependency() ); } } DefaultDependencyCollector.java000066400000000000000000000604171167050556700344300ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/internalpackage org.sonatype.aether.impl.internal; /******************************************************************************* * 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 java.util.Collections; import java.util.HashSet; import java.util.List; import org.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.component.annotations.Requirement; import org.sonatype.aether.RepositoryException; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.RequestTrace; 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.collection.DependencyGraphTransformer; import org.sonatype.aether.collection.DependencyManagement; import org.sonatype.aether.collection.DependencyManager; import org.sonatype.aether.collection.DependencySelector; import org.sonatype.aether.collection.DependencyTraverser; import org.sonatype.aether.graph.Dependency; import org.sonatype.aether.impl.ArtifactDescriptorReader; import org.sonatype.aether.impl.DependencyCollector; import org.sonatype.aether.impl.RemoteRepositoryManager; import org.sonatype.aether.impl.VersionRangeResolver; import org.sonatype.aether.repository.ArtifactRepository; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.resolution.ArtifactDescriptorException; import org.sonatype.aether.resolution.ArtifactDescriptorRequest; import org.sonatype.aether.resolution.ArtifactDescriptorResult; import org.sonatype.aether.resolution.VersionRangeRequest; import org.sonatype.aether.resolution.VersionRangeResolutionException; import org.sonatype.aether.resolution.VersionRangeResult; import org.sonatype.aether.spi.locator.Service; import org.sonatype.aether.spi.locator.ServiceLocator; import org.sonatype.aether.spi.log.Logger; import org.sonatype.aether.spi.log.NullLogger; import org.sonatype.aether.util.DefaultRepositorySystemSession; import org.sonatype.aether.util.DefaultRequestTrace; import org.sonatype.aether.util.artifact.ArtifactProperties; import org.sonatype.aether.version.Version; /** * @author Benjamin Bentmann */ @Component( role = DependencyCollector.class ) public class DefaultDependencyCollector implements DependencyCollector, Service { @SuppressWarnings( "unused" ) @Requirement private Logger logger = NullLogger.INSTANCE; @Requirement private RemoteRepositoryManager remoteRepositoryManager; @Requirement private ArtifactDescriptorReader descriptorReader; @Requirement private VersionRangeResolver versionRangeResolver; public DefaultDependencyCollector() { // enables default constructor } public DefaultDependencyCollector( Logger logger, RemoteRepositoryManager remoteRepositoryManager, ArtifactDescriptorReader artifactDescriptorReader, VersionRangeResolver versionRangeResolver ) { setLogger( logger ); setRemoteRepositoryManager( remoteRepositoryManager ); setArtifactDescriptorReader( artifactDescriptorReader ); setVersionRangeResolver( versionRangeResolver ); } public void initService( ServiceLocator locator ) { setLogger( locator.getService( Logger.class ) ); setRemoteRepositoryManager( locator.getService( RemoteRepositoryManager.class ) ); setArtifactDescriptorReader( locator.getService( ArtifactDescriptorReader.class ) ); setVersionRangeResolver( locator.getService( VersionRangeResolver.class ) ); } public DefaultDependencyCollector setLogger( Logger logger ) { this.logger = ( logger != null ) ? logger : NullLogger.INSTANCE; return this; } public DefaultDependencyCollector setRemoteRepositoryManager( RemoteRepositoryManager remoteRepositoryManager ) { if ( remoteRepositoryManager == null ) { throw new IllegalArgumentException( "remote repository manager has not been specified" ); } this.remoteRepositoryManager = remoteRepositoryManager; return this; } public DefaultDependencyCollector setArtifactDescriptorReader( ArtifactDescriptorReader artifactDescriptorReader ) { if ( artifactDescriptorReader == null ) { throw new IllegalArgumentException( "artifact descriptor reader has not been specified" ); } this.descriptorReader = artifactDescriptorReader; return this; } public DefaultDependencyCollector setVersionRangeResolver( VersionRangeResolver versionRangeResolver ) { if ( versionRangeResolver == null ) { throw new IllegalArgumentException( "version range resolver has not been specified" ); } this.versionRangeResolver = versionRangeResolver; return this; } public CollectResult collectDependencies( RepositorySystemSession session, CollectRequest request ) throws DependencyCollectionException { session = optimizeSession( session ); RequestTrace trace = DefaultRequestTrace.newChild( request.getTrace(), request ); CollectResult result = new CollectResult( request ); DependencySelector depSelector = session.getDependencySelector(); DependencyManager depManager = session.getDependencyManager(); DependencyTraverser depTraverser = session.getDependencyTraverser(); Dependency root = request.getRoot(); List repositories = request.getRepositories(); List dependencies = request.getDependencies(); List managedDependencies = request.getManagedDependencies(); GraphEdge edge = null; if ( root != null ) { VersionRangeResult rangeResult; try { VersionRangeRequest rangeRequest = new VersionRangeRequest( root.getArtifact(), request.getRepositories(), request.getRequestContext() ); rangeRequest.setTrace( trace ); rangeResult = versionRangeResolver.resolveVersionRange( session, rangeRequest ); if ( rangeResult.getVersions().isEmpty() ) { throw new VersionRangeResolutionException( rangeResult, "No versions available for " + root.getArtifact() + " within specified range" ); } } catch ( VersionRangeResolutionException e ) { result.addException( e ); throw new DependencyCollectionException( result ); } Version version = rangeResult.getVersions().get( rangeResult.getVersions().size() - 1 ); root = root.setArtifact( root.getArtifact().setVersion( version.toString() ) ); ArtifactDescriptorResult descriptorResult; try { ArtifactDescriptorRequest descriptorRequest = new ArtifactDescriptorRequest(); descriptorRequest.setArtifact( root.getArtifact() ); descriptorRequest.setRepositories( request.getRepositories() ); descriptorRequest.setRequestContext( request.getRequestContext() ); descriptorRequest.setTrace( trace ); if ( isLackingDescriptor( root.getArtifact() ) ) { descriptorResult = new ArtifactDescriptorResult( descriptorRequest ); } else { descriptorResult = descriptorReader.readArtifactDescriptor( session, descriptorRequest ); } } catch ( ArtifactDescriptorException e ) { result.addException( e ); throw new DependencyCollectionException( result ); } root = root.setArtifact( descriptorResult.getArtifact() ); repositories = remoteRepositoryManager.aggregateRepositories( session, repositories, descriptorResult.getRepositories(), true ); dependencies = mergeDeps( dependencies, descriptorResult.getDependencies() ); managedDependencies = mergeDeps( managedDependencies, descriptorResult.getManagedDependencies() ); GraphNode node = new GraphNode(); node.setAliases( descriptorResult.getAliases() ); node.setRepositories( request.getRepositories() ); edge = new GraphEdge( node ); edge.setDependency( root ); edge.setRequestContext( request.getRequestContext() ); edge.setRelocations( descriptorResult.getRelocations() ); edge.setVersionConstraint( rangeResult.getVersionConstraint() ); edge.setVersion( version ); } else { edge = new GraphEdge( new GraphNode() ); } result.setRoot( edge ); boolean traverse = ( root == null ) || depTraverser.traverseDependency( root ); if ( traverse && !dependencies.isEmpty() ) { DataPool pool = new DataPool( session ); EdgeStack edges = new EdgeStack(); edges.push( edge ); DefaultDependencyCollectionContext context = new DefaultDependencyCollectionContext( session, root, managedDependencies ); Args args = new Args( result, session, trace, pool, edges, context ); process( args, dependencies, repositories, depSelector.deriveChildSelector( context ), depManager.deriveChildManager( context ), depTraverser.deriveChildTraverser( context ) ); } DependencyGraphTransformer transformer = session.getDependencyGraphTransformer(); try { DefaultDependencyGraphTransformationContext context = new DefaultDependencyGraphTransformationContext( session ); result.setRoot( transformer.transformGraph( edge, context ) ); } catch ( RepositoryException e ) { result.addException( e ); } if ( !result.getExceptions().isEmpty() ) { throw new DependencyCollectionException( result ); } return result; } private RepositorySystemSession optimizeSession( RepositorySystemSession session ) { DefaultRepositorySystemSession optimized = new DefaultRepositorySystemSession( session ); optimized.setArtifactTypeRegistry( CachingArtifactTypeRegistry.newInstance( session ) ); return optimized; } private List mergeDeps( List dominant, List recessive ) { List result; if ( dominant == null || dominant.isEmpty() ) { result = recessive; } else if ( recessive == null || recessive.isEmpty() ) { result = dominant; } else { result = new ArrayList( dominant.size() + recessive.size() ); Collection ids = new HashSet(); for ( Dependency dependency : dominant ) { ids.add( getId( dependency.getArtifact() ) ); result.add( dependency ); } for ( Dependency dependency : recessive ) { if ( !ids.contains( getId( dependency.getArtifact() ) ) ) { result.add( dependency ); } } } return result; } private String getId( Artifact a ) { return a.getGroupId() + ':' + a.getArtifactId() + ':' + a.getClassifier() + ':' + a.getExtension(); } private void process( final Args args, List dependencies, List repositories, DependencySelector depSelector, DependencyManager depManager, DependencyTraverser depTraverser ) throws DependencyCollectionException { nextDependency: for ( Dependency dependency : dependencies ) { boolean disableVersionManagement = false; List relocations = Collections.emptyList(); thisDependency: while ( true ) { if ( !depSelector.selectDependency( dependency ) ) { continue nextDependency; } DependencyManagement depMngt = depManager.manageDependency( dependency ); String premanagedVersion = null; String premanagedScope = null; if ( depMngt != null ) { if ( depMngt.getVersion() != null && !disableVersionManagement ) { Artifact artifact = dependency.getArtifact(); premanagedVersion = artifact.getVersion(); dependency = dependency.setArtifact( artifact.setVersion( depMngt.getVersion() ) ); } if ( depMngt.getProperties() != null ) { Artifact artifact = dependency.getArtifact(); dependency = dependency.setArtifact( artifact.setProperties( depMngt.getProperties() ) ); } if ( depMngt.getScope() != null ) { premanagedScope = dependency.getScope(); dependency = dependency.setScope( depMngt.getScope() ); } if ( depMngt.getExclusions() != null ) { dependency = dependency.setExclusions( depMngt.getExclusions() ); } } disableVersionManagement = false; boolean noDescriptor = isLackingDescriptor( dependency.getArtifact() ); boolean traverse = !noDescriptor && depTraverser.traverseDependency( dependency ); VersionRangeResult rangeResult; try { VersionRangeRequest rangeRequest = new VersionRangeRequest(); rangeRequest.setArtifact( dependency.getArtifact() ); rangeRequest.setRepositories( repositories ); rangeRequest.setRequestContext( args.result.getRequest().getRequestContext() ); rangeRequest.setTrace( args.trace ); Object key = args.pool.toKey( rangeRequest ); rangeResult = args.pool.getConstraint( key, rangeRequest ); if ( rangeResult == null ) { rangeResult = versionRangeResolver.resolveVersionRange( args.session, rangeRequest ); args.pool.putConstraint( key, rangeResult ); } if ( rangeResult.getVersions().isEmpty() ) { throw new VersionRangeResolutionException( rangeResult, "No versions available for " + dependency.getArtifact() + " within specified range" ); } } catch ( VersionRangeResolutionException e ) { addException( args.result, e ); continue nextDependency; } List versions = rangeResult.getVersions(); for ( Version version : versions ) { Artifact originalArtifact = dependency.getArtifact().setVersion( version.toString() ); Dependency d = dependency.setArtifact( originalArtifact ); ArtifactDescriptorResult descriptorResult; { ArtifactDescriptorRequest descriptorRequest = new ArtifactDescriptorRequest(); descriptorRequest.setArtifact( d.getArtifact() ); descriptorRequest.setRepositories( repositories ); descriptorRequest.setRequestContext( args.result.getRequest().getRequestContext() ); descriptorRequest.setTrace( args.trace ); if ( noDescriptor ) { descriptorResult = new ArtifactDescriptorResult( descriptorRequest ); } else { Object key = args.pool.toKey( descriptorRequest ); descriptorResult = args.pool.getDescriptor( key, descriptorRequest ); if ( descriptorResult == null ) { try { descriptorResult = descriptorReader.readArtifactDescriptor( args.session, descriptorRequest ); args.pool.putDescriptor( key, descriptorResult ); } catch ( ArtifactDescriptorException e ) { addException( args.result, e ); args.pool.putDescriptor( key, e ); continue; } } else if ( descriptorResult == DataPool.NO_DESCRIPTOR ) { continue; } } } d = d.setArtifact( descriptorResult.getArtifact() ); GraphNode node = args.edges.top().getTarget(); GraphEdge cycleEdge = args.edges.find( d.getArtifact() ); if ( cycleEdge != null ) { GraphEdge edge = new GraphEdge( cycleEdge.getTarget() ); edge.setDependency( d ); edge.setScope( d.getScope() ); edge.setPremanagedScope( premanagedScope ); edge.setPremanagedVersion( premanagedVersion ); edge.setRelocations( relocations ); edge.setVersionConstraint( rangeResult.getVersionConstraint() ); edge.setVersion( version ); edge.setRequestContext( args.result.getRequest().getRequestContext() ); node.getOutgoingEdges().add( edge ); continue; } if ( !descriptorResult.getRelocations().isEmpty() ) { relocations = descriptorResult.getRelocations(); disableVersionManagement = originalArtifact.getGroupId().equals( d.getArtifact().getGroupId() ) && originalArtifact.getArtifactId().equals( d.getArtifact().getArtifactId() ); dependency = d; continue thisDependency; } d = args.pool.intern( d.setArtifact( args.pool.intern( d.getArtifact() ) ) ); DependencySelector childSelector = null; DependencyManager childManager = null; DependencyTraverser childTraverser = null; List childRepos = null; Object key = null; boolean recurse = traverse && !descriptorResult.getDependencies().isEmpty(); if ( recurse ) { DefaultDependencyCollectionContext context = args.collectionContext; context.set( d, descriptorResult.getManagedDependencies() ); childSelector = depSelector.deriveChildSelector( context ); childManager = depManager.deriveChildManager( context ); childTraverser = depTraverser.deriveChildTraverser( context ); childRepos = remoteRepositoryManager.aggregateRepositories( args.session, repositories, descriptorResult.getRepositories(), true ); key = args.pool.toKey( d.getArtifact(), childRepos, childSelector, childManager, childTraverser ); } else { key = args.pool.toKey( d.getArtifact(), repositories ); } List repos; ArtifactRepository repo = rangeResult.getRepository( version ); if ( repo instanceof RemoteRepository ) { repos = Collections.singletonList( (RemoteRepository) repo ); } else if ( repo == null ) { repos = repositories; } else { repos = Collections.emptyList(); } GraphNode child = args.pool.getNode( key ); if ( child == null ) { child = new GraphNode(); child.setAliases( descriptorResult.getAliases() ); child.setRepositories( repos ); args.pool.putNode( key, child ); } else { recurse = false; if ( repos.size() < child.getRepositories().size() ) { child.setRepositories( repos ); } } GraphEdge edge = new GraphEdge( child ); edge.setDependency( d ); edge.setScope( d.getScope() ); edge.setPremanagedScope( premanagedScope ); edge.setPremanagedVersion( premanagedVersion ); edge.setRelocations( relocations ); edge.setVersionConstraint( rangeResult.getVersionConstraint() ); edge.setVersion( version ); edge.setRequestContext( args.result.getRequest().getRequestContext() ); node.getOutgoingEdges().add( edge ); if ( recurse ) { args.edges.push( edge ); process( args, descriptorResult.getDependencies(), childRepos, childSelector, childManager, childTraverser ); args.edges.pop(); } } break; } } } private boolean isLackingDescriptor( Artifact artifact ) { return artifact.getProperty( ArtifactProperties.LOCAL_PATH, null ) != null; } private void addException( CollectResult result, Exception e ) { if ( result.getExceptions().size() < 100 ) { result.addException( e ); } } static class Args { final CollectResult result; final RepositorySystemSession session; final RequestTrace trace; final DataPool pool; final EdgeStack edges; final DefaultDependencyCollectionContext collectionContext; public Args( CollectResult result, RepositorySystemSession session, RequestTrace trace, DataPool pool, EdgeStack edges, DefaultDependencyCollectionContext collectionContext ) { this.result = result; this.session = session; this.trace = trace; this.pool = pool; this.edges = edges; this.collectionContext = collectionContext; } } } DefaultDependencyGraphTransformationContext.java000066400000000000000000000026651167050556700400400ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/internalpackage org.sonatype.aether.impl.internal; /******************************************************************************* * 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.HashMap; import java.util.Map; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.collection.DependencyGraphTransformationContext; /** * @author Benjamin Bentmann */ class DefaultDependencyGraphTransformationContext implements DependencyGraphTransformationContext { private final RepositorySystemSession session; private final Map map; public DefaultDependencyGraphTransformationContext( RepositorySystemSession session ) { this.session = session; this.map = new HashMap(); } public RepositorySystemSession getSession() { return session; } public Object get( Object key ) { return map.get( key ); } public Object put( Object key, Object value ) { return map.put( key, value ); } @Override public String toString() { return String.valueOf( map ); } } aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/internal/DefaultDeployer.java000066400000000000000000000520171167050556700323420ustar00rootroot00000000000000package org.sonatype.aether.impl.internal; /******************************************************************************* * 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.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.IdentityHashMap; import java.util.List; import org.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.component.annotations.Requirement; import org.sonatype.aether.RepositoryEvent.EventType; import org.sonatype.aether.RepositoryException; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.RequestTrace; import org.sonatype.aether.SyncContext; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.deployment.DeployRequest; import org.sonatype.aether.deployment.DeployResult; import org.sonatype.aether.deployment.DeploymentException; import org.sonatype.aether.impl.Deployer; import org.sonatype.aether.impl.MetadataGenerator; import org.sonatype.aether.impl.MetadataGeneratorFactory; import org.sonatype.aether.impl.RemoteRepositoryManager; import org.sonatype.aether.impl.RepositoryEventDispatcher; import org.sonatype.aether.impl.SyncContextFactory; import org.sonatype.aether.impl.UpdateCheck; import org.sonatype.aether.impl.UpdateCheckManager; import org.sonatype.aether.metadata.MergeableMetadata; import org.sonatype.aether.metadata.Metadata; import org.sonatype.aether.repository.LocalRepositoryManager; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.repository.RepositoryPolicy; import org.sonatype.aether.spi.connector.ArtifactUpload; import org.sonatype.aether.spi.connector.MetadataDownload; import org.sonatype.aether.spi.connector.MetadataUpload; import org.sonatype.aether.spi.connector.RepositoryConnector; import org.sonatype.aether.spi.connector.Transfer; import org.sonatype.aether.spi.io.FileProcessor; import org.sonatype.aether.spi.locator.Service; import org.sonatype.aether.spi.locator.ServiceLocator; import org.sonatype.aether.spi.log.Logger; import org.sonatype.aether.spi.log.NullLogger; import org.sonatype.aether.transfer.ArtifactTransferException; import org.sonatype.aether.transfer.MetadataNotFoundException; import org.sonatype.aether.transfer.MetadataTransferException; import org.sonatype.aether.transfer.NoRepositoryConnectorException; import org.sonatype.aether.util.DefaultRequestTrace; import org.sonatype.aether.util.listener.DefaultRepositoryEvent; /** * @author Benjamin Bentmann */ @Component( role = Deployer.class ) public class DefaultDeployer implements Deployer, Service { @SuppressWarnings( "unused" ) @Requirement private Logger logger = NullLogger.INSTANCE; @Requirement private FileProcessor fileProcessor; @Requirement private RepositoryEventDispatcher repositoryEventDispatcher; @Requirement private RemoteRepositoryManager remoteRepositoryManager; @Requirement private UpdateCheckManager updateCheckManager; @Requirement( role = MetadataGeneratorFactory.class ) private List metadataFactories = new ArrayList(); @Requirement private SyncContextFactory syncContextFactory; public DefaultDeployer() { // enables default constructor } public DefaultDeployer( Logger logger, FileProcessor fileProcessor, RepositoryEventDispatcher repositoryEventDispatcher, RemoteRepositoryManager remoteRepositoryManager, UpdateCheckManager updateCheckManager, List metadataFactories, SyncContextFactory syncContextFactory ) { setLogger( logger ); setFileProcessor( fileProcessor ); setRepositoryEventDispatcher( repositoryEventDispatcher ); setRemoteRepositoryManager( remoteRepositoryManager ); setUpdateCheckManager( updateCheckManager ); setMetadataFactories( metadataFactories ); setSyncContextFactory( syncContextFactory ); } public void initService( ServiceLocator locator ) { setLogger( locator.getService( Logger.class ) ); setFileProcessor( locator.getService( FileProcessor.class ) ); setRepositoryEventDispatcher( locator.getService( RepositoryEventDispatcher.class ) ); setRemoteRepositoryManager( locator.getService( RemoteRepositoryManager.class ) ); setUpdateCheckManager( locator.getService( UpdateCheckManager.class ) ); setMetadataFactories( locator.getServices( MetadataGeneratorFactory.class ) ); setSyncContextFactory( locator.getService( SyncContextFactory.class ) ); } public DefaultDeployer setLogger( Logger logger ) { this.logger = ( logger != null ) ? logger : NullLogger.INSTANCE; return this; } public DefaultDeployer setFileProcessor( FileProcessor fileProcessor ) { if ( fileProcessor == null ) { throw new IllegalArgumentException( "file processor has not been specified" ); } this.fileProcessor = fileProcessor; return this; } public DefaultDeployer setRepositoryEventDispatcher( RepositoryEventDispatcher repositoryEventDispatcher ) { if ( repositoryEventDispatcher == null ) { throw new IllegalArgumentException( "repository event dispatcher has not been specified" ); } this.repositoryEventDispatcher = repositoryEventDispatcher; return this; } public DefaultDeployer setRemoteRepositoryManager( RemoteRepositoryManager remoteRepositoryManager ) { if ( remoteRepositoryManager == null ) { throw new IllegalArgumentException( "remote repository manager has not been specified" ); } this.remoteRepositoryManager = remoteRepositoryManager; return this; } public DefaultDeployer setUpdateCheckManager( UpdateCheckManager updateCheckManager ) { if ( updateCheckManager == null ) { throw new IllegalArgumentException( "update check manager has not been specified" ); } this.updateCheckManager = updateCheckManager; return this; } public DefaultDeployer addMetadataGeneratorFactory( MetadataGeneratorFactory factory ) { if ( factory == null ) { throw new IllegalArgumentException( "metadata generator factory has not been specified" ); } metadataFactories.add( factory ); return this; } public DefaultDeployer setMetadataFactories( List metadataFactories ) { if ( metadataFactories == null ) { this.metadataFactories = new ArrayList(); } else { this.metadataFactories = metadataFactories; } return this; } public DefaultDeployer setSyncContextFactory( SyncContextFactory syncContextFactory ) { if ( syncContextFactory == null ) { throw new IllegalArgumentException( "sync context factory has not been specified" ); } this.syncContextFactory = syncContextFactory; return this; } public DeployResult deploy( RepositorySystemSession session, DeployRequest request ) throws DeploymentException { if ( session.isOffline() ) { throw new DeploymentException( "The repository system is in offline mode, deployment impossible" ); } SyncContext syncContext = syncContextFactory.newInstance( session, false ); try { return deploy( syncContext, session, request ); } finally { syncContext.release(); } } private DeployResult deploy( SyncContext syncContext, RepositorySystemSession session, DeployRequest request ) throws DeploymentException { DeployResult result = new DeployResult( request ); RequestTrace trace = DefaultRequestTrace.newChild( request.getTrace(), request ); RemoteRepository repository = request.getRepository(); RepositoryConnector connector; try { connector = remoteRepositoryManager.getRepositoryConnector( session, repository ); } catch ( NoRepositoryConnectorException e ) { throw new DeploymentException( "Failed to deploy artifacts/metadata: " + e.getMessage(), e ); } List generators = getMetadataGenerators( session, request ); try { List artifactUploads = new ArrayList(); List metadataUploads = new ArrayList(); IdentityHashMap processedMetadata = new IdentityHashMap(); EventCatapult catapult = new EventCatapult( session, trace, repository, repositoryEventDispatcher ); List artifacts = new ArrayList( request.getArtifacts() ); List metadatas = Utils.prepareMetadata( generators, artifacts ); syncContext.acquire( artifacts, Utils.combine( request.getMetadata(), metadatas ) ); for ( Metadata metadata : metadatas ) { upload( metadataUploads, session, metadata, repository, connector, catapult ); processedMetadata.put( metadata, null ); } for ( int i = 0; i < artifacts.size(); i++ ) { Artifact artifact = artifacts.get( i ); for ( MetadataGenerator generator : generators ) { artifact = generator.transformArtifact( artifact ); } artifacts.set( i, artifact ); artifactUploads.add( new ArtifactUploadEx( artifact, artifact.getFile(), catapult ) ); } connector.put( artifactUploads, null ); for ( ArtifactUpload upload : artifactUploads ) { if ( upload.getException() != null ) { throw new DeploymentException( "Failed to deploy artifacts: " + upload.getException().getMessage(), upload.getException() ); } result.addArtifact( upload.getArtifact() ); } metadatas = Utils.finishMetadata( generators, artifacts ); syncContext.acquire( null, metadatas ); for ( Metadata metadata : metadatas ) { upload( metadataUploads, session, metadata, repository, connector, catapult ); processedMetadata.put( metadata, null ); } for ( Metadata metadata : request.getMetadata() ) { if ( !processedMetadata.containsKey( metadata ) ) { upload( metadataUploads, session, metadata, repository, connector, catapult ); processedMetadata.put( metadata, null ); } } connector.put( null, metadataUploads ); for ( MetadataUpload upload : metadataUploads ) { if ( upload.getException() != null ) { throw new DeploymentException( "Failed to deploy metadata: " + upload.getException().getMessage(), upload.getException() ); } result.addMetadata( upload.getMetadata() ); } } finally { connector.close(); } return result; } private List getMetadataGenerators( RepositorySystemSession session, DeployRequest request ) { List factories = Utils.sortMetadataGeneratorFactories( this.metadataFactories ); List generators = new ArrayList(); for ( MetadataGeneratorFactory factory : factories ) { MetadataGenerator generator = factory.newInstance( session, request ); if ( generator != null ) { generators.add( generator ); } } return generators; } private void upload( Collection metadataUploads, RepositorySystemSession session, Metadata metadata, RemoteRepository repository, RepositoryConnector connector, EventCatapult catapult ) throws DeploymentException { LocalRepositoryManager lrm = session.getLocalRepositoryManager(); File basedir = lrm.getRepository().getBasedir(); File dstFile = new File( basedir, lrm.getPathForRemoteMetadata( metadata, repository, "" ) ); if ( metadata instanceof MergeableMetadata ) { if ( !( (MergeableMetadata) metadata ).isMerged() ) { { DefaultRepositoryEvent event = new DefaultRepositoryEvent( EventType.METADATA_RESOLVING, session, catapult.getTrace() ); event.setMetadata( metadata ); event.setRepository( repository ); repositoryEventDispatcher.dispatch( event ); event = new DefaultRepositoryEvent( EventType.METADATA_DOWNLOADING, session, catapult.getTrace() ); event.setMetadata( metadata ); event.setRepository( repository ); repositoryEventDispatcher.dispatch( event ); } RepositoryPolicy policy = getPolicy( session, repository, metadata.getNature() ); MetadataDownload download = new MetadataDownload(); download.setMetadata( metadata ); download.setFile( dstFile ); download.setChecksumPolicy( policy.getChecksumPolicy() ); connector.get( null, Arrays.asList( download ) ); Exception error = download.getException(); if ( error instanceof MetadataNotFoundException ) { dstFile.delete(); } { DefaultRepositoryEvent event = new DefaultRepositoryEvent( EventType.METADATA_DOWNLOADED, session, catapult.getTrace() ); event.setMetadata( metadata ); event.setRepository( repository ); event.setException( error ); event.setFile( dstFile ); repositoryEventDispatcher.dispatch( event ); event = new DefaultRepositoryEvent( EventType.METADATA_RESOLVED, session, catapult.getTrace() ); event.setMetadata( metadata ); event.setRepository( repository ); event.setException( error ); event.setFile( dstFile ); repositoryEventDispatcher.dispatch( event ); } if ( error != null && !( error instanceof MetadataNotFoundException ) ) { throw new DeploymentException( "Failed to retrieve remote metadata " + metadata + ": " + error.getMessage(), error ); } } try { ( (MergeableMetadata) metadata ).merge( dstFile, dstFile ); } catch ( RepositoryException e ) { throw new DeploymentException( "Failed to update metadata " + metadata + ": " + e.getMessage(), e ); } } else { if ( metadata.getFile() == null ) { throw new DeploymentException( "Failed to update metadata " + metadata + ": No file attached." ); } try { fileProcessor.copy( metadata.getFile(), dstFile, null ); } catch ( IOException e ) { throw new DeploymentException( "Failed to update metadata " + metadata + ": " + e.getMessage(), e ); } } UpdateCheck check = new UpdateCheck(); check.setItem( metadata ); check.setFile( dstFile ); check.setRepository( repository ); check.setAuthoritativeRepository( repository ); updateCheckManager.touchMetadata( session, check ); metadataUploads.add( new MetadataUploadEx( metadata, dstFile, catapult ) ); } private RepositoryPolicy getPolicy( RepositorySystemSession session, RemoteRepository repository, Metadata.Nature nature ) { boolean releases = !Metadata.Nature.SNAPSHOT.equals( nature ); boolean snapshots = !Metadata.Nature.RELEASE.equals( nature ); return remoteRepositoryManager.getPolicy( session, repository, releases, snapshots ); } static class EventCatapult { private final RepositorySystemSession session; private final RequestTrace trace; private final RemoteRepository repository; private final RepositoryEventDispatcher dispatcher; public EventCatapult( RepositorySystemSession session, RequestTrace trace, RemoteRepository repository, RepositoryEventDispatcher dispatcher ) { this.session = session; this.trace = trace; this.repository = repository; this.dispatcher = dispatcher; } public RequestTrace getTrace() { return trace; } public void artifactDeploying( Artifact artifact, File file ) { DefaultRepositoryEvent event = new DefaultRepositoryEvent( EventType.ARTIFACT_DEPLOYING, session, trace ); event.setArtifact( artifact ); event.setRepository( repository ); event.setFile( file ); dispatcher.dispatch( event ); } public void artifactDeployed( Artifact artifact, File file, ArtifactTransferException exception ) { DefaultRepositoryEvent event = new DefaultRepositoryEvent( EventType.ARTIFACT_DEPLOYED, session, trace ); event.setArtifact( artifact ); event.setRepository( repository ); event.setFile( file ); event.setException( exception ); dispatcher.dispatch( event ); } public void metadataDeploying( Metadata metadata, File file ) { DefaultRepositoryEvent event = new DefaultRepositoryEvent( EventType.METADATA_DEPLOYING, session, trace ); event.setMetadata( metadata ); event.setRepository( repository ); event.setFile( file ); dispatcher.dispatch( event ); } public void metadataDeployed( Metadata metadata, File file, Exception exception ) { DefaultRepositoryEvent event = new DefaultRepositoryEvent( EventType.METADATA_DEPLOYED, session, trace ); event.setMetadata( metadata ); event.setRepository( repository ); event.setFile( file ); event.setException( exception ); dispatcher.dispatch( event ); } } static class ArtifactUploadEx extends ArtifactUpload { private final EventCatapult catapult; public ArtifactUploadEx( Artifact artifact, File file, EventCatapult catapult ) { super( artifact, file ); this.catapult = catapult; } @Override public Transfer setState( State state ) { super.setState( state ); if ( State.ACTIVE.equals( state ) ) { catapult.artifactDeploying( getArtifact(), getFile() ); } else if ( State.DONE.equals( state ) ) { catapult.artifactDeployed( getArtifact(), getFile(), getException() ); } return this; } } static class MetadataUploadEx extends MetadataUpload { private final EventCatapult catapult; public MetadataUploadEx( Metadata metadata, File file, EventCatapult catapult ) { super( metadata, file ); this.catapult = catapult; } @Override public Transfer setState( State state ) { super.setState( state ); if ( State.ACTIVE.equals( state ) ) { catapult.metadataDeploying( getMetadata(), getFile() ); } else if ( State.DONE.equals( state ) ) { catapult.metadataDeployed( getMetadata(), getFile(), getException() ); } return this; } } } aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/internal/DefaultFileProcessor.java000066400000000000000000000110441167050556700333310ustar00rootroot00000000000000package org.sonatype.aether.impl.internal; /******************************************************************************* * 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.BufferedOutputStream; import java.io.Closeable; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.nio.ByteBuffer; import org.codehaus.plexus.component.annotations.Component; import org.sonatype.aether.spi.io.FileProcessor; /** * A utility class helping with file-based operations. * * @author Benjamin Hanzelmann * @author Benjamin Bentmann */ @Component( role = FileProcessor.class ) public class DefaultFileProcessor implements FileProcessor { private static void close( Closeable closeable ) { if ( closeable != null ) { try { closeable.close(); } catch ( IOException e ) { // too bad but who cares } } } /** * Thread-safe variant of {@link File#mkdirs()}. Adapted from Java 6. Creates the directory named by the given * abstract pathname, including any necessary but nonexistent parent directories. Note that if this operation fails * it may have succeeded in creating some of the necessary parent directories. * * @param directory The directory to create, may be {@code null}. * @return {@code true} if and only if the directory was created, along with all necessary parent directories; * {@code false} otherwise */ public boolean mkdirs( File directory ) { if ( directory == null ) { return false; } if ( directory.exists() ) { return false; } if ( directory.mkdir() ) { return true; } File canonDir = null; try { canonDir = directory.getCanonicalFile(); } catch ( IOException e ) { return false; } File parentDir = canonDir.getParentFile(); return ( parentDir != null && ( mkdirs( parentDir ) || parentDir.exists() ) && canonDir.mkdir() ); } public void write( File file, String data ) throws IOException { mkdirs( file.getParentFile() ); FileOutputStream fos = null; try { fos = new FileOutputStream( file ); if ( data != null ) { fos.write( data.getBytes( "UTF-8" ) ); } } finally { close( fos ); } } public long copy( File source, File target, ProgressListener listener ) throws IOException { long total = 0; FileInputStream fis = null; OutputStream fos = null; try { fis = new FileInputStream( source ); mkdirs( target.getParentFile() ); fos = new BufferedOutputStream( new FileOutputStream( target ) ); ByteBuffer buffer = ByteBuffer.allocate( 1024 * 32 ); byte[] array = buffer.array(); while ( true ) { int bytes = fis.read( array ); if ( bytes < 0 ) { break; } fos.write( array, 0, bytes ); total += bytes; if ( listener != null && bytes > 0 ) { try { buffer.rewind(); buffer.limit( bytes ); listener.progressed( buffer ); } catch ( Exception e ) { // too bad } } } } finally { close( fis ); close( fos ); } return total; } public void move( File source, File target ) throws IOException { if ( !source.renameTo( target ) ) { copy( source, target, null ); target.setLastModified( source.lastModified() ); source.delete(); } } } aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/internal/DefaultInstaller.java000066400000000000000000000320131167050556700325060ustar00rootroot00000000000000package org.sonatype.aether.impl.internal; /******************************************************************************* * 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.ArrayList; import java.util.IdentityHashMap; import java.util.List; import org.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.component.annotations.Requirement; import org.sonatype.aether.RepositoryEvent.EventType; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.RequestTrace; import org.sonatype.aether.SyncContext; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.impl.Installer; import org.sonatype.aether.impl.MetadataGenerator; import org.sonatype.aether.impl.MetadataGeneratorFactory; import org.sonatype.aether.impl.RepositoryEventDispatcher; import org.sonatype.aether.impl.SyncContextFactory; import org.sonatype.aether.installation.InstallRequest; import org.sonatype.aether.installation.InstallResult; import org.sonatype.aether.installation.InstallationException; import org.sonatype.aether.metadata.MergeableMetadata; import org.sonatype.aether.metadata.Metadata; import org.sonatype.aether.repository.LocalArtifactRegistration; import org.sonatype.aether.repository.LocalMetadataRegistration; import org.sonatype.aether.repository.LocalRepositoryManager; import org.sonatype.aether.spi.io.FileProcessor; import org.sonatype.aether.spi.locator.Service; import org.sonatype.aether.spi.locator.ServiceLocator; import org.sonatype.aether.spi.log.Logger; import org.sonatype.aether.spi.log.NullLogger; import org.sonatype.aether.util.DefaultRequestTrace; import org.sonatype.aether.util.listener.DefaultRepositoryEvent; /** * @author Benjamin Bentmann */ @Component( role = Installer.class ) public class DefaultInstaller implements Installer, Service { @Requirement private Logger logger = NullLogger.INSTANCE; @Requirement private FileProcessor fileProcessor; @Requirement private RepositoryEventDispatcher repositoryEventDispatcher; @Requirement( role = MetadataGeneratorFactory.class ) private List metadataFactories = new ArrayList(); @Requirement private SyncContextFactory syncContextFactory; public DefaultInstaller() { // enables default constructor } public DefaultInstaller( Logger logger, FileProcessor fileProcessor, RepositoryEventDispatcher repositoryEventDispatcher, List metadataFactories, SyncContextFactory syncContextFactory ) { setLogger( logger ); setFileProcessor( fileProcessor ); setRepositoryEventDispatcher( repositoryEventDispatcher ); setMetadataFactories( metadataFactories ); setSyncContextFactory( syncContextFactory ); } public void initService( ServiceLocator locator ) { setLogger( locator.getService( Logger.class ) ); setFileProcessor( locator.getService( FileProcessor.class ) ); setRepositoryEventDispatcher( locator.getService( RepositoryEventDispatcher.class ) ); setMetadataFactories( locator.getServices( MetadataGeneratorFactory.class ) ); setSyncContextFactory( locator.getService( SyncContextFactory.class ) ); } public DefaultInstaller setLogger( Logger logger ) { this.logger = ( logger != null ) ? logger : NullLogger.INSTANCE; return this; } public DefaultInstaller setFileProcessor( FileProcessor fileProcessor ) { if ( fileProcessor == null ) { throw new IllegalArgumentException( "file processor has not been specified" ); } this.fileProcessor = fileProcessor; return this; } public DefaultInstaller setRepositoryEventDispatcher( RepositoryEventDispatcher repositoryEventDispatcher ) { if ( repositoryEventDispatcher == null ) { throw new IllegalArgumentException( "repository event dispatcher has not been specified" ); } this.repositoryEventDispatcher = repositoryEventDispatcher; return this; } public DefaultInstaller addMetadataGeneratorFactory( MetadataGeneratorFactory factory ) { if ( factory == null ) { throw new IllegalArgumentException( "metadata generator factory has not been specified" ); } metadataFactories.add( factory ); return this; } public DefaultInstaller setMetadataFactories( List metadataFactories ) { if ( metadataFactories == null ) { this.metadataFactories = new ArrayList(); } else { this.metadataFactories = metadataFactories; } return this; } public DefaultInstaller setSyncContextFactory( SyncContextFactory syncContextFactory ) { if ( syncContextFactory == null ) { throw new IllegalArgumentException( "sync context factory has not been specified" ); } this.syncContextFactory = syncContextFactory; return this; } public InstallResult install( RepositorySystemSession session, InstallRequest request ) throws InstallationException { SyncContext syncContext = syncContextFactory.newInstance( session, false ); try { return install( syncContext, session, request ); } finally { syncContext.release(); } } private InstallResult install( SyncContext syncContext, RepositorySystemSession session, InstallRequest request ) throws InstallationException { InstallResult result = new InstallResult( request ); RequestTrace trace = DefaultRequestTrace.newChild( request.getTrace(), request ); List generators = getMetadataGenerators( session, request ); List artifacts = new ArrayList( request.getArtifacts() ); IdentityHashMap processedMetadata = new IdentityHashMap(); List metadatas = Utils.prepareMetadata( generators, artifacts ); syncContext.acquire( artifacts, Utils.combine( request.getMetadata(), metadatas ) ); for ( Metadata metadata : metadatas ) { install( session, trace, metadata ); processedMetadata.put( metadata, null ); result.addMetadata( metadata ); } for ( int i = 0; i < artifacts.size(); i++ ) { Artifact artifact = artifacts.get( i ); for ( MetadataGenerator generator : generators ) { artifact = generator.transformArtifact( artifact ); } artifacts.set( i, artifact ); install( session, trace, artifact ); result.addArtifact( artifact ); } metadatas = Utils.finishMetadata( generators, artifacts ); syncContext.acquire( null, metadatas ); for ( Metadata metadata : metadatas ) { install( session, trace, metadata ); processedMetadata.put( metadata, null ); result.addMetadata( metadata ); } for ( Metadata metadata : request.getMetadata() ) { if ( !processedMetadata.containsKey( metadata ) ) { install( session, trace, metadata ); result.addMetadata( metadata ); } } return result; } private List getMetadataGenerators( RepositorySystemSession session, InstallRequest request ) { List factories = Utils.sortMetadataGeneratorFactories( this.metadataFactories ); List generators = new ArrayList(); for ( MetadataGeneratorFactory factory : factories ) { MetadataGenerator generator = factory.newInstance( session, request ); if ( generator != null ) { generators.add( generator ); } } return generators; } private void install( RepositorySystemSession session, RequestTrace trace, Artifact artifact ) throws InstallationException { LocalRepositoryManager lrm = session.getLocalRepositoryManager(); File srcFile = artifact.getFile(); File dstFile = new File( lrm.getRepository().getBasedir(), lrm.getPathForLocalArtifact( artifact ) ); artifactInstalling( session, trace, artifact, dstFile ); Exception exception = null; try { boolean copy = "pom".equals( artifact.getExtension() ) || srcFile.lastModified() != dstFile.lastModified() || srcFile.length() != dstFile.length(); if ( copy ) { fileProcessor.copy( srcFile, dstFile, null ); dstFile.setLastModified( srcFile.lastModified() ); } else { logger.debug( "Skipped re-installing " + srcFile + " to " + dstFile + ", seems unchanged" ); } lrm.add( session, new LocalArtifactRegistration( artifact ) ); } catch ( Exception e ) { exception = e; throw new InstallationException( "Failed to install artifact " + artifact + ": " + e.getMessage(), e ); } finally { artifactInstalled( session, trace, artifact, dstFile, exception ); } } private void install( RepositorySystemSession session, RequestTrace trace, Metadata metadata ) throws InstallationException { LocalRepositoryManager lrm = session.getLocalRepositoryManager(); File dstFile = new File( lrm.getRepository().getBasedir(), lrm.getPathForLocalMetadata( metadata ) ); metadataInstalling( session, trace, metadata, dstFile ); Exception exception = null; try { if ( metadata instanceof MergeableMetadata ) { ( (MergeableMetadata) metadata ).merge( dstFile, dstFile ); } else { fileProcessor.copy( metadata.getFile(), dstFile, null ); } lrm.add( session, new LocalMetadataRegistration( metadata ) ); } catch ( Exception e ) { exception = e; throw new InstallationException( "Failed to install metadata " + metadata + ": " + e.getMessage(), e ); } finally { metadataInstalled( session, trace, metadata, dstFile, exception ); } } private void artifactInstalling( RepositorySystemSession session, RequestTrace trace, Artifact artifact, File dstFile ) { DefaultRepositoryEvent event = new DefaultRepositoryEvent( EventType.ARTIFACT_INSTALLING, session, trace ); event.setArtifact( artifact ); event.setRepository( session.getLocalRepositoryManager().getRepository() ); event.setFile( dstFile ); repositoryEventDispatcher.dispatch( event ); } private void artifactInstalled( RepositorySystemSession session, RequestTrace trace, Artifact artifact, File dstFile, Exception exception ) { DefaultRepositoryEvent event = new DefaultRepositoryEvent( EventType.ARTIFACT_INSTALLED, session, trace ); event.setArtifact( artifact ); event.setRepository( session.getLocalRepositoryManager().getRepository() ); event.setFile( dstFile ); event.setException( exception ); repositoryEventDispatcher.dispatch( event ); } private void metadataInstalling( RepositorySystemSession session, RequestTrace trace, Metadata metadata, File dstFile ) { DefaultRepositoryEvent event = new DefaultRepositoryEvent( EventType.METADATA_INSTALLING, session, trace ); event.setMetadata( metadata ); event.setRepository( session.getLocalRepositoryManager().getRepository() ); event.setFile( dstFile ); repositoryEventDispatcher.dispatch( event ); } private void metadataInstalled( RepositorySystemSession session, RequestTrace trace, Metadata metadata, File dstFile, Exception exception ) { DefaultRepositoryEvent event = new DefaultRepositoryEvent( EventType.METADATA_INSTALLED, session, trace ); event.setMetadata( metadata ); event.setRepository( session.getLocalRepositoryManager().getRepository() ); event.setFile( dstFile ); event.setException( exception ); repositoryEventDispatcher.dispatch( event ); } } DefaultLocalRepositoryEvent.java000066400000000000000000000043241167050556700346320ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/internalpackage org.sonatype.aether.impl.internal; /******************************************************************************* * 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 org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.impl.LocalRepositoryEvent; import org.sonatype.aether.repository.LocalRepository; /** * @author Benjamin Bentmann */ @SuppressWarnings( "deprecation" ) public class DefaultLocalRepositoryEvent implements LocalRepositoryEvent { private final EventType type; private final RepositorySystemSession session; private final LocalRepository repository; private final Artifact artifact; private final File file; public DefaultLocalRepositoryEvent( EventType type, RepositorySystemSession session, Artifact artifact, File file ) { if ( type == null ) { throw new IllegalArgumentException( "event type missing" ); } if ( session == null ) { throw new IllegalArgumentException( "repository system session missing" ); } if ( artifact == null ) { throw new IllegalArgumentException( "artifact missing" ); } this.type = type; this.session = session; this.repository = session.getLocalRepository(); this.artifact = artifact; this.file = file; } public EventType getType() { return type; } public RepositorySystemSession getSession() { return session; } public LocalRepository getRepository() { return repository; } public Artifact getArtifact() { return artifact; } public File getFile() { return file; } @Override public String toString() { return getType() + " " + getArtifact() + " > " + getFile(); } } DefaultLocalRepositoryProvider.java000066400000000000000000000122001167050556700353330ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/internalpackage org.sonatype.aether.impl.internal; /******************************************************************************* * 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.Comparator; import java.util.List; import java.util.ListIterator; import org.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.component.annotations.Requirement; import org.sonatype.aether.impl.LocalRepositoryProvider; import org.sonatype.aether.repository.LocalRepository; import org.sonatype.aether.repository.LocalRepositoryManager; import org.sonatype.aether.repository.NoLocalRepositoryManagerException; import org.sonatype.aether.spi.localrepo.LocalRepositoryManagerFactory; import org.sonatype.aether.spi.locator.Service; import org.sonatype.aether.spi.locator.ServiceLocator; import org.sonatype.aether.spi.log.Logger; import org.sonatype.aether.spi.log.NullLogger; /** * @author Benjamin Bentmann */ @Component( role = LocalRepositoryProvider.class ) public class DefaultLocalRepositoryProvider implements LocalRepositoryProvider, Service { @Requirement private Logger logger = NullLogger.INSTANCE; @Requirement( role = LocalRepositoryManagerFactory.class ) private List managerFactories = new ArrayList(); private static final Comparator COMPARATOR = new Comparator() { public int compare( LocalRepositoryManagerFactory o1, LocalRepositoryManagerFactory o2 ) { return o2.getPriority() - o1.getPriority(); } }; public DefaultLocalRepositoryProvider() { // enables default constructor } public void initService( ServiceLocator locator ) { setLogger( locator.getService( Logger.class ) ); setLocalRepositoryManagerFactories( locator.getServices( LocalRepositoryManagerFactory.class ) ); } public DefaultLocalRepositoryProvider setLogger( Logger logger ) { this.logger = ( logger != null ) ? logger : NullLogger.INSTANCE; return this; } public DefaultLocalRepositoryProvider setLocalRepositoryManagerFactories( List factories ) { if ( factories == null ) { managerFactories = new ArrayList( 2 ); } else { managerFactories = factories; } return this; } public DefaultLocalRepositoryProvider addLocalRepositoryManagerFactory( LocalRepositoryManagerFactory factory ) { if ( factory == null ) { throw new IllegalArgumentException( "Local repository manager factory has not been specified." ); } managerFactories.add( factory ); return this; } public LocalRepositoryManager newLocalRepositoryManager( LocalRepository localRepository ) throws NoLocalRepositoryManagerException { List factories = new ArrayList( managerFactories ); Collections.sort( factories, COMPARATOR ); for ( LocalRepositoryManagerFactory factory : factories ) { try { LocalRepositoryManager manager = factory.newInstance( localRepository ); if ( logger.isDebugEnabled() ) { StringBuilder buffer = new StringBuilder( 256 ); buffer.append( "Using manager " ).append( manager.getClass().getSimpleName() ); buffer.append( " with priority " ).append( factory.getPriority() ); buffer.append( " for " ).append( localRepository.getBasedir() ); logger.debug( buffer.toString() ); } return manager; } catch ( NoLocalRepositoryManagerException e ) { // continue and try next factory } } StringBuilder buffer = new StringBuilder( 256 ); buffer.append( "No manager available for local repository " ); buffer.append( localRepository.getBasedir() ); buffer.append( " of type " ).append( localRepository.getContentType() ); buffer.append( " using the available factories " ); for ( ListIterator it = factories.listIterator(); it.hasNext(); ) { LocalRepositoryManagerFactory factory = it.next(); buffer.append( factory.getClass().getSimpleName() ); if ( it.hasNext() ) { buffer.append( ", " ); } } throw new NoLocalRepositoryManagerException( localRepository, buffer.toString() ); } } DefaultMetadataResolver.java000066400000000000000000000555131167050556700337460ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/internalpackage org.sonatype.aether.impl.internal; /******************************************************************************* * 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.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.concurrent.Executor; import java.util.concurrent.ExecutorService; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; import org.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.component.annotations.Requirement; import org.sonatype.aether.RequestTrace; import org.sonatype.aether.SyncContext; import org.sonatype.aether.RepositoryEvent.EventType; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.impl.MetadataResolver; import org.sonatype.aether.impl.RemoteRepositoryManager; import org.sonatype.aether.impl.RepositoryEventDispatcher; import org.sonatype.aether.impl.SyncContextFactory; import org.sonatype.aether.impl.UpdateCheck; import org.sonatype.aether.impl.UpdateCheckManager; import org.sonatype.aether.metadata.Metadata; import org.sonatype.aether.transfer.MetadataNotFoundException; import org.sonatype.aether.transfer.MetadataTransferException; import org.sonatype.aether.transfer.NoRepositoryConnectorException; import org.sonatype.aether.util.ConfigUtils; import org.sonatype.aether.util.DefaultRequestTrace; import org.sonatype.aether.util.concurrency.RunnableErrorForwarder; import org.sonatype.aether.util.listener.DefaultRepositoryEvent; import org.sonatype.aether.repository.ArtifactRepository; import org.sonatype.aether.repository.LocalMetadataRegistration; import org.sonatype.aether.repository.LocalMetadataRequest; import org.sonatype.aether.repository.LocalMetadataResult; import org.sonatype.aether.repository.LocalRepository; import org.sonatype.aether.repository.LocalRepositoryManager; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.repository.RepositoryPolicy; import org.sonatype.aether.resolution.MetadataRequest; import org.sonatype.aether.resolution.MetadataResult; import org.sonatype.aether.spi.connector.MetadataDownload; import org.sonatype.aether.spi.connector.RepositoryConnector; import org.sonatype.aether.spi.locator.Service; import org.sonatype.aether.spi.locator.ServiceLocator; import org.sonatype.aether.spi.log.Logger; import org.sonatype.aether.spi.log.NullLogger; /** * @author Benjamin Bentmann */ @Component( role = MetadataResolver.class ) public class DefaultMetadataResolver implements MetadataResolver, Service { @SuppressWarnings( "unused" ) @Requirement private Logger logger = NullLogger.INSTANCE; @Requirement private RepositoryEventDispatcher repositoryEventDispatcher; @Requirement private UpdateCheckManager updateCheckManager; @Requirement private RemoteRepositoryManager remoteRepositoryManager; @Requirement private SyncContextFactory syncContextFactory; public DefaultMetadataResolver() { // enables default constructor } public DefaultMetadataResolver( Logger logger, RepositoryEventDispatcher repositoryEventDispatcher, UpdateCheckManager updateCheckManager, RemoteRepositoryManager remoteRepositoryManager, SyncContextFactory syncContextFactory ) { setLogger( logger ); setRepositoryEventDispatcher( repositoryEventDispatcher ); setUpdateCheckManager( updateCheckManager ); setRemoteRepositoryManager( remoteRepositoryManager ); setSyncContextFactory( syncContextFactory ); } public void initService( ServiceLocator locator ) { setLogger( locator.getService( Logger.class ) ); setRepositoryEventDispatcher( locator.getService( RepositoryEventDispatcher.class ) ); setUpdateCheckManager( locator.getService( UpdateCheckManager.class ) ); setRemoteRepositoryManager( locator.getService( RemoteRepositoryManager.class ) ); setSyncContextFactory( locator.getService( SyncContextFactory.class ) ); } public DefaultMetadataResolver setLogger( Logger logger ) { this.logger = ( logger != null ) ? logger : NullLogger.INSTANCE; return this; } public DefaultMetadataResolver setRepositoryEventDispatcher( RepositoryEventDispatcher repositoryEventDispatcher ) { if ( repositoryEventDispatcher == null ) { throw new IllegalArgumentException( "repository event dispatcher has not been specified" ); } this.repositoryEventDispatcher = repositoryEventDispatcher; return this; } public DefaultMetadataResolver setUpdateCheckManager( UpdateCheckManager updateCheckManager ) { if ( updateCheckManager == null ) { throw new IllegalArgumentException( "update check manager has not been specified" ); } this.updateCheckManager = updateCheckManager; return this; } public DefaultMetadataResolver setRemoteRepositoryManager( RemoteRepositoryManager remoteRepositoryManager ) { if ( remoteRepositoryManager == null ) { throw new IllegalArgumentException( "remote repository manager has not been specified" ); } this.remoteRepositoryManager = remoteRepositoryManager; return this; } public DefaultMetadataResolver setSyncContextFactory( SyncContextFactory syncContextFactory ) { if ( syncContextFactory == null ) { throw new IllegalArgumentException( "sync context factory has not been specified" ); } this.syncContextFactory = syncContextFactory; return this; } public List resolveMetadata( RepositorySystemSession session, Collection requests ) { SyncContext syncContext = syncContextFactory.newInstance( session, false ); try { Collection metadata = new ArrayList( requests.size() ); for ( MetadataRequest request : requests ) { metadata.add( request.getMetadata() ); } syncContext.acquire( null, metadata ); return resolve( session, requests ); } finally { syncContext.release(); } } private List resolve( RepositorySystemSession session, Collection requests ) { List results = new ArrayList( requests.size() ); List tasks = new ArrayList( requests.size() ); Map localLastUpdates = new HashMap(); for ( MetadataRequest request : requests ) { RequestTrace trace = DefaultRequestTrace.newChild( request.getTrace(), request ); MetadataResult result = new MetadataResult( request ); results.add( result ); Metadata metadata = request.getMetadata(); RemoteRepository repository = request.getRepository(); if ( repository == null ) { LocalRepository localRepo = session.getLocalRepositoryManager().getRepository(); metadataResolving( session, trace, metadata, localRepo ); File localFile = getLocalFile( session, metadata ); if ( localFile != null ) { metadata = metadata.setFile( localFile ); result.setMetadata( metadata ); } else { result.setException( new MetadataNotFoundException( metadata, localRepo ) ); } metadataResolved( session, trace, metadata, localRepo, result.getException() ); continue; } List repositories = getEnabledSourceRepositories( repository, metadata.getNature() ); if ( repositories.isEmpty() ) { continue; } metadataResolving( session, trace, metadata, repository ); LocalRepositoryManager lrm = session.getLocalRepositoryManager(); LocalMetadataRequest localRequest = new LocalMetadataRequest( metadata, repository, request.getRequestContext() ); LocalMetadataResult lrmResult = lrm.find( session, localRequest ); File metadataFile = lrmResult.getFile(); if ( session.isOffline() ) { if ( metadataFile != null ) { metadata = metadata.setFile( metadataFile ); result.setMetadata( metadata ); } else { String msg = "The repository system is offline but the metadata " + metadata + " from " + repository + " is not available in the local repository."; result.setException( new MetadataNotFoundException( metadata, repository, msg ) ); } metadataResolved( session, trace, metadata, repository, result.getException() ); continue; } Long localLastUpdate = null; if ( request.isFavorLocalRepository() ) { File localFile = getLocalFile( session, metadata ); localLastUpdate = localLastUpdates.get( localFile ); if ( localLastUpdate == null ) { localLastUpdate = Long.valueOf( localFile != null ? localFile.lastModified() : 0 ); localLastUpdates.put( localFile, localLastUpdate ); } } List> checks = new ArrayList>(); Exception exception = null; for ( RemoteRepository repo : repositories ) { UpdateCheck check = new UpdateCheck(); check.setLocalLastUpdated( ( localLastUpdate != null ) ? localLastUpdate.longValue() : 0 ); check.setItem( metadata ); // use 'main' installation file for the check (-> use requested repository) File checkFile = new File( session.getLocalRepository().getBasedir(), session.getLocalRepositoryManager().getPathForRemoteMetadata( metadata, repository, request.getRequestContext() ) ); check.setFile( checkFile ); check.setRepository( repository ); check.setAuthoritativeRepository( repo ); check.setPolicy( getPolicy( session, repo, metadata.getNature() ).getUpdatePolicy() ); if ( lrmResult.isStale() ) { checks.add( check ); } else { updateCheckManager.checkMetadata( session, check ); if ( check.isRequired() ) { checks.add( check ); } else if ( exception == null ) { exception = check.getException(); } } } if ( !checks.isEmpty() ) { RepositoryPolicy policy = getPolicy( session, repository, metadata.getNature() ); // install path may be different from lookup path File installFile = new File( session.getLocalRepository().getBasedir(), session.getLocalRepositoryManager().getPathForRemoteMetadata( metadata, request.getRepository(), request.getRequestContext() ) ); ResolveTask task = new ResolveTask( session, trace, result, installFile, checks, policy.getChecksumPolicy() ); tasks.add( task ); } else { result.setException( exception ); if ( metadataFile != null ) { metadata = metadata.setFile( metadataFile ); result.setMetadata( metadata ); } metadataResolved( session, trace, metadata, repository, result.getException() ); } } if ( !tasks.isEmpty() ) { int threads = ConfigUtils.getInteger( session, 4, "aether.metadataResolver.threads" ); Executor executor = getExecutor( Math.min( tasks.size(), threads ) ); try { RunnableErrorForwarder errorForwarder = new RunnableErrorForwarder(); for ( ResolveTask task : tasks ) { executor.execute( errorForwarder.wrap( task ) ); } errorForwarder.await(); for ( ResolveTask task : tasks ) { task.result.setException( task.exception ); } } finally { shutdown( executor ); } for ( ResolveTask task : tasks ) { Metadata metadata = task.request.getMetadata(); // re-lookup metadata for resolve LocalMetadataRequest localRequest = new LocalMetadataRequest( metadata, task.request.getRepository(), task.request.getRequestContext() ); File metadataFile = session.getLocalRepositoryManager().find( session, localRequest ).getFile(); if ( metadataFile != null ) { metadata = metadata.setFile( metadataFile ); task.result.setMetadata( metadata ); } if ( task.result.getException() == null ) { task.result.setUpdated( true ); } metadataResolved( session, task.trace, metadata, task.request.getRepository(), task.result.getException() ); } } return results; } private File getLocalFile( RepositorySystemSession session, Metadata metadata ) { LocalRepositoryManager lrm = session.getLocalRepositoryManager(); LocalMetadataResult localResult = lrm.find( session, new LocalMetadataRequest( metadata, null, null ) ); File localFile = localResult.getFile(); return localFile; } private List getEnabledSourceRepositories( RemoteRepository repository, Metadata.Nature nature ) { List repositories = new ArrayList(); if ( repository.isRepositoryManager() ) { for ( RemoteRepository repo : repository.getMirroredRepositories() ) { if ( isEnabled( repo, nature ) ) { repositories.add( repo ); } } } else if ( isEnabled( repository, nature ) ) { repositories.add( repository ); } return repositories; } private boolean isEnabled( RemoteRepository repository, Metadata.Nature nature ) { if ( !Metadata.Nature.SNAPSHOT.equals( nature ) && repository.getPolicy( false ).isEnabled() ) { return true; } if ( !Metadata.Nature.RELEASE.equals( nature ) && repository.getPolicy( true ).isEnabled() ) { return true; } return false; } private RepositoryPolicy getPolicy( RepositorySystemSession session, RemoteRepository repository, Metadata.Nature nature ) { boolean releases = !Metadata.Nature.SNAPSHOT.equals( nature ); boolean snapshots = !Metadata.Nature.RELEASE.equals( nature ); return remoteRepositoryManager.getPolicy( session, repository, releases, snapshots ); } private void metadataResolving( RepositorySystemSession session, RequestTrace trace, Metadata metadata, ArtifactRepository repository ) { DefaultRepositoryEvent event = new DefaultRepositoryEvent( EventType.METADATA_RESOLVING, session, trace ); event.setMetadata( metadata ); event.setRepository( repository ); repositoryEventDispatcher.dispatch( event ); } private void metadataResolved( RepositorySystemSession session, RequestTrace trace, Metadata metadata, ArtifactRepository repository, Exception exception ) { DefaultRepositoryEvent event = new DefaultRepositoryEvent( EventType.METADATA_RESOLVED, session, trace ); event.setMetadata( metadata ); event.setRepository( repository ); event.setException( exception ); event.setFile( metadata.getFile() ); repositoryEventDispatcher.dispatch( event ); } private void metadataDownloading( RepositorySystemSession session, RequestTrace trace, Metadata metadata, ArtifactRepository repository ) { DefaultRepositoryEvent event = new DefaultRepositoryEvent( EventType.METADATA_DOWNLOADING, session, trace ); event.setMetadata( metadata ); event.setRepository( repository ); repositoryEventDispatcher.dispatch( event ); } private void metadataDownloaded( RepositorySystemSession session, RequestTrace trace, Metadata metadata, ArtifactRepository repository, File file, Exception exception ) { DefaultRepositoryEvent event = new DefaultRepositoryEvent( EventType.METADATA_DOWNLOADED, session, trace ); event.setMetadata( metadata ); event.setRepository( repository ); event.setException( exception ); event.setFile( file ); repositoryEventDispatcher.dispatch( event ); } private Executor getExecutor( int threads ) { if ( threads <= 1 ) { return new Executor() { public void execute( Runnable command ) { command.run(); } }; } else { return new ThreadPoolExecutor( threads, threads, 3, TimeUnit.SECONDS, new LinkedBlockingQueue() ); } } private void shutdown( Executor executor ) { if ( executor instanceof ExecutorService ) { ( (ExecutorService) executor ).shutdown(); } } class ResolveTask implements Runnable { final RepositorySystemSession session; final RequestTrace trace; final MetadataResult result; final MetadataRequest request; final File metadataFile; final String policy; final List> checks; volatile MetadataTransferException exception; public ResolveTask( RepositorySystemSession session, RequestTrace trace, MetadataResult result, File metadataFile, List> checks, String policy ) { this.session = session; this.trace = trace; this.result = result; this.request = result.getRequest(); this.metadataFile = metadataFile; this.policy = policy; this.checks = checks; } public void run() { Metadata metadata = request.getMetadata(); RemoteRepository requestRepository = request.getRepository(); metadataDownloading( session, trace, metadata, requestRepository ); try { List repositories = new ArrayList(); for ( UpdateCheck check : checks ) { repositories.add( check.getAuthoritativeRepository() ); } MetadataDownload download = new MetadataDownload(); download.setMetadata( metadata ); download.setRequestContext( request.getRequestContext() ); download.setFile( metadataFile ); download.setChecksumPolicy( policy ); download.setRepositories( repositories ); RepositoryConnector connector = remoteRepositoryManager.getRepositoryConnector( session, requestRepository ); try { connector.get( null, Arrays.asList( download ) ); } finally { connector.close(); } exception = download.getException(); if ( exception == null ) { List contexts = Collections.singletonList( request.getRequestContext() ); LocalMetadataRegistration registration = new LocalMetadataRegistration( metadata, requestRepository, contexts ); session.getLocalRepositoryManager().add( session, registration ); } else if ( request.isDeleteLocalCopyIfMissing() && exception instanceof MetadataNotFoundException ) { download.getFile().delete(); } } catch ( NoRepositoryConnectorException e ) { exception = new MetadataTransferException( metadata, requestRepository, e ); } for ( UpdateCheck check : checks ) { updateCheckManager.touchMetadata( session, check.setException( exception ) ); } metadataDownloaded( session, trace, metadata, requestRepository, metadataFile, exception ); } } } DefaultRemoteRepositoryManager.java000066400000000000000000000343651167050556700353340ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/internalpackage org.sonatype.aether.impl.internal; /******************************************************************************* * 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.Comparator; import java.util.List; import java.util.ListIterator; import org.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.component.annotations.Requirement; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.impl.RemoteRepositoryManager; import org.sonatype.aether.impl.UpdateCheckManager; import org.sonatype.aether.repository.Authentication; import org.sonatype.aether.repository.AuthenticationSelector; import org.sonatype.aether.repository.MirrorSelector; import org.sonatype.aether.repository.Proxy; import org.sonatype.aether.repository.ProxySelector; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.repository.RepositoryPolicy; import org.sonatype.aether.spi.connector.RepositoryConnector; import org.sonatype.aether.spi.connector.RepositoryConnectorFactory; import org.sonatype.aether.spi.locator.Service; import org.sonatype.aether.spi.locator.ServiceLocator; import org.sonatype.aether.spi.log.Logger; import org.sonatype.aether.spi.log.NullLogger; import org.sonatype.aether.transfer.NoRepositoryConnectorException; import org.sonatype.aether.util.StringUtils; /** * @author Benjamin Bentmann */ @Component( role = RemoteRepositoryManager.class, hint = "default" ) public class DefaultRemoteRepositoryManager implements RemoteRepositoryManager, Service { @Requirement private Logger logger = NullLogger.INSTANCE; @Requirement private UpdateCheckManager updateCheckManager; @Requirement( role = RepositoryConnectorFactory.class ) private List connectorFactories = new ArrayList(); private static final Comparator COMPARATOR = new Comparator() { public int compare( RepositoryConnectorFactory o1, RepositoryConnectorFactory o2 ) { return o2.getPriority() - o1.getPriority(); } }; public DefaultRemoteRepositoryManager() { // enables default constructor } public DefaultRemoteRepositoryManager( Logger logger, UpdateCheckManager updateCheckManager, List connectorFactories ) { setLogger( logger ); setUpdateCheckManager( updateCheckManager ); setRepositoryConnectorFactories( connectorFactories ); } public void initService( ServiceLocator locator ) { setLogger( locator.getService( Logger.class ) ); setUpdateCheckManager( locator.getService( UpdateCheckManager.class ) ); connectorFactories = locator.getServices( RepositoryConnectorFactory.class ); } public DefaultRemoteRepositoryManager setLogger( Logger logger ) { this.logger = ( logger != null ) ? logger : NullLogger.INSTANCE; return this; } public DefaultRemoteRepositoryManager setUpdateCheckManager( UpdateCheckManager updateCheckManager ) { if ( updateCheckManager == null ) { throw new IllegalArgumentException( "update check manager has not been specified" ); } this.updateCheckManager = updateCheckManager; return this; } public DefaultRemoteRepositoryManager addRepositoryConnectorFactory( RepositoryConnectorFactory factory ) { if ( factory == null ) { throw new IllegalArgumentException( "repository connector factory has not been specified" ); } connectorFactories.add( factory ); return this; } public DefaultRemoteRepositoryManager setRepositoryConnectorFactories( List factories ) { if ( factories == null ) { this.connectorFactories = new ArrayList(); } else { this.connectorFactories = factories; } return this; } public List aggregateRepositories( RepositorySystemSession session, List dominantRepositories, List recessiveRepositories, boolean recessiveIsRaw ) { if ( recessiveRepositories.isEmpty() ) { return dominantRepositories; } MirrorSelector mirrorSelector = session.getMirrorSelector(); AuthenticationSelector authSelector = session.getAuthenticationSelector(); ProxySelector proxySelector = session.getProxySelector(); List result = new ArrayList( dominantRepositories ); next: for ( RemoteRepository recessiveRepository : recessiveRepositories ) { RemoteRepository repository = recessiveRepository; if ( recessiveIsRaw ) { RemoteRepository mirrorRepository = mirrorSelector.getMirror( recessiveRepository ); if ( mirrorRepository == null ) { repository = recessiveRepository; } else { logger.debug( "Using mirror " + mirrorRepository.getId() + " (" + mirrorRepository.getUrl() + ") for " + recessiveRepository.getId() + " (" + recessiveRepository.getUrl() + ")." ); repository = mirrorRepository; } } String key = getKey( repository ); for ( ListIterator it = result.listIterator(); it.hasNext(); ) { RemoteRepository dominantRepository = it.next(); if ( key.equals( getKey( dominantRepository ) ) ) { if ( !dominantRepository.getMirroredRepositories().isEmpty() && !repository.getMirroredRepositories().isEmpty() ) { RemoteRepository mergedRepository = mergeMirrors( session, dominantRepository, repository ); if ( mergedRepository != dominantRepository ) { it.set( mergedRepository ); } } continue next; } } if ( recessiveIsRaw ) { Authentication auth = authSelector.getAuthentication( repository ); if ( auth != null ) { repository.setAuthentication( auth ); } Proxy proxy = proxySelector.getProxy( repository ); if ( proxy != null ) { repository.setProxy( proxy ); } } result.add( repository ); } return result; } private String getKey( RemoteRepository repository ) { return repository.getId(); } private RemoteRepository mergeMirrors( RepositorySystemSession session, RemoteRepository dominant, RemoteRepository recessive ) { RemoteRepository merged = dominant; next: for ( RemoteRepository rec : recessive.getMirroredRepositories() ) { String recKey = getKey( rec ); for ( RemoteRepository dom : dominant.getMirroredRepositories() ) { if ( recKey.equals( getKey( dom ) ) ) { continue next; } } if ( merged == dominant ) { merged = new RemoteRepository(); merged.setRepositoryManager( dominant.isRepositoryManager() ); merged.setId( dominant.getId() ); merged.setContentType( dominant.getContentType() ); merged.setUrl( dominant.getUrl() ); merged.setAuthentication( dominant.getAuthentication() ); merged.setProxy( dominant.getProxy() ); merged.setPolicy( false, dominant.getPolicy( false ) ); merged.setPolicy( true, dominant.getPolicy( true ) ); merged.setMirroredRepositories( new ArrayList( dominant.getMirroredRepositories() ) ); } merged.setPolicy( false, merge( session, merged.getPolicy( false ), rec.getPolicy( false ) ) ); merged.setPolicy( true, merge( session, merged.getPolicy( true ), rec.getPolicy( true ) ) ); merged.getMirroredRepositories().add( rec ); } return merged; } public RepositoryPolicy getPolicy( RepositorySystemSession session, RemoteRepository repository, boolean releases, boolean snapshots ) { RepositoryPolicy policy; // get effective per-repository policy if ( releases && snapshots ) { policy = merge( session, repository.getPolicy( false ), repository.getPolicy( true ) ); } else { policy = repository.getPolicy( snapshots ); } // superimpose global policy if ( !StringUtils.isEmpty( session.getChecksumPolicy() ) ) { policy = policy.setChecksumPolicy( session.getChecksumPolicy() ); } if ( !StringUtils.isEmpty( session.getUpdatePolicy() ) ) { policy = policy.setUpdatePolicy( session.getUpdatePolicy() ); } return policy; } private RepositoryPolicy merge( RepositorySystemSession session, RepositoryPolicy policy1, RepositoryPolicy policy2 ) { RepositoryPolicy policy; if ( policy1.isEnabled() && policy2.isEnabled() ) { String checksums; if ( ordinalOfChecksumPolicy( policy2.getChecksumPolicy() ) < ordinalOfChecksumPolicy( policy1.getChecksumPolicy() ) ) { checksums = policy2.getChecksumPolicy(); } else { checksums = policy1.getChecksumPolicy(); } String updates = updateCheckManager.getEffectiveUpdatePolicy( session, policy1.getUpdatePolicy(), policy2.getUpdatePolicy() ); policy = new RepositoryPolicy( true, updates, checksums ); } else if ( policy2.isEnabled() ) { policy = policy2; } else { policy = policy1; } return policy; } private int ordinalOfChecksumPolicy( String policy ) { if ( RepositoryPolicy.CHECKSUM_POLICY_FAIL.equals( policy ) ) { return 2; } else if ( RepositoryPolicy.CHECKSUM_POLICY_IGNORE.equals( policy ) ) { return 0; } else { return 1; } } public RepositoryConnector getRepositoryConnector( RepositorySystemSession session, RemoteRepository repository ) throws NoRepositoryConnectorException { if ( repository == null ) { throw new IllegalArgumentException( "remote repository has not been specified" ); } List factories = new ArrayList( connectorFactories ); Collections.sort( factories, COMPARATOR ); for ( RepositoryConnectorFactory factory : factories ) { try { RepositoryConnector connector = factory.newInstance( session, repository ); if ( logger.isDebugEnabled() ) { StringBuilder buffer = new StringBuilder( 256 ); buffer.append( "Using connector " ).append( connector.getClass().getSimpleName() ); buffer.append( " with priority " ).append( factory.getPriority() ); buffer.append( " for " ).append( repository.getUrl() ); Authentication auth = repository.getAuthentication(); if ( auth != null ) { buffer.append( " as " ).append( auth.getUsername() ); } Proxy proxy = repository.getProxy(); if ( proxy != null ) { buffer.append( " via " ).append( proxy.getHost() ).append( ':' ).append( proxy.getPort() ); auth = proxy.getAuthentication(); if ( auth != null ) { buffer.append( " as " ).append( auth.getUsername() ); } } logger.debug( buffer.toString() ); } return connector; } catch ( NoRepositoryConnectorException e ) { // continue and try next factory } } StringBuilder buffer = new StringBuilder( 256 ); buffer.append( "No connector available to access repository " ); buffer.append( repository.getId() ); buffer.append( " (" ).append( repository.getUrl() ); buffer.append( ") of type " ).append( repository.getContentType() ); buffer.append( " using the available factories " ); for ( ListIterator it = factories.listIterator(); it.hasNext(); ) { RepositoryConnectorFactory factory = it.next(); buffer.append( factory.getClass().getSimpleName() ); if ( it.hasNext() ) { buffer.append( ", " ); } } throw new NoRepositoryConnectorException( repository, buffer.toString() ); } } DefaultRepositoryEventDispatcher.java000066400000000000000000000225271167050556700356730ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/internalpackage org.sonatype.aether.impl.internal; /******************************************************************************* * 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.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.component.annotations.Requirement; import org.sonatype.aether.RepositoryEvent; import org.sonatype.aether.RepositoryEvent.EventType; import org.sonatype.aether.RepositoryListener; import org.sonatype.aether.impl.LocalRepositoryEvent; import org.sonatype.aether.impl.LocalRepositoryMaintainer; import org.sonatype.aether.impl.RepositoryEventDispatcher; import org.sonatype.aether.spi.locator.Service; import org.sonatype.aether.spi.locator.ServiceLocator; import org.sonatype.aether.spi.log.Logger; import org.sonatype.aether.spi.log.NullLogger; /** * @author Benjamin Bentmann */ @Component( role = RepositoryEventDispatcher.class ) @SuppressWarnings( "deprecation" ) public class DefaultRepositoryEventDispatcher implements RepositoryEventDispatcher, Service { @Requirement private Logger logger = NullLogger.INSTANCE; @Requirement( role = RepositoryListener.class ) private List listeners = new ArrayList(); @Requirement( role = LocalRepositoryMaintainer.class ) private List localRepositoryMaintainers = new ArrayList(); public DefaultRepositoryEventDispatcher() { // enables no-arg constructor } public DefaultRepositoryEventDispatcher( Logger logger, List listeners ) { setLogger( logger ); setListeners( listeners ); } public DefaultRepositoryEventDispatcher( Logger logger, List listeners, List localRepositoryMaintainers ) { this( logger, listeners ); setLocalRepositoryMaintainers( localRepositoryMaintainers ); } public DefaultRepositoryEventDispatcher setLogger( Logger logger ) { this.logger = ( logger != null ) ? logger : NullLogger.INSTANCE; return this; } public DefaultRepositoryEventDispatcher addListener( RepositoryListener listener ) { if ( listener == null ) { throw new IllegalArgumentException( "repository listener has not been specified" ); } this.listeners.add( listener ); return this; } public DefaultRepositoryEventDispatcher setListeners( List listeners ) { if ( listeners == null ) { this.listeners = new ArrayList(); } else { this.listeners = listeners; } return this; } public DefaultRepositoryEventDispatcher addLocalRepositoryMaintainer( LocalRepositoryMaintainer maintainer ) { if ( maintainer == null ) { throw new IllegalArgumentException( "local repository maintainer has not been specified" ); } this.localRepositoryMaintainers.add( maintainer ); return this; } public DefaultRepositoryEventDispatcher setLocalRepositoryMaintainers( List maintainers ) { if ( maintainers == null ) { this.localRepositoryMaintainers = new ArrayList(); } else { this.localRepositoryMaintainers = maintainers; } return this; } public void initService( ServiceLocator locator ) { setLogger( locator.getService( Logger.class ) ); setListeners( locator.getServices( RepositoryListener.class ) ); setLocalRepositoryMaintainers( locator.getServices( LocalRepositoryMaintainer.class ) ); } public void dispatch( RepositoryEvent event ) { if ( !listeners.isEmpty() ) { for ( RepositoryListener listener : listeners ) { dispatch( event, listener ); } } if ( !localRepositoryMaintainers.isEmpty() ) { if ( EventType.ARTIFACT_DOWNLOADED.equals( event.getType() ) ) { DefaultLocalRepositoryEvent evt = new DefaultLocalRepositoryEvent( LocalRepositoryEvent.EventType.ARTIFACT_DOWNLOADED, event.getSession(), event.getArtifact(), event.getFile() ); for ( LocalRepositoryMaintainer maintainer : localRepositoryMaintainers ) { try { maintainer.artifactDownloaded( evt ); } catch ( Exception e ) { logError( e, maintainer ); } } } else if ( EventType.ARTIFACT_INSTALLED.equals( event.getType() ) ) { DefaultLocalRepositoryEvent evt = new DefaultLocalRepositoryEvent( LocalRepositoryEvent.EventType.ARTIFACT_INSTALLED, event.getSession(), event.getArtifact(), event.getFile() ); for ( LocalRepositoryMaintainer maintainer : localRepositoryMaintainers ) { try { maintainer.artifactInstalled( evt ); } catch ( Exception e ) { logError( e, maintainer ); } } } } RepositoryListener listener = event.getSession().getRepositoryListener(); if ( listener != null ) { dispatch( event, listener ); } } private void dispatch( RepositoryEvent event, RepositoryListener listener ) { try { switch ( event.getType() ) { case ARTIFACT_DEPLOYED: listener.artifactDeployed( event ); break; case ARTIFACT_DEPLOYING: listener.artifactDeploying( event ); break; case ARTIFACT_DESCRIPTOR_INVALID: listener.artifactDescriptorInvalid( event ); break; case ARTIFACT_DESCRIPTOR_MISSING: listener.artifactDescriptorMissing( event ); break; case ARTIFACT_DOWNLOADED: listener.artifactDownloaded( event ); break; case ARTIFACT_DOWNLOADING: listener.artifactDownloading( event ); break; case ARTIFACT_INSTALLED: listener.artifactInstalled( event ); break; case ARTIFACT_INSTALLING: listener.artifactInstalling( event ); break; case ARTIFACT_RESOLVED: listener.artifactResolved( event ); break; case ARTIFACT_RESOLVING: listener.artifactResolving( event ); break; case METADATA_DEPLOYED: listener.metadataDeployed( event ); break; case METADATA_DEPLOYING: listener.metadataDeploying( event ); break; case METADATA_DOWNLOADED: listener.metadataDownloaded( event ); break; case METADATA_DOWNLOADING: listener.metadataDownloading( event ); break; case METADATA_INSTALLED: listener.metadataInstalled( event ); break; case METADATA_INSTALLING: listener.metadataInstalling( event ); break; case METADATA_INVALID: listener.metadataInvalid( event ); break; case METADATA_RESOLVED: listener.metadataResolved( event ); break; case METADATA_RESOLVING: listener.metadataResolving( event ); break; default: throw new IllegalStateException( "unknown repository event type " + event.getType() ); } } catch ( Exception e ) { logError( e, listener ); } catch ( LinkageError e ) { logError( e, listener ); } } private void logError( Throwable e, Object listener ) { String msg = "Failed to dispatch repository event to " + listener.getClass().getCanonicalName() + ": " + e.getMessage(); if ( logger.isDebugEnabled() ) { logger.warn( msg, e ); } else { logger.warn( msg ); } } } DefaultRepositorySystem.java000066400000000000000000000464021167050556700340650ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/internalpackage org.sonatype.aether.impl.internal; /******************************************************************************* * 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.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.component.annotations.Requirement; import org.sonatype.aether.RepositorySystem; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.RequestTrace; import org.sonatype.aether.SyncContext; 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.graph.DependencyVisitor; import org.sonatype.aether.impl.ArtifactDescriptorReader; import org.sonatype.aether.impl.ArtifactResolver; import org.sonatype.aether.impl.DependencyCollector; import org.sonatype.aether.impl.Deployer; import org.sonatype.aether.impl.Installer; import org.sonatype.aether.impl.LocalRepositoryProvider; import org.sonatype.aether.impl.MetadataResolver; import org.sonatype.aether.impl.SyncContextFactory; import org.sonatype.aether.impl.VersionRangeResolver; import org.sonatype.aether.impl.VersionResolver; import org.sonatype.aether.installation.InstallRequest; import org.sonatype.aether.installation.InstallResult; import org.sonatype.aether.installation.InstallationException; import org.sonatype.aether.repository.LocalRepository; import org.sonatype.aether.repository.LocalRepositoryManager; import org.sonatype.aether.repository.NoLocalRepositoryManagerException; 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; import org.sonatype.aether.spi.locator.Service; import org.sonatype.aether.spi.locator.ServiceLocator; import org.sonatype.aether.spi.log.Logger; import org.sonatype.aether.spi.log.NullLogger; import org.sonatype.aether.util.DefaultRequestTrace; import org.sonatype.aether.util.graph.FilteringDependencyVisitor; import org.sonatype.aether.util.graph.TreeDependencyVisitor; /** * @author Benjamin Bentmann */ @Component( role = RepositorySystem.class ) public class DefaultRepositorySystem implements RepositorySystem, Service { @SuppressWarnings( "unused" ) @Requirement private Logger logger = NullLogger.INSTANCE; @Requirement private VersionResolver versionResolver; @Requirement private VersionRangeResolver versionRangeResolver; @Requirement private ArtifactResolver artifactResolver; @Requirement private MetadataResolver metadataResolver; @Requirement private ArtifactDescriptorReader artifactDescriptorReader; @Requirement private DependencyCollector dependencyCollector; @Requirement private Installer installer; @Requirement private Deployer deployer; @Requirement private LocalRepositoryProvider localRepositoryProvider; @Requirement private SyncContextFactory syncContextFactory; public DefaultRepositorySystem() { // enables default constructor } public DefaultRepositorySystem( Logger logger, VersionResolver versionResolver, VersionRangeResolver versionRangeResolver, ArtifactResolver artifactResolver, MetadataResolver metadataResolver, ArtifactDescriptorReader artifactDescriptorReader, DependencyCollector dependencyCollector, Installer installer, Deployer deployer, LocalRepositoryProvider localRepositoryProvider, SyncContextFactory syncContextFactory ) { setLogger( logger ); setVersionResolver( versionResolver ); setVersionRangeResolver( versionRangeResolver ); setArtifactResolver( artifactResolver ); setMetadataResolver( metadataResolver ); setArtifactDescriptorReader( artifactDescriptorReader ); setDependencyCollector( dependencyCollector ); setInstaller( installer ); setDeployer( deployer ); setLocalRepositoryProvider( localRepositoryProvider ); setSyncContextFactory( syncContextFactory ); } public void initService( ServiceLocator locator ) { setLogger( locator.getService( Logger.class ) ); setVersionResolver( locator.getService( VersionResolver.class ) ); setVersionRangeResolver( locator.getService( VersionRangeResolver.class ) ); setArtifactResolver( locator.getService( ArtifactResolver.class ) ); setMetadataResolver( locator.getService( MetadataResolver.class ) ); setArtifactDescriptorReader( locator.getService( ArtifactDescriptorReader.class ) ); setDependencyCollector( locator.getService( DependencyCollector.class ) ); setInstaller( locator.getService( Installer.class ) ); setDeployer( locator.getService( Deployer.class ) ); setLocalRepositoryProvider( locator.getService( LocalRepositoryProvider.class ) ); setSyncContextFactory( locator.getService( SyncContextFactory.class ) ); } public DefaultRepositorySystem setLogger( Logger logger ) { this.logger = ( logger != null ) ? logger : NullLogger.INSTANCE; return this; } public DefaultRepositorySystem setVersionResolver( VersionResolver versionResolver ) { if ( versionResolver == null ) { throw new IllegalArgumentException( "version resolver has not been specified" ); } this.versionResolver = versionResolver; return this; } public DefaultRepositorySystem setVersionRangeResolver( VersionRangeResolver versionRangeResolver ) { if ( versionRangeResolver == null ) { throw new IllegalArgumentException( "version range resolver has not been specified" ); } this.versionRangeResolver = versionRangeResolver; return this; } public DefaultRepositorySystem setArtifactResolver( ArtifactResolver artifactResolver ) { if ( artifactResolver == null ) { throw new IllegalArgumentException( "artifact resolver has not been specified" ); } this.artifactResolver = artifactResolver; return this; } public DefaultRepositorySystem setMetadataResolver( MetadataResolver metadataResolver ) { if ( metadataResolver == null ) { throw new IllegalArgumentException( "metadata resolver has not been specified" ); } this.metadataResolver = metadataResolver; return this; } public DefaultRepositorySystem setArtifactDescriptorReader( ArtifactDescriptorReader artifactDescriptorReader ) { if ( artifactDescriptorReader == null ) { throw new IllegalArgumentException( "artifact descriptor reader has not been specified" ); } this.artifactDescriptorReader = artifactDescriptorReader; return this; } public DefaultRepositorySystem setDependencyCollector( DependencyCollector dependencyCollector ) { if ( dependencyCollector == null ) { throw new IllegalArgumentException( "dependency collector has not been specified" ); } this.dependencyCollector = dependencyCollector; return this; } public DefaultRepositorySystem setInstaller( Installer installer ) { if ( installer == null ) { throw new IllegalArgumentException( "installer has not been specified" ); } this.installer = installer; return this; } public DefaultRepositorySystem setDeployer( Deployer deployer ) { if ( deployer == null ) { throw new IllegalArgumentException( "deployer has not been specified" ); } this.deployer = deployer; return this; } public DefaultRepositorySystem setLocalRepositoryProvider( LocalRepositoryProvider localRepositoryProvider ) { if ( localRepositoryProvider == null ) { throw new IllegalArgumentException( "local repository provider has not been specified" ); } this.localRepositoryProvider = localRepositoryProvider; return this; } public DefaultRepositorySystem setSyncContextFactory( SyncContextFactory syncContextFactory ) { if ( syncContextFactory == null ) { throw new IllegalArgumentException( "sync context factory has not been specified" ); } this.syncContextFactory = syncContextFactory; return this; } public VersionResult resolveVersion( RepositorySystemSession session, VersionRequest request ) throws VersionResolutionException { validateSession( session ); return versionResolver.resolveVersion( session, request ); } public VersionRangeResult resolveVersionRange( RepositorySystemSession session, VersionRangeRequest request ) throws VersionRangeResolutionException { validateSession( session ); return versionRangeResolver.resolveVersionRange( session, request ); } public ArtifactDescriptorResult readArtifactDescriptor( RepositorySystemSession session, ArtifactDescriptorRequest request ) throws ArtifactDescriptorException { validateSession( session ); return artifactDescriptorReader.readArtifactDescriptor( session, request ); } public ArtifactResult resolveArtifact( RepositorySystemSession session, ArtifactRequest request ) throws ArtifactResolutionException { validateSession( session ); return artifactResolver.resolveArtifact( session, request ); } public List resolveArtifacts( RepositorySystemSession session, Collection requests ) throws ArtifactResolutionException { validateSession( session ); return artifactResolver.resolveArtifacts( session, requests ); } public List resolveMetadata( RepositorySystemSession session, Collection requests ) { validateSession( session ); return metadataResolver.resolveMetadata( session, requests ); } public CollectResult collectDependencies( RepositorySystemSession session, CollectRequest request ) throws DependencyCollectionException { validateSession( session ); return dependencyCollector.collectDependencies( session, request ); } public DependencyResult resolveDependencies( RepositorySystemSession session, DependencyRequest request ) throws DependencyResolutionException { validateSession( session ); RequestTrace trace = DefaultRequestTrace.newChild( request.getTrace(), request ); DependencyResult result = new DependencyResult( request ); DependencyCollectionException dce = null; ArtifactResolutionException are = null; if ( request.getRoot() != null ) { result.setRoot( request.getRoot() ); } else if ( request.getCollectRequest() != null ) { CollectResult collectResult; try { request.getCollectRequest().setTrace( trace ); collectResult = dependencyCollector.collectDependencies( session, request.getCollectRequest() ); } catch ( DependencyCollectionException e ) { dce = e; collectResult = e.getResult(); } result.setRoot( collectResult.getRoot() ); result.setCollectExceptions( collectResult.getExceptions() ); } else { throw new IllegalArgumentException( "dependency node or collect request missing" ); } ArtifactRequestBuilder builder = new ArtifactRequestBuilder( trace ); DependencyFilter filter = request.getFilter(); DependencyVisitor visitor = ( filter != null ) ? new FilteringDependencyVisitor( builder, filter ) : builder; visitor = new TreeDependencyVisitor( visitor ); result.getRoot().accept( visitor ); List requests = builder.getRequests(); List results; try { results = artifactResolver.resolveArtifacts( session, requests ); } catch ( ArtifactResolutionException e ) { are = e; results = e.getResults(); } result.setArtifactResults( results ); updateNodesWithResolvedArtifacts( results ); if ( dce != null ) { throw new DependencyResolutionException( result, dce ); } else if ( are != null ) { throw new DependencyResolutionException( result, are ); } return result; } public List resolveDependencies( RepositorySystemSession session, DependencyNode node, DependencyFilter filter ) throws ArtifactResolutionException { validateSession( session ); RequestTrace trace = DefaultRequestTrace.newChild( null, node ); ArtifactRequestBuilder builder = new ArtifactRequestBuilder( trace ); DependencyVisitor visitor = ( filter != null ) ? new FilteringDependencyVisitor( builder, filter ) : builder; visitor = new TreeDependencyVisitor( visitor ); node.accept( visitor ); List requests = builder.getRequests(); try { List results = resolveArtifacts( session, requests ); updateNodesWithResolvedArtifacts( results ); return results; } catch ( ArtifactResolutionException e ) { updateNodesWithResolvedArtifacts( e.getResults() ); throw e; } } private void updateNodesWithResolvedArtifacts( List results ) { for ( ArtifactResult result : results ) { Artifact artifact = result.getArtifact(); if ( artifact != null ) { result.getRequest().getDependencyNode().setArtifact( artifact ); } } } public List resolveDependencies( RepositorySystemSession session, CollectRequest request, DependencyFilter filter ) throws DependencyCollectionException, ArtifactResolutionException { validateSession( session ); CollectResult result = collectDependencies( session, request ); return resolveDependencies( session, result.getRoot(), filter ); } public InstallResult install( RepositorySystemSession session, InstallRequest request ) throws InstallationException { validateSession( session ); return installer.install( session, request ); } public DeployResult deploy( RepositorySystemSession session, DeployRequest request ) throws DeploymentException { validateSession( session ); return deployer.deploy( session, request ); } public LocalRepositoryManager newLocalRepositoryManager( LocalRepository localRepository ) { try { return localRepositoryProvider.newLocalRepositoryManager( localRepository ); } catch ( NoLocalRepositoryManagerException e ) { throw new IllegalArgumentException( e.getMessage(), e ); } } public SyncContext newSyncContext( RepositorySystemSession session, boolean shared ) { validateSession( session ); return syncContextFactory.newInstance( session, shared ); } private void validateSession( RepositorySystemSession session ) { if ( session == null ) { throw new IllegalArgumentException( "Invalid repository system session: the session may not be null." ); } if ( session.getLocalRepositoryManager() == null ) { invalidSession( "LocalRepositoryManager" ); } if ( session.getSystemProperties() == null ) { invalidSession( "SystemProperties" ); } if ( session.getUserProperties() == null ) { invalidSession( "UserProperties" ); } if ( session.getConfigProperties() == null ) { invalidSession( "ConfigProperties" ); } if ( session.getMirrorSelector() == null ) { invalidSession( "MirrorSelector" ); } if ( session.getProxySelector() == null ) { invalidSession( "ProxySelector" ); } if ( session.getAuthenticationSelector() == null ) { invalidSession( "AuthenticationSelector" ); } if ( session.getArtifactTypeRegistry() == null ) { invalidSession( "ArtifactTypeRegistry" ); } if ( session.getDependencyTraverser() == null ) { invalidSession( "DependencyTraverser" ); } if ( session.getDependencyManager() == null ) { invalidSession( "DependencyManager" ); } if ( session.getDependencySelector() == null ) { invalidSession( "DependencySelector" ); } if ( session.getDependencyGraphTransformer() == null ) { invalidSession( "DependencyGraphTransformer" ); } if ( session.getData() == null ) { invalidSession( "Data" ); } } private void invalidSession( String name ) { throw new IllegalArgumentException( "Invalid repository system session: " + name + " is not set." ); } } aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/internal/DefaultServiceLocator.java000066400000000000000000000166041167050556700335050ustar00rootroot00000000000000package org.sonatype.aether.impl.internal; /******************************************************************************* * 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.Arrays; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import org.sonatype.aether.RepositorySystem; import org.sonatype.aether.impl.ArtifactResolver; import org.sonatype.aether.impl.DependencyCollector; import org.sonatype.aether.impl.Deployer; import org.sonatype.aether.impl.Installer; import org.sonatype.aether.impl.LocalRepositoryProvider; import org.sonatype.aether.impl.MetadataResolver; import org.sonatype.aether.impl.RemoteRepositoryManager; import org.sonatype.aether.impl.RepositoryEventDispatcher; import org.sonatype.aether.impl.SyncContextFactory; import org.sonatype.aether.impl.UpdateCheckManager; import org.sonatype.aether.spi.io.FileProcessor; import org.sonatype.aether.spi.localrepo.LocalRepositoryManagerFactory; import org.sonatype.aether.spi.locator.Service; import org.sonatype.aether.spi.locator.ServiceLocator; /** * A simple service locator that is already setup with all components from this library. To acquire a complete * repository system, clients need to add an artifact descriptor, a version resolver, a version range resolver and some * repository connectors. * * @author Benjamin Bentmann */ public class DefaultServiceLocator implements ServiceLocator { private Map, Collection>> classes; private Map, List> instances; /** * Creates a new service locator that already knows about all service implementations included this library. */ public DefaultServiceLocator() { classes = new HashMap, Collection>>(); instances = new HashMap, List>(); addService( RepositorySystem.class, DefaultRepositorySystem.class ); addService( ArtifactResolver.class, DefaultArtifactResolver.class ); addService( DependencyCollector.class, DefaultDependencyCollector.class ); addService( Deployer.class, DefaultDeployer.class ); addService( Installer.class, DefaultInstaller.class ); addService( MetadataResolver.class, DefaultMetadataResolver.class ); addService( RemoteRepositoryManager.class, DefaultRemoteRepositoryManager.class ); addService( UpdateCheckManager.class, DefaultUpdateCheckManager.class ); addService( FileProcessor.class, DefaultFileProcessor.class ); addService( SyncContextFactory.class, DefaultSyncContextFactory.class ); addService( RepositoryEventDispatcher.class, DefaultRepositoryEventDispatcher.class ); addService( LocalRepositoryProvider.class, DefaultLocalRepositoryProvider.class ); addService( LocalRepositoryManagerFactory.class, SimpleLocalRepositoryManagerFactory.class ); addService( LocalRepositoryManagerFactory.class, EnhancedLocalRepositoryManagerFactory.class ); } /** * Sets the implementation class for a service. * * @param The service type. * @param type The interface describing the service, must not be {@code null}. * @param impl The implementation class of the service, must not be {@code null}. * @return This locator for chaining, never {@code null}. */ public DefaultServiceLocator setService( Class type, Class impl ) { classes.remove( type ); return addService( type, impl ); } /** * Adds the implementation class for a service. * * @param The service type. * @param type The interface describing the service, must not be {@code null}. * @param impl The implementation class of the service, must not be {@code null}. * @return This locator for chaining, never {@code null}. */ public DefaultServiceLocator addService( Class type, Class impl ) { if ( impl == null ) { throw new IllegalArgumentException( "implementation class must not be null" ); } Collection> impls = classes.get( type ); if ( impls == null ) { impls = new LinkedHashSet>(); classes.put( type, impls ); } impls.add( impl ); return this; } /** * Sets the instances for a service. * * @param The service type. * @param type The interface describing the service, must not be {@code null}. * @param services The instances of the service, must not be {@code null}. * @return This locator for chaining, never {@code null}. */ public DefaultServiceLocator setServices( Class type, T... services ) { synchronized ( instances ) { instances.put( type, Arrays.asList( services ) ); } return this; } public T getService( Class type ) { List objs = getServices( type ); return objs.isEmpty() ? null : objs.get( 0 ); } public List getServices( Class type ) { synchronized ( instances ) { @SuppressWarnings( "unchecked" ) List objs = (List) instances.get( type ); if ( objs == null ) { Iterator it; Collection> impls = classes.get( type ); if ( impls == null || impls.isEmpty() ) { objs = Collections.emptyList(); it = objs.iterator(); } else { objs = new ArrayList( impls.size() ); for ( Class impl : impls ) { try { Object obj = impl.newInstance(); objs.add( type.cast( obj ) ); } catch ( Exception e ) { serviceCreationFailed( type, impl, e ); } } it = objs.iterator(); objs = Collections.unmodifiableList( objs ); } instances.put( type, objs ); while ( it.hasNext() ) { T obj = it.next(); if ( obj instanceof Service ) { try { ( (Service) obj ).initService( this ); } catch ( Exception e ) { it.remove(); serviceCreationFailed( type, obj.getClass(), e ); } } } } return objs; } } protected void serviceCreationFailed( Class type, Class impl, Throwable exception ) { exception.printStackTrace(); } } DefaultSyncContextFactory.java000066400000000000000000000030011167050556700342760ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/internalpackage org.sonatype.aether.impl.internal; /******************************************************************************* * 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.codehaus.plexus.component.annotations.Component; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.SyncContext; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.impl.SyncContextFactory; import org.sonatype.aether.metadata.Metadata; /** * A factory to create synchronization contexts. This default implementation actually does not provide any real * synchronization but merely completes the repository system. */ @Component( role = SyncContextFactory.class ) public class DefaultSyncContextFactory implements SyncContextFactory { public SyncContext newInstance( RepositorySystemSession session, boolean shared ) { return new DefaultSyncContext(); } static class DefaultSyncContext implements SyncContext { public void acquire( Collection artifact, Collection metadata ) { } public void release() { } } } DefaultUpdateCheckManager.java000066400000000000000000000547031167050556700341570ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/internalpackage org.sonatype.aether.impl.internal; /******************************************************************************* * 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.Calendar; import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Properties; import java.util.Set; import java.util.TreeSet; import java.util.concurrent.ConcurrentHashMap; import org.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.component.annotations.Requirement; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.SessionData; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.impl.UpdateCheck; import org.sonatype.aether.impl.UpdateCheckManager; import org.sonatype.aether.metadata.Metadata; import org.sonatype.aether.repository.Authentication; import org.sonatype.aether.repository.Proxy; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.repository.RepositoryPolicy; import org.sonatype.aether.spi.locator.Service; import org.sonatype.aether.spi.locator.ServiceLocator; import org.sonatype.aether.spi.log.Logger; import org.sonatype.aether.spi.log.NullLogger; import org.sonatype.aether.transfer.ArtifactNotFoundException; import org.sonatype.aether.transfer.ArtifactTransferException; import org.sonatype.aether.transfer.MetadataNotFoundException; import org.sonatype.aether.transfer.MetadataTransferException; /** * @author Benjamin Bentmann */ @Component( role = UpdateCheckManager.class ) public class DefaultUpdateCheckManager implements UpdateCheckManager, Service { @Requirement private Logger logger = NullLogger.INSTANCE; private static final String UPDATED_KEY_SUFFIX = ".lastUpdated"; private static final String ERROR_KEY_SUFFIX = ".error"; private static final String NOT_FOUND = ""; private static final String SESSION_CHECKS = "updateCheckManager.checks"; public DefaultUpdateCheckManager() { // enables default constructor } public DefaultUpdateCheckManager( Logger logger ) { setLogger( logger ); } public void initService( ServiceLocator locator ) { setLogger( locator.getService( Logger.class ) ); } public DefaultUpdateCheckManager setLogger( Logger logger ) { this.logger = ( logger != null ) ? logger : NullLogger.INSTANCE; return this; } public String getEffectiveUpdatePolicy( RepositorySystemSession session, String policy1, String policy2 ) { return ordinalOfUpdatePolicy( policy1 ) < ordinalOfUpdatePolicy( policy2 ) ? policy1 : policy2; } private int ordinalOfUpdatePolicy( String policy ) { if ( RepositoryPolicy.UPDATE_POLICY_DAILY.equals( policy ) ) { return 1440; } else if ( RepositoryPolicy.UPDATE_POLICY_ALWAYS.equals( policy ) ) { return 0; } else if ( policy != null && policy.startsWith( RepositoryPolicy.UPDATE_POLICY_INTERVAL ) ) { String s = policy.substring( RepositoryPolicy.UPDATE_POLICY_INTERVAL.length() + 1 ); return Integer.valueOf( s ); } else { // assume "never" return Integer.MAX_VALUE; } } public void checkArtifact( RepositorySystemSession session, UpdateCheck check ) { if ( check.getLocalLastUpdated() != 0 && !isUpdatedRequired( session, check.getLocalLastUpdated(), check.getPolicy() ) ) { if ( logger.isDebugEnabled() ) { logger.debug( "Skipped remote update check for " + check.getItem() + ", locally installed artifact up-to-date." ); } check.setRequired( false ); return; } Artifact artifact = check.getItem(); RemoteRepository repository = check.getRepository(); File artifactFile = check.getFile(); if ( artifactFile == null ) { throw new IllegalArgumentException( String.format( "The artifact '%s' has no file attached", artifact ) ); } boolean fileExists = check.isFileValid() && artifactFile.exists(); File touchFile = getTouchFile( artifact, artifactFile ); Properties props = read( touchFile ); String updateKey = getUpdateKey( artifactFile, repository ); String dataKey = getDataKey( artifact, artifactFile, repository ); String error = getError( props, dataKey ); long lastUpdated; if ( fileExists ) { lastUpdated = artifactFile.lastModified(); } else if ( error == null ) { // this is the first attempt ever lastUpdated = 0; } else if ( error.length() <= 0 ) { // artifact did not exist lastUpdated = getLastUpdated( props, dataKey ); } else { // artifact could not be transferred String transferKey = getTransferKey( artifact, artifactFile, repository ); lastUpdated = getLastUpdated( props, transferKey ); } if ( isAlreadyUpdated( session.getData(), updateKey ) ) { if ( logger.isDebugEnabled() ) { logger.debug( "Skipped remote update check for " + check.getItem() + ", already updated during this session." ); } check.setRequired( false ); if ( error != null ) { check.setException( newException( error, artifact, repository ) ); } } else if ( lastUpdated == 0 ) { check.setRequired( true ); } else if ( isUpdatedRequired( session, lastUpdated, check.getPolicy() ) ) { check.setRequired( true ); } else if ( fileExists ) { if ( logger.isDebugEnabled() ) { logger.debug( "Skipped remote update check for " + check.getItem() + ", locally cached artifact up-to-date." ); } check.setRequired( false ); } else { if ( error == null || error.length() <= 0 ) { if ( session.isNotFoundCachingEnabled() ) { check.setRequired( false ); check.setException( newException( error, artifact, repository ) ); } else { check.setRequired( true ); } } else { if ( session.isTransferErrorCachingEnabled() ) { check.setRequired( false ); check.setException( newException( error, artifact, repository ) ); } else { check.setRequired( true ); } } } } private ArtifactTransferException newException( String error, Artifact artifact, RemoteRepository repository ) { if ( error == null || error.length() <= 0 ) { return new ArtifactNotFoundException( artifact, repository, "Failure to find " + artifact + " in " + repository.getUrl() + " was cached in the local repository, " + "resolution will not be reattempted until the update interval of " + repository.getId() + " has elapsed or updates are forced" ); } else { return new ArtifactTransferException( artifact, repository, "Failure to transfer " + artifact + " from " + repository.getUrl() + " was cached in the local repository, " + "resolution will not be reattempted until the update interval of " + repository.getId() + " has elapsed or updates are forced. Original error: " + error ); } } public void checkMetadata( RepositorySystemSession session, UpdateCheck check ) { if ( check.getLocalLastUpdated() != 0 && !isUpdatedRequired( session, check.getLocalLastUpdated(), check.getPolicy() ) ) { if ( logger.isDebugEnabled() ) { logger.debug( "Skipped remote update check for " + check.getItem() + ", locally installed metadata up-to-date." ); } check.setRequired( false ); return; } Metadata metadata = check.getItem(); RemoteRepository repository = check.getRepository(); File metadataFile = check.getFile(); if ( metadataFile == null ) { throw new IllegalArgumentException( String.format( "The metadata '%s' has no file attached", metadata ) ); } boolean fileExists = check.isFileValid() && metadataFile.exists(); File touchFile = getTouchFile( metadata, metadataFile ); Properties props = read( touchFile ); String updateKey = getUpdateKey( metadataFile, repository ); String dataKey = getDataKey( metadata, metadataFile, check.getAuthoritativeRepository() ); String error = getError( props, dataKey ); long lastUpdated; if ( error == null ) { if ( fileExists ) { // last update was successful lastUpdated = getLastUpdated( props, dataKey ); } else { // this is the first attempt ever lastUpdated = 0; } } else if ( error.length() <= 0 ) { // metadata did not exist lastUpdated = getLastUpdated( props, dataKey ); } else { // metadata could not be transferred String transferKey = getTransferKey( metadata, metadataFile, repository ); lastUpdated = getLastUpdated( props, transferKey ); } if ( isAlreadyUpdated( session.getData(), updateKey ) ) { if ( logger.isDebugEnabled() ) { logger.debug( "Skipped remote update check for " + check.getItem() + ", already updated during this session." ); } check.setRequired( false ); if ( error != null ) { check.setException( newException( error, metadata, repository ) ); } } else if ( lastUpdated == 0 ) { check.setRequired( true ); } else if ( isUpdatedRequired( session, lastUpdated, check.getPolicy() ) ) { check.setRequired( true ); } else if ( fileExists ) { if ( logger.isDebugEnabled() ) { logger.debug( "Skipped remote update check for " + check.getItem() + ", locally cached metadata up-to-date." ); } check.setRequired( false ); } else { if ( error == null || error.length() <= 0 ) { check.setRequired( false ); check.setException( newException( error, metadata, repository ) ); } else { if ( session.isTransferErrorCachingEnabled() ) { check.setRequired( false ); check.setException( newException( error, metadata, repository ) ); } else { check.setRequired( true ); } } } } private MetadataTransferException newException( String error, Metadata metadata, RemoteRepository repository ) { if ( error == null || error.length() <= 0 ) { return new MetadataNotFoundException( metadata, repository, "Failure to find " + metadata + " in " + repository.getUrl() + " was cached in the local repository, " + "resolution will not be reattempted until the update interval of " + repository.getId() + " has elapsed or updates are forced" ); } else { return new MetadataTransferException( metadata, repository, "Failure to transfer " + metadata + " from " + repository.getUrl() + " was cached in the local repository, " + "resolution will not be reattempted until the update interval of " + repository.getId() + " has elapsed or updates are forced. Original error: " + error ); } } private long getLastUpdated( Properties props, String key ) { String value = props.getProperty( key + UPDATED_KEY_SUFFIX, "" ); try { return ( value.length() > 0 ) ? Long.parseLong( value ) : 1; } catch ( NumberFormatException e ) { logger.debug( "Cannot parse lastUpdated date: \'" + value + "\'. Ignoring.", e ); return 1; } } private String getError( Properties props, String key ) { return props.getProperty( key + ERROR_KEY_SUFFIX ); } private File getTouchFile( Artifact artifact, File artifactFile ) { return new File( artifactFile.getPath() + ".lastUpdated" ); } private File getTouchFile( Metadata metadata, File metadataFile ) { return new File( metadataFile.getParent(), "resolver-status.properties" ); } private String getDataKey( Artifact artifact, File artifactFile, RemoteRepository repository ) { Set mirroredUrls = Collections.emptySet(); if ( repository.isRepositoryManager() ) { mirroredUrls = new TreeSet(); for ( RemoteRepository mirroredRepository : repository.getMirroredRepositories() ) { mirroredUrls.add( normalizeRepoUrl( mirroredRepository.getUrl() ) ); } } StringBuilder buffer = new StringBuilder( 1024 ); buffer.append( normalizeRepoUrl( repository.getUrl() ) ); for ( String mirroredUrl : mirroredUrls ) { buffer.append( '+' ).append( mirroredUrl ); } return buffer.toString(); } private String getTransferKey( Artifact artifact, File artifactFile, RemoteRepository repository ) { return getRepoKey( repository ); } private String getDataKey( Metadata metadata, File metadataFile, RemoteRepository repository ) { return metadataFile.getName(); } private String getTransferKey( Metadata metadata, File metadataFile, RemoteRepository repository ) { return metadataFile.getName() + '/' + getRepoKey( repository ); } private String getRepoKey( RemoteRepository repository ) { StringBuilder buffer = new StringBuilder( 128 ); Proxy proxy = repository.getProxy(); if ( proxy != null ) { appendAuth( buffer, proxy.getAuthentication() ); buffer.append( proxy.getHost() ).append( ':' ).append( proxy.getPort() ).append( '>' ); } Authentication auth = repository.getAuthentication(); appendAuth( buffer, auth ); buffer.append( repository.getContentType() ).append( '-' ); buffer.append( normalizeRepoUrl( repository.getUrl() ) ); return buffer.toString(); } private String normalizeRepoUrl( String url ) { String result = url; if ( url != null && !url.endsWith( "/" ) ) { result = url + '/'; } return result; } private void appendAuth( StringBuilder buffer, Authentication auth ) { if ( auth != null ) { SimpleDigest digest = new SimpleDigest(); digest.update( auth.getUsername() ); digest.update( auth.getPassword() ); digest.update( auth.getPrivateKeyFile() ); digest.update( auth.getPassphrase() ); buffer.append( digest.digest() ).append( '@' ); } } private String getUpdateKey( File file, RemoteRepository repository ) { return file.getAbsolutePath() + '|' + getRepoKey( repository ); } private boolean isAlreadyUpdated( SessionData data, Object updateKey ) { Object checkedFiles = data.get( SESSION_CHECKS ); if ( !( checkedFiles instanceof Map ) ) { return false; } return ( (Map) checkedFiles ).containsKey( updateKey ); } @SuppressWarnings( "unchecked" ) private void setUpdated( SessionData data, Object updateKey ) { Object checkedFiles = data.get( SESSION_CHECKS ); while ( !( checkedFiles instanceof Map ) ) { Object old = checkedFiles; checkedFiles = new ConcurrentHashMap( 256 ); if ( data.set( SESSION_CHECKS, old, checkedFiles ) ) { break; } checkedFiles = data.get( SESSION_CHECKS ); } ( (Map) checkedFiles ).put( updateKey, Boolean.TRUE ); } public boolean isUpdatedRequired( RepositorySystemSession session, long lastModified, String policy ) { boolean checkForUpdates; if ( policy == null ) { policy = ""; } if ( RepositoryPolicy.UPDATE_POLICY_ALWAYS.equals( policy ) ) { checkForUpdates = true; } else if ( RepositoryPolicy.UPDATE_POLICY_DAILY.equals( policy ) ) { Calendar cal = Calendar.getInstance(); cal.set( Calendar.HOUR_OF_DAY, 0 ); cal.set( Calendar.MINUTE, 0 ); cal.set( Calendar.SECOND, 0 ); cal.set( Calendar.MILLISECOND, 0 ); checkForUpdates = cal.getTimeInMillis() > lastModified; } else if ( policy.startsWith( RepositoryPolicy.UPDATE_POLICY_INTERVAL ) ) { int minutes; try { String s = policy.substring( RepositoryPolicy.UPDATE_POLICY_INTERVAL.length() + 1 ); minutes = Integer.valueOf( s ); } catch ( RuntimeException e ) { minutes = 24 * 60; logger.warn( "Non-parseable repository update policy '" + policy + "', assuming '" + RepositoryPolicy.UPDATE_POLICY_INTERVAL + ":1440'" ); } Calendar cal = Calendar.getInstance(); cal.add( Calendar.MINUTE, -minutes ); checkForUpdates = cal.getTimeInMillis() > lastModified; } else { // assume "never" checkForUpdates = false; if ( !RepositoryPolicy.UPDATE_POLICY_NEVER.equals( policy ) ) { logger.warn( "Unknown repository update policy '" + policy + "', assuming '" + RepositoryPolicy.UPDATE_POLICY_NEVER + "'" ); } } return checkForUpdates; } private Properties read( File touchFile ) { Properties props = new TrackingFileManager().setLogger( logger ).read( touchFile ); return ( props != null ) ? props : new Properties(); } public void touchArtifact( RepositorySystemSession session, UpdateCheck check ) { Artifact artifact = check.getItem(); File artifactFile = check.getFile(); File touchFile = getTouchFile( artifact, artifactFile ); String updateKey = getUpdateKey( artifactFile, check.getRepository() ); String dataKey = getDataKey( artifact, artifactFile, check.getAuthoritativeRepository() ); String transferKey = getTransferKey( artifact, artifactFile, check.getRepository() ); setUpdated( session.getData(), updateKey ); Properties props = write( touchFile, dataKey, transferKey, check.getException() ); if ( artifactFile.exists() && !hasErrors( props ) ) { touchFile.delete(); } } private boolean hasErrors( Properties props ) { for ( Object key : props.keySet() ) { if ( key.toString().endsWith( ERROR_KEY_SUFFIX ) ) { return true; } } return false; } public void touchMetadata( RepositorySystemSession session, UpdateCheck check ) { Metadata metadata = check.getItem(); File metadataFile = check.getFile(); File touchFile = getTouchFile( metadata, metadataFile ); String updateKey = getUpdateKey( metadataFile, check.getRepository() ); String dataKey = getDataKey( metadata, metadataFile, check.getAuthoritativeRepository() ); String transferKey = getTransferKey( metadata, metadataFile, check.getRepository() ); setUpdated( session.getData(), updateKey ); write( touchFile, dataKey, transferKey, check.getException() ); } private Properties write( File touchFile, String dataKey, String transferKey, Exception error ) { Map updates = new HashMap(); String timestamp = Long.toString( System.currentTimeMillis() ); if ( error == null ) { updates.put( dataKey + ERROR_KEY_SUFFIX, null ); updates.put( dataKey + UPDATED_KEY_SUFFIX, timestamp ); updates.put( transferKey + UPDATED_KEY_SUFFIX, null ); } else if ( error instanceof ArtifactNotFoundException || error instanceof MetadataNotFoundException ) { updates.put( dataKey + ERROR_KEY_SUFFIX, NOT_FOUND ); updates.put( dataKey + UPDATED_KEY_SUFFIX, timestamp ); updates.put( transferKey + UPDATED_KEY_SUFFIX, null ); } else { String msg = error.getMessage(); if ( msg == null || msg.length() <= 0 ) { msg = error.getClass().getSimpleName(); } updates.put( dataKey + ERROR_KEY_SUFFIX, msg ); updates.put( dataKey + UPDATED_KEY_SUFFIX, null ); updates.put( transferKey + UPDATED_KEY_SUFFIX, timestamp ); } return new TrackingFileManager().setLogger( logger ).update( touchFile, updates ); } } aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/internal/EdgeStack.java000066400000000000000000000047571167050556700311140ustar00rootroot00000000000000package org.sonatype.aether.impl.internal; /******************************************************************************* * 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.Arrays; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.graph.Dependency; /** * @author Benjamin Bentmann * @see DefaultDependencyCollector */ class EdgeStack { private GraphEdge[] edges = new GraphEdge[64]; private int size; public GraphEdge top() { if ( size <= 0 ) { throw new IllegalStateException( "stack empty" ); } return edges[size - 1]; } public void push( GraphEdge edge ) { if ( size >= edges.length ) { GraphEdge[] tmp = new GraphEdge[size + 64]; System.arraycopy( edges, 0, tmp, 0, edges.length ); edges = tmp; } edges[size++] = edge; } public void pop() { if ( size <= 0 ) { throw new IllegalStateException( "stack empty" ); } size--; } public GraphEdge find( Artifact artifact ) { for ( int i = size - 1; i >= 0; i-- ) { GraphEdge edge = edges[i]; Dependency dependency = edge.getDependency(); if ( dependency == null ) { break; } Artifact a = dependency.getArtifact(); if ( !a.getArtifactId().equals( artifact.getArtifactId() ) ) { continue; } if ( !a.getGroupId().equals( artifact.getGroupId() ) ) { continue; } if ( !a.getBaseVersion().equals( artifact.getBaseVersion() ) ) { continue; } if ( !a.getExtension().equals( artifact.getExtension() ) ) { continue; } if ( !a.getClassifier().equals( artifact.getClassifier() ) ) { continue; } return edge; } return null; } @Override public String toString() { return Arrays.toString( edges ); } } EnhancedLocalRepositoryManager.java000066400000000000000000000141021167050556700352370ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/internalpackage org.sonatype.aether.impl.internal; /******************************************************************************* * 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.Collection; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Properties; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.repository.LocalArtifactRegistration; import org.sonatype.aether.repository.LocalArtifactRequest; import org.sonatype.aether.repository.LocalArtifactResult; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.spi.log.Logger; /** * A local repository manager that builds upon the classical Maven 2.0 local repository structure but additionally keeps * track of from what repositories a cached artifact was resolved. Resolution of locally cached artifacts will be * rejected in case the current resolution request does not match the known source repositories of an artifact, thereby * emulating physically separated artifact caches per remote repository. * * @author Benjamin Bentmann */ public class EnhancedLocalRepositoryManager extends SimpleLocalRepositoryManager { private static final String LOCAL_REPO_ID = ""; private TrackingFileManager trackingFileManager; public EnhancedLocalRepositoryManager( File basedir ) { super( basedir, "enhanced" ); trackingFileManager = new TrackingFileManager(); } @Override public EnhancedLocalRepositoryManager setLogger( Logger logger ) { super.setLogger( logger ); trackingFileManager.setLogger( logger ); return this; } @Override public LocalArtifactResult find( RepositorySystemSession session, LocalArtifactRequest request ) { String path = getPathForArtifact( request.getArtifact(), false ); File file = new File( getRepository().getBasedir(), path ); LocalArtifactResult result = new LocalArtifactResult( request ); if ( file.isFile() ) { result.setFile( file ); Properties props = readRepos( file ); if ( props.get( getKey( file, LOCAL_REPO_ID ) ) != null ) { result.setAvailable( true ); } else { String context = request.getContext(); for ( RemoteRepository repository : request.getRepositories() ) { if ( props.get( getKey( file, getRepositoryKey( repository, context ) ) ) != null ) { result.setAvailable( true ); result.setRepository( repository ); break; } } if ( !result.isAvailable() && !isTracked( props, file ) ) { /* * NOTE: The artifact is present but not tracked at all, for inter-op with Maven 2.x, assume the * artifact was locally installed. */ result.setAvailable( true ); } } } return result; } @Override public void add( RepositorySystemSession session, LocalArtifactRegistration request ) { if ( request.getRepository() == null ) { addArtifact( request.getArtifact(), Collections.singleton( LOCAL_REPO_ID ) ); } else { addArtifact( request.getArtifact(), getRepositoryKeys( request.getRepository(), request.getContexts() ) ); } } private Collection getRepositoryKeys( RemoteRepository repository, Collection contexts ) { Collection keys = new HashSet(); if ( contexts != null ) { for ( String context : contexts ) { keys.add( getRepositoryKey( repository, context ) ); } } return keys; } private void addArtifact( Artifact artifact, Collection repositories ) { if ( artifact == null ) { throw new IllegalArgumentException( "artifact to register not specified" ); } String path = getPathForLocalArtifact( artifact ); File file = new File( getRepository().getBasedir(), path ); addRepo( file, repositories ); } private Properties readRepos( File artifactFile ) { File trackingFile = getTrackingFile( artifactFile ); Properties props = trackingFileManager.read( trackingFile ); return ( props != null ) ? props : new Properties(); } private void addRepo( File artifactFile, Collection repositories ) { Map updates = new HashMap(); for ( String repository : repositories ) { updates.put( getKey( artifactFile, repository ), "" ); } File trackingFile = getTrackingFile( artifactFile ); trackingFileManager.update( trackingFile, updates ); } private File getTrackingFile( File artifactFile ) { return new File( artifactFile.getParentFile(), "_maven.repositories" ); } private String getKey( File file, String repository ) { return file.getName() + '>' + repository; } private boolean isTracked( Properties props, File file ) { if ( props != null ) { String keyPrefix = file.getName() + '>'; for ( Object key : props.keySet() ) { if ( key.toString().startsWith( keyPrefix ) ) { return true; } } } return false; } } EnhancedLocalRepositoryManagerFactory.java000066400000000000000000000044301167050556700365720ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/internalpackage org.sonatype.aether.impl.internal; /******************************************************************************* * 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.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.component.annotations.Requirement; import org.sonatype.aether.repository.LocalRepository; import org.sonatype.aether.repository.LocalRepositoryManager; import org.sonatype.aether.repository.NoLocalRepositoryManagerException; import org.sonatype.aether.spi.localrepo.LocalRepositoryManagerFactory; import org.sonatype.aether.spi.locator.Service; import org.sonatype.aether.spi.locator.ServiceLocator; import org.sonatype.aether.spi.log.Logger; import org.sonatype.aether.spi.log.NullLogger; /** * Creates {@link EnhancedLocalRepositoryManager}s for repository types {@code "default"} or {@code "" (automatic)}. * * @author Benjamin Hanzelmann */ @Component( role = LocalRepositoryManagerFactory.class, hint = "enhanced" ) public class EnhancedLocalRepositoryManagerFactory implements LocalRepositoryManagerFactory, Service { @Requirement private Logger logger = NullLogger.INSTANCE; public LocalRepositoryManager newInstance( LocalRepository repository ) throws NoLocalRepositoryManagerException { if ( "".equals( repository.getContentType() ) || "default".equals( repository.getContentType() ) ) { return new EnhancedLocalRepositoryManager( repository.getBasedir() ).setLogger( logger ); } else { throw new NoLocalRepositoryManagerException( repository ); } } public void initService( ServiceLocator locator ) { setLogger( locator.getService( Logger.class ) ); } public EnhancedLocalRepositoryManagerFactory setLogger( Logger logger ) { this.logger = ( logger != null ) ? logger : NullLogger.INSTANCE; return this; } public int getPriority() { return 10; } } aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/internal/GraphEdge.java000066400000000000000000000116351167050556700311010ustar00rootroot00000000000000package org.sonatype.aether.impl.internal; /******************************************************************************* * 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.HashMap; import java.util.List; import java.util.Map; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.graph.Dependency; import org.sonatype.aether.graph.DependencyNode; import org.sonatype.aether.graph.DependencyVisitor; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.version.Version; import org.sonatype.aether.version.VersionConstraint; /** * @author Benjamin Bentmann */ class GraphEdge implements DependencyNode { private GraphNode target; private Dependency dependency; private String context; private String premanagedScope; private String premanagedVersion; private List relocations; private VersionConstraint versionConstraint; private Version version; private Map data = Collections.emptyMap(); public GraphEdge( GraphNode target ) { this.target = target; } public GraphNode getTarget() { return target; } public List getChildren() { return getTarget().getOutgoingEdges(); } public Dependency getDependency() { return dependency; } public void setDependency( Dependency dependency ) { this.dependency = dependency; } public void setArtifact( Artifact artifact ) { this.dependency = dependency.setArtifact( artifact ); } public List getRepositories() { return getTarget().getRepositories(); } public void setScope( String scope ) { this.dependency = dependency.setScope( scope ); } public String getPremanagedScope() { return premanagedScope; } public void setPremanagedScope( String premanagedScope ) { this.premanagedScope = premanagedScope; } public String getPremanagedVersion() { return premanagedVersion; } public void setPremanagedVersion( String premanagedVersion ) { this.premanagedVersion = premanagedVersion; } public String getRequestContext() { return context; } public void setRequestContext( String context ) { this.context = ( context != null ) ? context : ""; } public List getRelocations() { return relocations; } public void setRelocations( List relocations ) { if ( relocations == null || relocations.isEmpty() ) { this.relocations = Collections.emptyList(); } else { this.relocations = relocations; } } public Collection getAliases() { return getTarget().getAliases(); } public VersionConstraint getVersionConstraint() { return versionConstraint; } public void setVersionConstraint( VersionConstraint versionConstraint ) { this.versionConstraint = versionConstraint; } public Version getVersion() { return version; } public void setVersion( Version version ) { this.version = version; } public Map getData() { return data; } public void setData( Object key, Object value ) { if ( key == null ) { throw new IllegalArgumentException( "key must not be null" ); } if ( value == null ) { if ( !data.isEmpty() ) { data.remove( key ); if ( data.isEmpty() ) { data = Collections.emptyMap(); } } } else { if ( data.isEmpty() ) { data = new HashMap(); } data.put( key, value ); } } public boolean accept( DependencyVisitor visitor ) { if ( visitor.visitEnter( this ) ) { for ( DependencyNode child : getChildren() ) { if ( !child.accept( visitor ) ) { break; } } } return visitor.visitLeave( this ); } @Override public String toString() { Dependency dep = getDependency(); if ( dep == null ) { return String.valueOf( getChildren() ); } return dep.toString(); } } aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/internal/GraphNode.java000066400000000000000000000037141167050556700311210ustar00rootroot00000000000000package org.sonatype.aether.impl.internal; /******************************************************************************* * 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 java.util.Collections; import java.util.List; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.graph.DependencyNode; import org.sonatype.aether.repository.RemoteRepository; /** * @author Benjamin Bentmann */ class GraphNode { private List outgoingEdges = new ArrayList( 0 ); private Collection aliases = Collections.emptyList(); private List repositories = Collections.emptyList(); public List getOutgoingEdges() { return outgoingEdges; } public List getRepositories() { return repositories; } public void setRepositories( List repositories ) { if ( repositories == null || repositories.isEmpty() ) { this.repositories = Collections.emptyList(); } else { this.repositories = repositories; } } public Collection getAliases() { return aliases; } public void setAliases( Collection aliases ) { if ( aliases == null || aliases.isEmpty() ) { this.aliases = Collections.emptyList(); } else { this.aliases = aliases; } } @Override public String toString() { return String.valueOf( getOutgoingEdges() ); } } aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/internal/ObjectPool.java000066400000000000000000000025011167050556700313030ustar00rootroot00000000000000package org.sonatype.aether.impl.internal; /******************************************************************************* * 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.lang.ref.Reference; import java.lang.ref.WeakReference; import java.util.Map; import java.util.WeakHashMap; /** * Pool of immutable object instances, used to avoid excessive memory consumption of (dirty) dependency graph which * tends to have many duplicate artifacts/dependencies. * * @author Benjamin Bentmann */ class ObjectPool { private final Map> objects = new WeakHashMap>( 256 ); public synchronized T intern( T object ) { Reference pooledRef = objects.get( object ); if ( pooledRef != null ) { T pooled = pooledRef.get(); if ( pooled != null ) { return pooled; } } objects.put( object, new WeakReference( object ) ); return object; } } aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/internal/PlexusLogger.java000066400000000000000000000026431167050556700316720ustar00rootroot00000000000000package org.sonatype.aether.impl.internal; /******************************************************************************* * 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.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.component.annotations.Requirement; import org.sonatype.aether.spi.log.Logger; /** * A logger that delegates to Plexus logging. * * @author Benjamin Bentmann */ @Component( role = Logger.class ) public class PlexusLogger implements Logger { @Requirement private org.codehaus.plexus.logging.Logger logger; public boolean isDebugEnabled() { return logger.isDebugEnabled(); } public void debug( String msg ) { logger.debug( msg ); } public void debug( String msg, Throwable error ) { logger.debug( msg, error ); } public boolean isWarnEnabled() { return logger.isWarnEnabled(); } public void warn( String msg ) { logger.warn( msg ); } public void warn( String msg, Throwable error ) { logger.warn( msg, error ); } } aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/internal/SimpleDigest.java000066400000000000000000000044101167050556700316350ustar00rootroot00000000000000package org.sonatype.aether.impl.internal; /******************************************************************************* * 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.UnsupportedEncodingException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; /** * A simple digester for strings. * * @author Benjamin Bentmann */ class SimpleDigest { private MessageDigest digest; private long hash; public SimpleDigest() { try { digest = MessageDigest.getInstance( "SHA-1" ); } catch ( NoSuchAlgorithmException e ) { try { digest = MessageDigest.getInstance( "MD5" ); } catch ( NoSuchAlgorithmException ne ) { digest = null; hash = 13; } } } public void update( String data ) { if ( data == null || data.length() <= 0 ) { return; } if ( digest != null ) { try { digest.update( data.getBytes( "UTF-8" ) ); } catch ( UnsupportedEncodingException e ) { // broken JVM } } else { hash = hash * 31 + data.hashCode(); } } public String digest() { if ( digest != null ) { StringBuilder buffer = new StringBuilder( 64 ); byte[] bytes = digest.digest(); for ( int i = 0; i < bytes.length; i++ ) { int b = bytes[i] & 0xFF; if ( b < 0x10 ) { buffer.append( '0' ); } buffer.append( Integer.toHexString( b ) ); } return buffer.toString(); } else { return Long.toHexString( hash ); } } } SimpleLocalRepositoryManager.java000066400000000000000000000167511167050556700347770ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/internalpackage org.sonatype.aether.impl.internal; /******************************************************************************* * 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.SortedSet; import java.util.TreeSet; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.metadata.Metadata; import org.sonatype.aether.repository.LocalArtifactRegistration; import org.sonatype.aether.repository.LocalArtifactRequest; import org.sonatype.aether.repository.LocalArtifactResult; import org.sonatype.aether.repository.LocalMetadataRegistration; import org.sonatype.aether.repository.LocalMetadataRequest; import org.sonatype.aether.repository.LocalMetadataResult; import org.sonatype.aether.repository.LocalRepository; import org.sonatype.aether.repository.LocalRepositoryManager; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.spi.log.Logger; /** * A local repository manager that realizes the classical Maven 2.0 local repository. * * @author Benjamin Bentmann */ public class SimpleLocalRepositoryManager implements LocalRepositoryManager { private final LocalRepository repository; public SimpleLocalRepositoryManager( File basedir ) { this( basedir, "simple" ); } public SimpleLocalRepositoryManager( String basedir ) { this( ( basedir != null ) ? new File( basedir ) : null, "simple" ); } SimpleLocalRepositoryManager( File basedir, String type ) { if ( basedir == null ) { throw new IllegalArgumentException( "base directory has not been specified" ); } repository = new LocalRepository( basedir.getAbsoluteFile(), type ); } public SimpleLocalRepositoryManager setLogger( Logger logger ) { return this; } public LocalRepository getRepository() { return repository; } String getPathForArtifact( Artifact artifact, boolean local ) { StringBuilder path = new StringBuilder( 128 ); path.append( artifact.getGroupId().replace( '.', '/' ) ).append( '/' ); path.append( artifact.getArtifactId() ).append( '/' ); path.append( artifact.getBaseVersion() ).append( '/' ); path.append( artifact.getArtifactId() ).append( '-' ); if ( local ) { path.append( artifact.getBaseVersion() ); } else { path.append( artifact.getVersion() ); } if ( artifact.getClassifier().length() > 0 ) { path.append( '-' ).append( artifact.getClassifier() ); } if ( artifact.getExtension().length() > 0 ) { path.append( '.' ).append( artifact.getExtension() ); } return path.toString(); } public String getPathForLocalArtifact( Artifact artifact ) { return getPathForArtifact( artifact, true ); } public String getPathForRemoteArtifact( Artifact artifact, RemoteRepository repository, String context ) { return getPathForArtifact( artifact, false ); } public String getPathForLocalMetadata( Metadata metadata ) { return getPath( metadata, "local" ); } public String getPathForRemoteMetadata( Metadata metadata, RemoteRepository repository, String context ) { return getPath( metadata, getRepositoryKey( repository, context ) ); } String getRepositoryKey( RemoteRepository repository, String context ) { String key; if ( repository.isRepositoryManager() ) { // repository serves dynamic contents, take request parameters into account for key StringBuilder buffer = new StringBuilder( 128 ); buffer.append( repository.getId() ); buffer.append( '-' ); SortedSet subKeys = new TreeSet(); for ( RemoteRepository mirroredRepo : repository.getMirroredRepositories() ) { subKeys.add( mirroredRepo.getId() ); } SimpleDigest digest = new SimpleDigest(); digest.update( context ); for ( String subKey : subKeys ) { digest.update( subKey ); } buffer.append( digest.digest() ); key = buffer.toString(); } else { // repository serves static contents, its id is sufficient as key key = repository.getId(); } return key; } private String getPath( Metadata metadata, String repositoryKey ) { StringBuilder path = new StringBuilder( 128 ); if ( metadata.getGroupId().length() > 0 ) { path.append( metadata.getGroupId().replace( '.', '/' ) ).append( '/' ); if ( metadata.getArtifactId().length() > 0 ) { path.append( metadata.getArtifactId() ).append( '/' ); if ( metadata.getVersion().length() > 0 ) { path.append( metadata.getVersion() ).append( '/' ); } } } path.append( insertRepositoryKey( metadata.getType(), repositoryKey ) ); return path.toString(); } private String insertRepositoryKey( String filename, String repositoryKey ) { String result; int idx = filename.indexOf( '.' ); if ( idx < 0 ) { result = filename + '-' + repositoryKey; } else { result = filename.substring( 0, idx ) + '-' + repositoryKey + filename.substring( idx ); } return result; } public LocalArtifactResult find( RepositorySystemSession session, LocalArtifactRequest request ) { String path = getPathForArtifact( request.getArtifact(), false ); File file = new File( getRepository().getBasedir(), path ); LocalArtifactResult result = new LocalArtifactResult( request ); if ( file.isFile() ) { result.setFile( file ); result.setAvailable( true ); } return result; } public void add( RepositorySystemSession session, LocalArtifactRegistration request ) { // noop } @Override public String toString() { return String.valueOf( getRepository() ); } public LocalMetadataResult find( RepositorySystemSession session, LocalMetadataRequest request ) { LocalMetadataResult result = new LocalMetadataResult( request ); String path; Metadata metadata = request.getMetadata(); String context = request.getContext(); RemoteRepository remote = request.getRepository(); if ( remote != null ) { path = getPathForRemoteMetadata( metadata, remote, context ); } else { path = getPathForLocalMetadata( metadata ); } File file = new File( getRepository().getBasedir(), path ); if ( file.isFile() ) { result.setFile( file ); } return result; } public void add( RepositorySystemSession session, LocalMetadataRegistration request ) { // noop } } SimpleLocalRepositoryManagerFactory.java000066400000000000000000000043601167050556700363200ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/internalpackage org.sonatype.aether.impl.internal; /******************************************************************************* * 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.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.component.annotations.Requirement; import org.sonatype.aether.repository.LocalRepository; import org.sonatype.aether.repository.LocalRepositoryManager; import org.sonatype.aether.repository.NoLocalRepositoryManagerException; import org.sonatype.aether.spi.localrepo.LocalRepositoryManagerFactory; import org.sonatype.aether.spi.locator.Service; import org.sonatype.aether.spi.locator.ServiceLocator; import org.sonatype.aether.spi.log.Logger; import org.sonatype.aether.spi.log.NullLogger; /** * Creates {@link SimpleLocalRepositoryManager}s for repository type {@code "simple"}. * * @author Benjamin Hanzelmann */ @Component( role = LocalRepositoryManagerFactory.class, hint = "simple" ) public class SimpleLocalRepositoryManagerFactory implements LocalRepositoryManagerFactory, Service { @Requirement private Logger logger = NullLogger.INSTANCE; public LocalRepositoryManager newInstance( LocalRepository repository ) throws NoLocalRepositoryManagerException { if ( "".equals( repository.getContentType() ) || "simple".equals( repository.getContentType() ) ) { return new SimpleLocalRepositoryManager( repository.getBasedir() ).setLogger( logger ); } else { throw new NoLocalRepositoryManagerException( repository ); } } public void initService( ServiceLocator locator ) { setLogger( locator.getService( Logger.class ) ); } public SimpleLocalRepositoryManagerFactory setLogger( Logger logger ) { this.logger = ( logger != null ) ? logger : NullLogger.INSTANCE; return this; } public int getPriority() { return 0; } } aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/internal/Slf4jLogger.java000066400000000000000000000027531167050556700313760ustar00rootroot00000000000000package org.sonatype.aether.impl.internal; /******************************************************************************* * 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.spi.log.Logger; /** * A logger that delegates to Slf4J logging. * * @author Benjamin Bentmann */ public class Slf4jLogger implements Logger { private org.slf4j.Logger logger; public Slf4jLogger() { // enables default constructor } public Slf4jLogger( org.slf4j.Logger logger ) { setLogger( logger ); } public void setLogger( org.slf4j.Logger logger ) { this.logger = logger; } public boolean isDebugEnabled() { return logger.isDebugEnabled(); } public void debug( String msg ) { logger.debug( msg ); } public void debug( String msg, Throwable error ) { logger.debug( msg, error ); } public boolean isWarnEnabled() { return logger.isWarnEnabled(); } public void warn( String msg ) { logger.warn( msg ); } public void warn( String msg, Throwable error ) { logger.warn( msg, error ); } } aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/internal/TrackingFileManager.java000066400000000000000000000152111167050556700331020ustar00rootroot00000000000000package org.sonatype.aether.impl.internal; /******************************************************************************* * 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.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.Closeable; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.RandomAccessFile; import java.nio.channels.FileChannel; import java.nio.channels.FileLock; import java.nio.channels.OverlappingFileLockException; import java.util.Map; import java.util.Properties; import org.sonatype.aether.spi.log.Logger; import org.sonatype.aether.spi.log.NullLogger; /** * Manages potentially concurrent accesses to a properties file. * * @author Benjamin Bentmann */ class TrackingFileManager { private Logger logger = NullLogger.INSTANCE; public TrackingFileManager setLogger( Logger logger ) { this.logger = ( logger != null ) ? logger : NullLogger.INSTANCE; return this; } public Properties read( File file ) { synchronized ( getLock( file ) ) { FileLock lock = null; FileInputStream stream = null; try { if ( !file.exists() ) { return null; } stream = new FileInputStream( file ); lock = lock( stream.getChannel(), Math.max( 1, file.length() ), true ); Properties props = new Properties(); props.load( stream ); return props; } catch ( IOException e ) { logger.warn( "Failed to read resolution tracking file " + file, e ); } finally { release( lock, file ); close( stream, file ); } } return null; } public Properties update( File file, Map updates ) { Properties props = new Properties(); synchronized ( getLock( file ) ) { File directory = file.getParentFile(); if ( !directory.mkdirs() && !directory.exists() ) { logger.warn( "Failed to create parent directories for resolution tracking file " + file ); return props; } RandomAccessFile raf = null; FileLock lock = null; try { raf = new RandomAccessFile( file, "rw" ); lock = lock( raf.getChannel(), Math.max( 1, raf.length() ), false ); if ( file.canRead() ) { byte[] buffer = new byte[(int) raf.length()]; raf.readFully( buffer ); ByteArrayInputStream stream = new ByteArrayInputStream( buffer ); props.load( stream ); } for ( Map.Entry update : updates.entrySet() ) { if ( update.getValue() == null ) { props.remove( update.getKey() ); } else { props.setProperty( update.getKey(), update.getValue() ); } } ByteArrayOutputStream stream = new ByteArrayOutputStream( 1024 * 2 ); logger.debug( "Writing resolution tracking file " + file ); props.store( stream, "NOTE: This is an internal implementation file" + ", its format can be changed without prior notice." ); raf.seek( 0 ); raf.write( stream.toByteArray() ); raf.setLength( raf.getFilePointer() ); } catch ( IOException e ) { logger.warn( "Failed to write resolution tracking file " + file, e ); } finally { release( lock, file ); close( raf, file ); } } return props; } private void release( FileLock lock, File file ) { if ( lock != null ) { try { lock.release(); } catch ( IOException e ) { logger.warn( "Error releasing lock for resolution tracking file " + file, e ); } } } private void close( Closeable closeable, File file ) { if ( closeable != null ) { try { closeable.close(); } catch ( IOException e ) { logger.warn( "Error closing resolution tracking file " + file, e ); } } } private Object getLock( File file ) { /* * NOTE: Locks held by one JVM must not overlap and using the canonical path is our best bet, still another * piece of code might have locked the same file (unlikely though) or the canonical path fails to capture file * identity sufficiently as is the case with Java 1.6 and symlinks on Windows. */ try { return file.getCanonicalPath().intern(); } catch ( IOException e ) { logger.warn( "Failed to canonicalize path " + file + ": " + e.getMessage() ); return file.getAbsolutePath().intern(); } } private FileLock lock( FileChannel channel, long size, boolean shared ) throws IOException { FileLock lock = null; for ( int attempts = 8; attempts >= 0; attempts-- ) { try { lock = channel.lock( 0, size, shared ); break; } catch ( OverlappingFileLockException e ) { if ( attempts <= 0 ) { throw (IOException) new IOException().initCause( e ); } try { Thread.sleep( 50 ); } catch ( InterruptedException e1 ) { Thread.currentThread().interrupt(); } } } if ( lock == null ) { throw new IOException( "Could not lock file" ); } return lock; } } aether-1.13.1/aether-impl/src/main/java/org/sonatype/aether/impl/internal/Utils.java000066400000000000000000000046451167050556700303560ustar00rootroot00000000000000package org.sonatype.aether.impl.internal; /******************************************************************************* * 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 java.util.Collections; import java.util.Comparator; import java.util.List; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.impl.MetadataGenerator; import org.sonatype.aether.impl.MetadataGeneratorFactory; import org.sonatype.aether.metadata.Metadata; /** */ class Utils { private static final Comparator COMPARATOR = new Comparator() { public int compare( MetadataGeneratorFactory o1, MetadataGeneratorFactory o2 ) { return o2.getPriority() - o1.getPriority(); } }; public static List sortMetadataGeneratorFactories( Collection factories ) { List result = new ArrayList( factories ); Collections.sort( result, COMPARATOR ); return result; } public static List prepareMetadata( List generators, List artifacts ) { List metadatas = new ArrayList(); for ( MetadataGenerator generator : generators ) { metadatas.addAll( generator.prepare( artifacts ) ); } return metadatas; } public static List finishMetadata( List generators, List artifacts ) { List metadatas = new ArrayList(); for ( MetadataGenerator generator : generators ) { metadatas.addAll( generator.finish( artifacts ) ); } return metadatas; } public static List combine( Collection first, Collection second ) { List result = new ArrayList( first.size() + second.size() ); result.addAll( first ); result.addAll( second ); return result; } } aether-1.13.1/aether-impl/src/test/000077500000000000000000000000001167050556700170365ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/java/000077500000000000000000000000001167050556700177575ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/java/org/000077500000000000000000000000001167050556700205465ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/java/org/sonatype/000077500000000000000000000000001167050556700224105ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/java/org/sonatype/aether/000077500000000000000000000000001167050556700236605ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/java/org/sonatype/aether/impl/000077500000000000000000000000001167050556700246215ustar00rootroot00000000000000AbstractLocalRepositoryMaintainerTest.java000066400000000000000000000021401167050556700350700ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/java/org/sonatype/aether/implpackage org.sonatype.aether.impl; /******************************************************************************* * 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 static org.junit.Assert.*; import java.lang.reflect.Method; import org.junit.Test; /** * @author Benjamin Bentmann */ @SuppressWarnings( "deprecation" ) public class AbstractLocalRepositoryMaintainerTest { @Test public void testAllEventTypesHandled() throws Exception { for ( Method method : LocalRepositoryMaintainer.class.getMethods() ) { assertNotNull( AbstractLocalRepositoryMaintainer.class.getDeclaredMethod( method.getName(), method.getParameterTypes() ) ); } } } aether-1.13.1/aether-impl/src/test/java/org/sonatype/aether/impl/DefaultServiceLocatorTest.java000066400000000000000000000023501167050556700325550ustar00rootroot00000000000000package org.sonatype.aether.impl; /******************************************************************************* * 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 static org.junit.Assert.*; import org.junit.Test; import org.sonatype.aether.RepositorySystem; import org.sonatype.aether.impl.internal.DefaultServiceLocator; /** * @author Benjamin Bentmann */ public class DefaultServiceLocatorTest { @Test public void testGetRepositorySystem() { DefaultServiceLocator locator = new DefaultServiceLocator(); locator.addService( ArtifactDescriptorReader.class, StubArtifactDescriptorReader.class ); locator.addService( VersionResolver.class, StubVersionResolver.class ); locator.addService( VersionRangeResolver.class, StubVersionRangeResolver.class ); RepositorySystem repoSys = locator.getService( RepositorySystem.class ); assertNotNull( repoSys ); } } aether-1.13.1/aether-impl/src/test/java/org/sonatype/aether/impl/PlexusSupportTest.java000066400000000000000000000032241167050556700312020ustar00rootroot00000000000000package org.sonatype.aether.impl; /******************************************************************************* * 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.codehaus.plexus.PlexusTestCase; import org.sonatype.aether.RepositorySystem; import org.sonatype.aether.impl.ArtifactDescriptorReader; import org.sonatype.aether.impl.VersionRangeResolver; import org.sonatype.aether.impl.VersionResolver; import org.sonatype.aether.spi.localrepo.LocalRepositoryManagerFactory; /** */ public class PlexusSupportTest extends PlexusTestCase { public void testExistenceOfPlexusComponentMetadata() throws Exception { getContainer().addComponent( new StubVersionRangeResolver(), VersionRangeResolver.class, null ); getContainer().addComponent( new StubVersionResolver(), VersionResolver.class, null ); getContainer().addComponent( new StubArtifactDescriptorReader(), ArtifactDescriptorReader.class, null ); RepositorySystem repoSystem = lookup( RepositorySystem.class ); assertNotNull( repoSystem ); assertSame( repoSystem, lookup( RepositorySystem.class ) ); List lrmfs = getContainer().lookupList( LocalRepositoryManagerFactory.class ); assertNotNull( lrmfs ); assertEquals( 2, lrmfs.size() ); } } aether-1.13.1/aether-impl/src/test/java/org/sonatype/aether/impl/StubArtifactDescriptorReader.java000066400000000000000000000022301167050556700332360ustar00rootroot00000000000000package org.sonatype.aether.impl; /******************************************************************************* * 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; import org.sonatype.aether.resolution.ArtifactDescriptorException; import org.sonatype.aether.resolution.ArtifactDescriptorRequest; import org.sonatype.aether.resolution.ArtifactDescriptorResult; public class StubArtifactDescriptorReader implements ArtifactDescriptorReader { public ArtifactDescriptorResult readArtifactDescriptor( RepositorySystemSession session, ArtifactDescriptorRequest request ) throws ArtifactDescriptorException { ArtifactDescriptorResult result = new ArtifactDescriptorResult( request ); return result; } } aether-1.13.1/aether-impl/src/test/java/org/sonatype/aether/impl/StubVersionRangeResolver.java000066400000000000000000000020651167050556700324510ustar00rootroot00000000000000package org.sonatype.aether.impl; /******************************************************************************* * 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; import org.sonatype.aether.resolution.VersionRangeRequest; import org.sonatype.aether.resolution.VersionRangeResolutionException; import org.sonatype.aether.resolution.VersionRangeResult; public class StubVersionRangeResolver implements VersionRangeResolver { public VersionRangeResult resolveVersionRange( RepositorySystemSession session, VersionRangeRequest request ) throws VersionRangeResolutionException { VersionRangeResult result = new VersionRangeResult( request ); return result; } } aether-1.13.1/aether-impl/src/test/java/org/sonatype/aether/impl/StubVersionResolver.java000066400000000000000000000017761167050556700315040ustar00rootroot00000000000000package org.sonatype.aether.impl; /******************************************************************************* * 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; import org.sonatype.aether.resolution.VersionRequest; import org.sonatype.aether.resolution.VersionResolutionException; import org.sonatype.aether.resolution.VersionResult; public class StubVersionResolver implements VersionResolver { public VersionResult resolveVersion( RepositorySystemSession session, VersionRequest request ) throws VersionResolutionException { VersionResult result = new VersionResult( request ); return result; } } aether-1.13.1/aether-impl/src/test/java/org/sonatype/aether/impl/internal/000077500000000000000000000000001167050556700264355ustar00rootroot00000000000000DefaultArtifactResolverTest.java000066400000000000000000000762721167050556700346630ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/java/org/sonatype/aether/impl/internalpackage org.sonatype.aether.impl.internal; /******************************************************************************* * 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 static org.junit.Assert.*; import java.io.File; import java.io.IOException; import java.util.Arrays; import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.impl.UpdateCheckManager; import org.sonatype.aether.impl.VersionResolver; import org.sonatype.aether.metadata.Metadata; import org.sonatype.aether.repository.LocalArtifactRegistration; import org.sonatype.aether.repository.LocalArtifactRequest; import org.sonatype.aether.repository.LocalArtifactResult; import org.sonatype.aether.repository.LocalMetadataRegistration; import org.sonatype.aether.repository.LocalMetadataRequest; import org.sonatype.aether.repository.LocalMetadataResult; import org.sonatype.aether.repository.LocalRepository; import org.sonatype.aether.repository.LocalRepositoryManager; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.repository.RepositoryPolicy; import org.sonatype.aether.repository.WorkspaceReader; import org.sonatype.aether.repository.WorkspaceRepository; import org.sonatype.aether.resolution.ArtifactRequest; import org.sonatype.aether.resolution.ArtifactResolutionException; import org.sonatype.aether.resolution.ArtifactResult; import org.sonatype.aether.resolution.VersionRequest; import org.sonatype.aether.resolution.VersionResolutionException; import org.sonatype.aether.resolution.VersionResult; import org.sonatype.aether.spi.connector.ArtifactDownload; import org.sonatype.aether.spi.connector.MetadataDownload; import org.sonatype.aether.spi.log.NullLogger; import org.sonatype.aether.test.impl.RecordingRepositoryListener; import org.sonatype.aether.test.impl.RecordingRepositoryListener.EventWrapper; import org.sonatype.aether.test.impl.RecordingRepositoryListener.Type; import org.sonatype.aether.test.impl.TestFileProcessor; import org.sonatype.aether.test.impl.TestLocalRepositoryManager; import org.sonatype.aether.test.impl.TestRepositorySystemSession; import org.sonatype.aether.test.util.TestFileUtils; import org.sonatype.aether.test.util.impl.StubArtifact; import org.sonatype.aether.transfer.ArtifactNotFoundException; import org.sonatype.aether.transfer.ArtifactTransferException; import org.sonatype.aether.util.artifact.ArtifactProperties; /** * @author Benjamin Hanzelmann */ public class DefaultArtifactResolverTest { private DefaultArtifactResolver resolver; private TestRepositorySystemSession session; private TestLocalRepositoryManager lrm; private StubRemoteRepositoryManager remoteRepositoryManager; private Artifact artifact; private RecordingRepositoryConnector connector; @Before public void setup() throws IOException { UpdateCheckManager updateCheckManager = new StaticUpdateCheckManager( true ); remoteRepositoryManager = new StubRemoteRepositoryManager(); VersionResolver versionResolver = new StubVersionResolver(); session = new TestRepositorySystemSession(); lrm = (TestLocalRepositoryManager) session.getLocalRepositoryManager(); resolver = new DefaultArtifactResolver( NullLogger.INSTANCE, TestFileProcessor.INSTANCE, new StubRepositoryEventDispatcher(), versionResolver, updateCheckManager, remoteRepositoryManager, new StubSyncContextFactory() ); artifact = new StubArtifact( "gid", "aid", "", "ext", "ver" ); connector = new RecordingRepositoryConnector(); remoteRepositoryManager.setConnector( connector ); } @After public void teardown() throws Exception { if ( session.getLocalRepository() != null ) { TestFileUtils.delete( session.getLocalRepository().getBasedir() ); } } @Test public void testResolveLocalArtifactSuccessful() throws IOException, ArtifactResolutionException { File tmpFile = TestFileUtils.createTempFile( "tmp" ); Map properties = new HashMap(); properties.put( ArtifactProperties.LOCAL_PATH, tmpFile.getAbsolutePath() ); artifact = artifact.setProperties( properties ); ArtifactRequest request = new ArtifactRequest( artifact, null, "" ); ArtifactResult result = resolver.resolveArtifact( session, request ); assertTrue( result.getExceptions().isEmpty() ); Artifact resolved = result.getArtifact(); assertNotNull( resolved.getFile() ); resolved = resolved.setFile( null ); assertEquals( artifact, resolved ); } @Test public void testResolveLocalArtifactUnsuccessful() throws IOException, ArtifactResolutionException { File tmpFile = TestFileUtils.createTempFile( "tmp" ); Map properties = new HashMap(); properties.put( ArtifactProperties.LOCAL_PATH, tmpFile.getAbsolutePath() ); artifact = artifact.setProperties( properties ); tmpFile.delete(); ArtifactRequest request = new ArtifactRequest( artifact, null, "" ); try { resolver.resolveArtifact( session, request ); fail( "expected exception" ); } catch ( ArtifactResolutionException e ) { assertNotNull( e.getResults() ); assertEquals( 1, e.getResults().size() ); ArtifactResult result = e.getResults().get( 0 ); assertSame( request, result.getRequest() ); assertFalse( result.getExceptions().isEmpty() ); assertTrue( result.getExceptions().get( 0 ) instanceof ArtifactNotFoundException ); Artifact resolved = result.getArtifact(); assertNull( resolved ); } } @Test public void testResolveRemoteArtifact() throws IOException, ArtifactResolutionException { connector.setExpectGet( artifact ); ArtifactRequest request = new ArtifactRequest( artifact, null, "" ); request.addRepository( new RemoteRepository( "id", "default", "file:///" ) ); ArtifactResult result = resolver.resolveArtifact( session, request ); assertTrue( result.getExceptions().isEmpty() ); Artifact resolved = result.getArtifact(); assertNotNull( resolved.getFile() ); resolved = resolved.setFile( null ); assertEquals( artifact, resolved ); connector.assertSeenExpected(); } @Test public void testResolveRemoteArtifactUnsuccessful() throws IOException, ArtifactResolutionException { RecordingRepositoryConnector connector = new RecordingRepositoryConnector() { @Override public void get( Collection artifactDownloads, Collection metadataDownloads ) { super.get( artifactDownloads, metadataDownloads ); ArtifactDownload download = artifactDownloads.iterator().next(); ArtifactTransferException exception = new ArtifactNotFoundException( download.getArtifact(), null, "not found" ); download.setException( exception ); } }; connector.setExpectGet( artifact ); remoteRepositoryManager.setConnector( connector ); ArtifactRequest request = new ArtifactRequest( artifact, null, "" ); request.addRepository( new RemoteRepository( "id", "default", "file:///" ) ); try { resolver.resolveArtifact( session, request ); fail( "expected exception" ); } catch ( ArtifactResolutionException e ) { connector.assertSeenExpected(); assertNotNull( e.getResults() ); assertEquals( 1, e.getResults().size() ); ArtifactResult result = e.getResults().get( 0 ); assertSame( request, result.getRequest() ); assertFalse( result.getExceptions().isEmpty() ); assertTrue( result.getExceptions().get( 0 ) instanceof ArtifactNotFoundException ); Artifact resolved = result.getArtifact(); assertNull( resolved ); } } @Test public void testArtifactNotFoundCache() throws Exception { RecordingRepositoryConnector connector = new RecordingRepositoryConnector() { @Override public void get( Collection artifactDownloads, Collection metadataDownloads ) { super.get( artifactDownloads, metadataDownloads ); for ( ArtifactDownload download : artifactDownloads ) { download.getFile().delete(); ArtifactTransferException exception = new ArtifactNotFoundException( download.getArtifact(), null, "not found" ); download.setException( exception ); } } }; remoteRepositoryManager.setConnector( connector ); resolver.setUpdateCheckManager( new DefaultUpdateCheckManager() ); session.setNotFoundCachingEnabled( true ); session.setUpdatePolicy( RepositoryPolicy.UPDATE_POLICY_NEVER ); RemoteRepository remoteRepo = new RemoteRepository( "id", "default", "file:///" ); Artifact artifact1 = artifact; Artifact artifact2 = artifact.setVersion( "ver2" ); ArtifactRequest request1 = new ArtifactRequest( artifact1, Arrays.asList( remoteRepo ), "" ); ArtifactRequest request2 = new ArtifactRequest( artifact2, Arrays.asList( remoteRepo ), "" ); connector.setExpectGet( new Artifact[] { artifact1, artifact2 } ); try { resolver.resolveArtifacts( session, Arrays.asList( request1, request2 ) ); fail( "expected exception" ); } catch ( ArtifactResolutionException e ) { connector.assertSeenExpected(); } TestFileUtils.write( "artifact", new File( lrm.getRepository().getBasedir(), lrm.getPathForLocalArtifact( artifact2 ) ) ); lrm.setArtifactAvailability( artifact2, false ); DefaultUpdateCheckManagerTest.resetSessionData( session ); connector.resetActual(); connector.setExpectGet( new Artifact[0] ); try { resolver.resolveArtifacts( session, Arrays.asList( request1, request2 ) ); fail( "expected exception" ); } catch ( ArtifactResolutionException e ) { connector.assertSeenExpected(); for ( ArtifactResult result : e.getResults() ) { Throwable t = result.getExceptions().get( 0 ); assertEquals( t.toString(), true, t instanceof ArtifactNotFoundException ); assertEquals( t.toString(), true, t.getMessage().contains( "cached" ) ); } } } @Test public void testResolveFromWorkspace() throws IOException, ArtifactResolutionException { session = new TestRepositorySystemSession() { @Override public WorkspaceReader getWorkspaceReader() { return new WorkspaceReader() { public WorkspaceRepository getRepository() { return new WorkspaceRepository( "default" ); } public List findVersions( Artifact artifact ) { return Arrays.asList( artifact.getVersion() ); } public File findArtifact( Artifact artifact ) { try { return TestFileUtils.createTempFile( artifact.toString() ); } catch ( IOException e ) { throw new RuntimeException( e.getMessage(), e ); } } }; } }; ArtifactRequest request = new ArtifactRequest( artifact, null, "" ); request.addRepository( new RemoteRepository( "id", "default", "file:///" ) ); ArtifactResult result = resolver.resolveArtifact( session, request ); assertTrue( result.getExceptions().isEmpty() ); Artifact resolved = result.getArtifact(); assertNotNull( resolved.getFile() ); byte[] expected = resolved.toString().getBytes( "UTF-8" ); TestFileUtils.assertContent( expected, resolved.getFile() ); resolved = resolved.setFile( null ); assertEquals( artifact, resolved ); connector.assertSeenExpected(); } @Test public void testResolveFromWorkspaceFallbackToRepository() throws IOException, ArtifactResolutionException { session = new TestRepositorySystemSession() { @Override public WorkspaceReader getWorkspaceReader() { return new WorkspaceReader() { public WorkspaceRepository getRepository() { return new WorkspaceRepository( "default" ); } public List findVersions( Artifact artifact ) { return Arrays.asList( artifact.getVersion() ); } public File findArtifact( Artifact artifact ) { return null; } }; } }; connector.setExpectGet( artifact ); remoteRepositoryManager.setConnector( connector ); ArtifactRequest request = new ArtifactRequest( artifact, null, "" ); request.addRepository( new RemoteRepository( "id", "default", "file:///" ) ); ArtifactResult result = resolver.resolveArtifact( session, request ); assertTrue( "exception on resolveArtifact", result.getExceptions().isEmpty() ); Artifact resolved = result.getArtifact(); assertNotNull( resolved.getFile() ); resolved = resolved.setFile( null ); assertEquals( artifact, resolved ); connector.assertSeenExpected(); } @Test public void testRepositoryEventsSuccessfulLocal() throws ArtifactResolutionException, IOException { RecordingRepositoryListener listener = new RecordingRepositoryListener(); session.setRepositoryListener( listener ); File tmpFile = TestFileUtils.createTempFile( "tmp" ); Map properties = new HashMap(); properties.put( ArtifactProperties.LOCAL_PATH, tmpFile.getAbsolutePath() ); artifact = artifact.setProperties( properties ); ArtifactRequest request = new ArtifactRequest( artifact, null, "" ); resolver.resolveArtifact( session, request ); List events = listener.getEvents(); assertEquals( 2, events.size() ); EventWrapper event = events.get( 0 ); assertEquals( RecordingRepositoryListener.Type.ARTIFACT_RESOLVING, event.getType() ); assertNull( event.getEvent().getException() ); assertEquals( artifact, event.getEvent().getArtifact() ); event = events.get( 1 ); assertEquals( RecordingRepositoryListener.Type.ARTIFACT_RESOLVED, event.getType() ); assertNull( event.getEvent().getException() ); assertEquals( artifact, event.getEvent().getArtifact().setFile( null ) ); } @Test public void testRepositoryEventsUnsuccessfulLocal() throws IOException { RecordingRepositoryListener listener = new RecordingRepositoryListener(); session.setRepositoryListener( listener ); Map properties = new HashMap(); properties.put( ArtifactProperties.LOCAL_PATH, "doesnotexist" ); artifact = artifact.setProperties( properties ); ArtifactRequest request = new ArtifactRequest( artifact, null, "" ); try { resolver.resolveArtifact( session, request ); fail( "expected exception" ); } catch ( ArtifactResolutionException e ) { } List events = listener.getEvents(); assertEquals( 2, events.size() ); EventWrapper event = events.get( 0 ); assertEquals( artifact, event.getEvent().getArtifact() ); assertEquals( Type.ARTIFACT_RESOLVING, event.getType() ); event = events.get( 1 ); assertEquals( artifact, event.getEvent().getArtifact() ); assertEquals( Type.ARTIFACT_RESOLVED, event.getType() ); assertNotNull( event.getEvent().getException() ); assertEquals( 1, event.getEvent().getExceptions().size() ); } @Test public void testRepositoryEventsSuccessfulRemote() throws ArtifactResolutionException { RecordingRepositoryListener listener = new RecordingRepositoryListener(); session.setRepositoryListener( listener ); ArtifactRequest request = new ArtifactRequest( artifact, null, "" ); request.addRepository( new RemoteRepository( "id", "default", "file:///" ) ); resolver.resolveArtifact( session, request ); List events = listener.getEvents(); assertEquals( 2, events.size() ); EventWrapper event = events.get( 0 ); assertEquals( RecordingRepositoryListener.Type.ARTIFACT_RESOLVING, event.getType() ); assertNull( event.getEvent().getException() ); assertEquals( artifact, event.getEvent().getArtifact() ); event = events.get( 1 ); assertEquals( RecordingRepositoryListener.Type.ARTIFACT_RESOLVED, event.getType() ); assertNull( event.getEvent().getException() ); assertEquals( artifact, event.getEvent().getArtifact().setFile( null ) ); } @Test public void testRepositoryEventsUnsuccessfulRemote() throws IOException, ArtifactResolutionException { RecordingRepositoryConnector connector = new RecordingRepositoryConnector() { @Override public void get( Collection artifactDownloads, Collection metadataDownloads ) { super.get( artifactDownloads, metadataDownloads ); ArtifactDownload download = artifactDownloads.iterator().next(); ArtifactTransferException exception = new ArtifactNotFoundException( download.getArtifact(), null, "not found" ); download.setException( exception ); } }; remoteRepositoryManager.setConnector( connector ); RecordingRepositoryListener listener = new RecordingRepositoryListener(); session.setRepositoryListener( listener ); ArtifactRequest request = new ArtifactRequest( artifact, null, "" ); request.addRepository( new RemoteRepository( "id", "default", "file:///" ) ); try { resolver.resolveArtifact( session, request ); fail( "expected exception" ); } catch ( ArtifactResolutionException e ) { } List events = listener.getEvents(); assertEquals( 2, events.size() ); EventWrapper event = events.get( 0 ); assertEquals( artifact, event.getEvent().getArtifact() ); assertEquals( Type.ARTIFACT_RESOLVING, event.getType() ); event = events.get( 1 ); assertEquals( artifact, event.getEvent().getArtifact() ); assertEquals( Type.ARTIFACT_RESOLVED, event.getType() ); assertNotNull( event.getEvent().getException() ); assertEquals( 1, event.getEvent().getExceptions().size() ); } @Test public void testVersionResolverFails() { resolver.setVersionResolver( new VersionResolver() { public VersionResult resolveVersion( RepositorySystemSession session, VersionRequest request ) throws VersionResolutionException { throw new VersionResolutionException( new VersionResult( request ) ); } } ); ArtifactRequest request = new ArtifactRequest( artifact, null, "" ); try { resolver.resolveArtifact( session, request ); fail( "expected exception" ); } catch ( ArtifactResolutionException e ) { connector.assertSeenExpected(); assertNotNull( e.getResults() ); assertEquals( 1, e.getResults().size() ); ArtifactResult result = e.getResults().get( 0 ); assertSame( request, result.getRequest() ); assertFalse( result.getExceptions().isEmpty() ); assertTrue( result.getExceptions().get( 0 ) instanceof VersionResolutionException ); Artifact resolved = result.getArtifact(); assertNull( resolved ); } } @Test public void testRepositoryEventsOnVersionResolverFail() { resolver.setVersionResolver( new VersionResolver() { public VersionResult resolveVersion( RepositorySystemSession session, VersionRequest request ) throws VersionResolutionException { throw new VersionResolutionException( new VersionResult( request ) ); } } ); RecordingRepositoryListener listener = new RecordingRepositoryListener(); session.setRepositoryListener( listener ); ArtifactRequest request = new ArtifactRequest( artifact, null, "" ); try { resolver.resolveArtifact( session, request ); fail( "expected exception" ); } catch ( ArtifactResolutionException e ) { } List events = listener.getEvents(); assertEquals( 2, events.size() ); EventWrapper event = events.get( 0 ); assertEquals( artifact, event.getEvent().getArtifact() ); assertEquals( Type.ARTIFACT_RESOLVING, event.getType() ); event = events.get( 1 ); assertEquals( artifact, event.getEvent().getArtifact() ); assertEquals( Type.ARTIFACT_RESOLVED, event.getType() ); assertNotNull( event.getEvent().getException() ); assertEquals( 1, event.getEvent().getExceptions().size() ); } @Test public void testLocalArtifactAvailable() throws ArtifactResolutionException { session.setLocalRepositoryManager( new LocalRepositoryManager() { public LocalRepository getRepository() { return null; } public String getPathForRemoteMetadata( Metadata metadata, RemoteRepository repository, String context ) { return null; } public String getPathForRemoteArtifact( Artifact artifact, RemoteRepository repository, String context ) { return null; } public String getPathForLocalMetadata( Metadata metadata ) { return null; } public String getPathForLocalArtifact( Artifact artifact ) { return null; } public LocalArtifactResult find( RepositorySystemSession session, LocalArtifactRequest request ) { LocalArtifactResult result = new LocalArtifactResult( request ); result.setAvailable( true ); try { result.setFile( TestFileUtils.createTempFile( "" ) ); } catch ( IOException e ) { e.printStackTrace(); } return result; } public void add( RepositorySystemSession session, LocalArtifactRegistration request ) { } public LocalMetadataResult find( RepositorySystemSession session, LocalMetadataRequest request ) { LocalMetadataResult result = new LocalMetadataResult( request ); try { result.setFile( TestFileUtils.createTempFile( "" ) ); } catch ( IOException e ) { e.printStackTrace(); } return result; } public void add( RepositorySystemSession session, LocalMetadataRegistration request ) { } } ); ArtifactRequest request = new ArtifactRequest( artifact, null, "" ); request.addRepository( new RemoteRepository( "id", "default", "file:///" ) ); ArtifactResult result = resolver.resolveArtifact( session, request ); assertTrue( result.getExceptions().isEmpty() ); Artifact resolved = result.getArtifact(); assertNotNull( resolved.getFile() ); resolved = resolved.setFile( null ); assertEquals( artifact, resolved ); } @Test public void testFindInLocalRepositoryWhenVersionWasFoundInLocalRepository() throws ArtifactResolutionException { session.setLocalRepositoryManager( new LocalRepositoryManager() { public LocalRepository getRepository() { return null; } public String getPathForRemoteMetadata( Metadata metadata, RemoteRepository repository, String context ) { return null; } public String getPathForRemoteArtifact( Artifact artifact, RemoteRepository repository, String context ) { return null; } public String getPathForLocalMetadata( Metadata metadata ) { return null; } public String getPathForLocalArtifact( Artifact artifact ) { return null; } public LocalArtifactResult find( RepositorySystemSession session, LocalArtifactRequest request ) { LocalArtifactResult result = new LocalArtifactResult( request ); result.setAvailable( false ); try { result.setFile( TestFileUtils.createTempFile( "" ) ); } catch ( IOException e ) { e.printStackTrace(); } return result; } public void add( RepositorySystemSession session, LocalArtifactRegistration request ) { } public LocalMetadataResult find( RepositorySystemSession session, LocalMetadataRequest request ) { LocalMetadataResult result = new LocalMetadataResult( request ); return result; } public void add( RepositorySystemSession session, LocalMetadataRegistration request ) { } } ); ArtifactRequest request = new ArtifactRequest( artifact, null, "" ); request.addRepository( new RemoteRepository( "id", "default", "file:///" ) ); resolver.setVersionResolver( new VersionResolver() { public VersionResult resolveVersion( RepositorySystemSession session, VersionRequest request ) throws VersionResolutionException { return new VersionResult( request ).setRepository( new LocalRepository( "id" ) ).setVersion( request.getArtifact().getVersion() ); } } ); ArtifactResult result = resolver.resolveArtifact( session, request ); assertTrue( result.getExceptions().isEmpty() ); Artifact resolved = result.getArtifact(); assertNotNull( resolved.getFile() ); resolved = resolved.setFile( null ); assertEquals( artifact, resolved ); } @Test public void testFindInLocalRepositoryWhenVersionRangeWasResolvedFromLocalRepository() throws ArtifactResolutionException { session.setLocalRepositoryManager( new LocalRepositoryManager() { public LocalRepository getRepository() { return null; } public String getPathForRemoteMetadata( Metadata metadata, RemoteRepository repository, String context ) { return null; } public String getPathForRemoteArtifact( Artifact artifact, RemoteRepository repository, String context ) { return null; } public String getPathForLocalMetadata( Metadata metadata ) { return null; } public String getPathForLocalArtifact( Artifact artifact ) { return null; } public LocalArtifactResult find( RepositorySystemSession session, LocalArtifactRequest request ) { LocalArtifactResult result = new LocalArtifactResult( request ); result.setAvailable( false ); try { result.setFile( TestFileUtils.createTempFile( "" ) ); } catch ( IOException e ) { e.printStackTrace(); } return result; } public void add( RepositorySystemSession session, LocalArtifactRegistration request ) { } public LocalMetadataResult find( RepositorySystemSession session, LocalMetadataRequest request ) { LocalMetadataResult result = new LocalMetadataResult( request ); return result; } public void add( RepositorySystemSession session, LocalMetadataRegistration request ) { } } ); ArtifactRequest request = new ArtifactRequest( artifact, null, "" ); resolver.setVersionResolver( new VersionResolver() { public VersionResult resolveVersion( RepositorySystemSession session, VersionRequest request ) throws VersionResolutionException { return new VersionResult( request ).setVersion( request.getArtifact().getVersion() ); } } ); ArtifactResult result = resolver.resolveArtifact( session, request ); assertTrue( result.getExceptions().isEmpty() ); Artifact resolved = result.getArtifact(); assertNotNull( resolved.getFile() ); resolved = resolved.setFile( null ); assertEquals( artifact, resolved ); } } DefaultDependencyCollectorTest.java000066400000000000000000000410261167050556700353160ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/java/org/sonatype/aether/impl/internalpackage org.sonatype.aether.impl.internal; /******************************************************************************* * 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 static org.junit.Assert.*; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; import org.junit.Before; import org.junit.Test; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.collection.CollectRequest; import org.sonatype.aether.collection.CollectResult; import org.sonatype.aether.collection.DependencyCollectionContext; import org.sonatype.aether.collection.DependencyCollectionException; import org.sonatype.aether.collection.DependencyManagement; import org.sonatype.aether.collection.DependencyManager; import org.sonatype.aether.graph.Dependency; import org.sonatype.aether.graph.DependencyNode; import org.sonatype.aether.impl.ArtifactDescriptorReader; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.resolution.ArtifactDescriptorException; import org.sonatype.aether.resolution.ArtifactDescriptorRequest; import org.sonatype.aether.resolution.ArtifactDescriptorResult; import org.sonatype.aether.test.impl.TestRepositorySystemSession; import org.sonatype.aether.test.util.DependencyGraphParser; import org.sonatype.aether.util.artifact.ArtifactProperties; import org.sonatype.aether.util.graph.manager.ClassicDependencyManager; /** * @author Benjamin Hanzelmann */ public class DefaultDependencyCollectorTest { private DefaultDependencyCollector collector; private TestRepositorySystemSession session; private DependencyGraphParser parser; private RemoteRepository repository; @Before public void setup() throws IOException { session = new TestRepositorySystemSession(); collector = new DefaultDependencyCollector(); collector.setArtifactDescriptorReader( new IniArtifactDescriptorReader( "artifact-descriptions/" ) ); collector.setVersionRangeResolver( new StubVersionRangeResolver() ); collector.setRemoteRepositoryManager( new StubRemoteRepositoryManager() ); parser = new DependencyGraphParser( "artifact-descriptions/" ); repository = new RemoteRepository( "id", "default", "file:///" ); } private static void assertEqualSubtree( DependencyNode expected, DependencyNode actual ) { assertEqualSubtree( expected, actual, new LinkedList() ); } private static void assertEqualSubtree( DependencyNode expected, DependencyNode actual, LinkedList parents ) { assertEquals( "path: " + parents, expected.getDependency(), actual.getDependency() ); if ( actual.getDependency() != null ) { Artifact artifact = actual.getDependency().getArtifact(); for ( DependencyNode parent : parents ) { if ( parent.getDependency() != null && artifact.equals( parent.getDependency().getArtifact() ) ) { return; } } } parents.addLast( expected ); assertEquals( "path: " + parents + ", expected: " + expected.getChildren() + ", actual: " + actual.getChildren(), expected.getChildren().size(), actual.getChildren().size() ); Iterator iterator1 = expected.getChildren().iterator(); Iterator iterator2 = actual.getChildren().iterator(); while ( iterator1.hasNext() ) { assertEqualSubtree( iterator1.next(), iterator2.next(), parents ); } parents.removeLast(); } private Dependency dep( DependencyNode root, int... coords ) { return path( root, coords ).getDependency(); } private DependencyNode path( DependencyNode root, int... coords ) { try { DependencyNode node = root; for ( int i = 0; i < coords.length; i++ ) { node = node.getChildren().get( coords[i] ); } return node; } catch ( IndexOutOfBoundsException e ) { throw new IllegalArgumentException( "Illegal coordinates for child", e ); } catch ( NullPointerException e ) { throw new IllegalArgumentException( "Illegal coordinates for child", e ); } } @Test public void testSimpleCollection() throws IOException, DependencyCollectionException { DependencyNode root = parser.parseLiteral( "gid:aid:ext:ver" ); Dependency dependency = root.getDependency(); CollectRequest request = new CollectRequest( dependency, Arrays.asList( repository ) ); CollectResult result = collector.collectDependencies( session, request ); assertEquals( 0, result.getExceptions().size() ); DependencyNode newRoot = result.getRoot(); Dependency newDependency = newRoot.getDependency(); assertEquals( dependency, newDependency ); assertEquals( dependency.getArtifact(), newDependency.getArtifact() ); assertEquals( 1, newRoot.getChildren().size() ); DependencyNode expect = parser.parseLiteral( "gid:aid2:ext:ver:compile" ); assertEquals( expect.getDependency(), newRoot.getChildren().get( 0 ).getDependency() ); } @Test public void testMissingDependencyDescription() throws IOException { DependencyNode root = parser.parseLiteral( "missing:description:ext:ver" ); CollectRequest request = new CollectRequest( root.getDependency(), Arrays.asList( repository ) ); try { collector.collectDependencies( session, request ); fail( "expected exception" ); } catch ( DependencyCollectionException e ) { CollectResult result = e.getResult(); assertSame( request, result.getRequest() ); assertNotNull( result.getExceptions() ); assertEquals( 1, result.getExceptions().size() ); assertTrue( result.getExceptions().get( 0 ) instanceof ArtifactDescriptorException ); assertEquals( request.getRoot(), result.getRoot().getDependency() ); } } @Test public void testDuplicates() throws IOException, DependencyCollectionException { DependencyNode root = parser.parseLiteral( "duplicate:transitive:ext:dependency" ); Dependency dependency = root.getDependency(); CollectRequest request = new CollectRequest( dependency, Arrays.asList( repository ) ); CollectResult result = collector.collectDependencies( session, request ); assertEquals( 0, result.getExceptions().size() ); DependencyNode newRoot = result.getRoot(); Dependency newDependency = newRoot.getDependency(); assertEquals( dependency, newDependency ); assertEquals( dependency.getArtifact(), newDependency.getArtifact() ); assertEquals( 2, newRoot.getChildren().size() ); DependencyNode expect = parser.parseLiteral( "gid:aid:ext:ver:compile" ); Dependency dep = expect.getDependency(); assertEquals( dep, dep( newRoot, 0 ) ); expect = parser.parseLiteral( "gid:aid2:ext:ver:compile" ); dep = expect.getDependency(); assertEquals( dep, dep( newRoot, 1 ) ); assertEquals( dep, dep( newRoot, 0, 0 ) ); assertEquals( dep( newRoot, 1 ), dep( newRoot, 0, 0 ) ); } @Test public void testEqualSubtree() throws IOException, DependencyCollectionException { DependencyNode root = parser.parse( "expectedSubtreeComparisonResult.txt" ); Dependency dependency = root.getDependency(); CollectRequest request = new CollectRequest( dependency, Arrays.asList( repository ) ); CollectResult result = collector.collectDependencies( session, request ); assertEqualSubtree( root, result.getRoot() ); } @Test public void testCyclicDependencies() throws Exception { DependencyNode root = parser.parse( "cycle.txt" ); CollectRequest request = new CollectRequest( root.getDependency(), Arrays.asList( repository ) ); CollectResult result = collector.collectDependencies( session, request ); assertEqualSubtree( root, result.getRoot() ); } @Test public void testCyclicDependenciesBig() throws Exception { DependencyNode root = parser.parse( "cycle-big.txt" ); CollectRequest request = new CollectRequest( root.getDependency(), Arrays.asList( repository ) ); collector.setArtifactDescriptorReader( new IniArtifactDescriptorReader( "artifact-descriptions/cycle-big/" ) ); CollectResult result = collector.collectDependencies( session, request ); assertNotNull( result.getRoot() ); // we only care about the performance here, this test must not hang or run out of mem } @Test public void testPartialResultOnError() throws IOException { DependencyNode root = parser.parse( "expectedPartialSubtreeOnError.txt" ); Dependency dependency = root.getDependency(); CollectRequest request = new CollectRequest( dependency, Arrays.asList( repository ) ); CollectResult result; try { result = collector.collectDependencies( session, request ); fail( "expected exception " ); } catch ( DependencyCollectionException e ) { result = e.getResult(); assertSame( request, result.getRequest() ); assertNotNull( result.getExceptions() ); assertEquals( 1, result.getExceptions().size() ); assertTrue( result.getExceptions().get( 0 ) instanceof ArtifactDescriptorException ); assertEqualSubtree( root, result.getRoot() ); } } @Test public void testCollectMultipleDependencies() throws IOException, DependencyCollectionException { DependencyNode root1 = parser.parseLiteral( "gid:aid:ext:ver:compile" ); DependencyNode root2 = parser.parseLiteral( "gid:aid2:ext:ver:compile" ); List dependencies = Arrays.asList( root1.getDependency(), root2.getDependency() ); CollectRequest request = new CollectRequest( dependencies, null, Arrays.asList( repository ) ); CollectResult result = collector.collectDependencies( session, request ); assertEquals( 0, result.getExceptions().size() ); assertEquals( 2, result.getRoot().getChildren().size() ); assertEquals( root1.getDependency(), dep( result.getRoot(), 0 ) ); assertEquals( 1, path( result.getRoot(), 0 ).getChildren().size() ); assertEquals( root2.getDependency(), dep( result.getRoot(), 0, 0 ) ); assertEquals( 0, path( result.getRoot(), 1 ).getChildren().size() ); assertEquals( root2.getDependency(), dep( result.getRoot(), 1 ) ); } @Test public void testArtifactDescriptorResolutionNotRestrictedToRepoHostingSelectedVersion() throws Exception { RemoteRepository repo2 = new RemoteRepository( "test", "default", "file:///" ); final List repos = new ArrayList(); collector.setArtifactDescriptorReader( new ArtifactDescriptorReader() { public ArtifactDescriptorResult readArtifactDescriptor( RepositorySystemSession session, ArtifactDescriptorRequest request ) throws ArtifactDescriptorException { repos.addAll( request.getRepositories() ); return new ArtifactDescriptorResult( request ); } } ); DependencyNode root = parser.parseLiteral( "verrange:parent:jar:[1,):compile" ); List dependencies = Arrays.asList( root.getDependency() ); CollectRequest request = new CollectRequest( dependencies, null, Arrays.asList( repository, repo2 ) ); CollectResult result = collector.collectDependencies( session, request ); assertEquals( 0, result.getExceptions().size() ); assertEquals( 2, repos.size() ); assertEquals( "id", repos.get( 0 ).getId() ); assertEquals( "test", repos.get( 1 ).getId() ); } @Test public void testManagedVersionScope() throws IOException, DependencyCollectionException { DependencyNode root = parser.parseLiteral( "managed:aid:ext:ver" ); Dependency dependency = root.getDependency(); CollectRequest request = new CollectRequest( dependency, Arrays.asList( repository ) ); session.setDependencyManager( new ClassicDependencyManager() ); CollectResult result = collector.collectDependencies( session, request ); assertEquals( 0, result.getExceptions().size() ); DependencyNode newRoot = result.getRoot(); assertEquals( dependency, dep( newRoot ) ); assertEquals( dependency.getArtifact(), dep( newRoot ).getArtifact() ); assertEquals( 1, newRoot.getChildren().size() ); DependencyNode expect = parser.parseLiteral( "gid:aid:ext:ver:compile" ); assertEquals( dep( expect ), dep( newRoot, 0 ) ); assertEquals( 1, path( newRoot, 0 ).getChildren().size() ); expect = parser.parseLiteral( "gid:aid2:ext:managedVersion:managedScope" ); assertEquals( dep( expect ), dep( newRoot, 0, 0 ) ); } @Test public void testDependencyManagement() throws IOException, DependencyCollectionException { collector.setArtifactDescriptorReader( new IniArtifactDescriptorReader( "artifact-descriptions/managed/" ) ); DependencyNode root = parser.parse( "expectedSubtreeComparisonResult.txt" ); TestDependencyManager depMgmt = new TestDependencyManager(); depMgmt.addManagedDependency( dep( root, 0 ), "managed", null, null ); depMgmt.addManagedDependency( dep( root, 0, 1 ), "managed", "managed", null ); depMgmt.addManagedDependency( dep( root, 1 ), null, null, "managed" ); session.setDependencyManager( depMgmt ); // collect result will differ from expectedSubtreeComparisonResult.txt // set localPath -> no dependency traversal CollectRequest request = new CollectRequest( dep( root ), Arrays.asList( repository ) ); CollectResult result = collector.collectDependencies( session, request ); DependencyNode node = result.getRoot(); assertEquals( "managed", dep( node, 0, 1 ).getArtifact().getVersion() ); assertEquals( "managed", dep( node, 0, 1 ).getScope() ); assertEquals( "managed", dep( node, 1 ).getArtifact().getProperty( ArtifactProperties.LOCAL_PATH, null ) ); assertEquals( "managed", dep( node, 0, 0 ).getArtifact().getProperty( ArtifactProperties.LOCAL_PATH, null ) ); } /** * @author Benjamin Hanzelmann */ public class TestDependencyManager implements DependencyManager { private Map versions = new HashMap(); private Map scopes = new HashMap(); private Map paths = new HashMap(); public void addManagedDependency( Dependency d, String version, String scope, String localPath ) { versions.put( d, version ); scopes.put( d, scope ); paths.put( d, localPath ); } public DependencyManagement manageDependency( Dependency d ) { DependencyManagement mgmt = new DependencyManagement(); mgmt.setVersion( versions.get( d ) ); mgmt.setScope( scopes.get( d ) ); String path = paths.get( d ); if ( path != null ) { Map p = new HashMap(); p.put( ArtifactProperties.LOCAL_PATH, path ); mgmt.setProperties( p ); } return mgmt; } public DependencyManager deriveChildManager( DependencyCollectionContext context ) { return this; } } } aether-1.13.1/aether-impl/src/test/java/org/sonatype/aether/impl/internal/DefaultDeployerTest.java000066400000000000000000000401721167050556700332340ustar00rootroot00000000000000package org.sonatype.aether.impl.internal; /******************************************************************************* * 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 static org.junit.Assert.*; import static org.sonatype.aether.test.impl.RecordingRepositoryListener.Type.*; import java.io.File; import java.io.IOException; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Properties; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.sonatype.aether.RepositoryEvent; import org.sonatype.aether.RepositoryException; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.deployment.DeployRequest; import org.sonatype.aether.deployment.DeploymentException; import org.sonatype.aether.impl.UpdateCheckManager; import org.sonatype.aether.metadata.MergeableMetadata; import org.sonatype.aether.metadata.Metadata; import org.sonatype.aether.metadata.Metadata.Nature; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.spi.connector.ArtifactDownload; import org.sonatype.aether.spi.connector.ArtifactUpload; import org.sonatype.aether.spi.connector.MetadataDownload; import org.sonatype.aether.spi.connector.MetadataUpload; import org.sonatype.aether.spi.connector.RepositoryConnector; import org.sonatype.aether.spi.connector.Transfer.State; import org.sonatype.aether.test.impl.RecordingRepositoryListener; import org.sonatype.aether.test.impl.RecordingRepositoryListener.EventWrapper; import org.sonatype.aether.test.impl.TestFileProcessor; import org.sonatype.aether.test.impl.TestRepositorySystemSession; import org.sonatype.aether.test.util.TestFileUtils; import org.sonatype.aether.transfer.ArtifactTransferException; import org.sonatype.aether.transfer.MetadataNotFoundException; import org.sonatype.aether.transfer.MetadataTransferException; import org.sonatype.aether.util.artifact.DefaultArtifact; import org.sonatype.aether.util.metadata.DefaultMetadata; public class DefaultDeployerTest { private Artifact artifact; private DefaultMetadata metadata; private TestRepositorySystemSession session; private StubRemoteRepositoryManager manager; private DefaultDeployer deployer; private DeployRequest request; private RecordingRepositoryConnector connector; private RecordingRepositoryListener listener; @Before public void setup() throws IOException { artifact = new DefaultArtifact( "gid", "aid", "jar", "ver" ); artifact = artifact.setFile( TestFileUtils.createTempFile( "artifact" ) ); metadata = new DefaultMetadata( "gid", "aid", "ver", "type", Nature.RELEASE_OR_SNAPSHOT, TestFileUtils.createTempFile( "metadata" ) ); session = new TestRepositorySystemSession(); manager = new StubRemoteRepositoryManager(); deployer = new DefaultDeployer(); deployer.setRemoteRepositoryManager( manager ); deployer.setRepositoryEventDispatcher( new StubRepositoryEventDispatcher() ); UpdateCheckManager updateCheckManager = new StaticUpdateCheckManager( true ); deployer.setUpdateCheckManager( updateCheckManager ); deployer.setFileProcessor( TestFileProcessor.INSTANCE ); deployer.setSyncContextFactory( new StubSyncContextFactory() ); request = new DeployRequest(); request.setRepository( new RemoteRepository( "id", "default", "file:///" ) ); connector = new RecordingRepositoryConnector(); manager.setConnector( connector ); listener = new RecordingRepositoryListener(); session.setRepositoryListener( listener ); } @After public void teardown() throws Exception { if ( session.getLocalRepository() != null ) { TestFileUtils.delete( session.getLocalRepository().getBasedir() ); } session = null; listener = null; connector = null; manager = null; deployer = null; } @Test public void testSuccessfulDeploy() throws DeploymentException { connector.setExpectPut( artifact ); connector.setExpectPut( metadata ); request.addArtifact( artifact ); request.addMetadata( metadata ); deployer.deploy( session, request ); connector.assertSeenExpected(); } @Test( expected = DeploymentException.class ) public void testNullArtifactFile() throws DeploymentException { request.addArtifact( artifact.setFile( null ) ); deployer.deploy( session, request ); } @Test( expected = DeploymentException.class ) public void testNullMetadataFile() throws DeploymentException { request.addArtifact( artifact.setFile( null ) ); deployer.deploy( session, request ); } @Test public void testSuccessfulArtifactEvents() throws DeploymentException { request.addArtifact( artifact ); deployer.deploy( session, request ); List events = listener.getEvents(); assertEquals( 2, events.size() ); EventWrapper wrapper = events.get( 0 ); assertEquals( ARTIFACT_DEPLOYING, wrapper.getType() ); RepositoryEvent event = wrapper.getEvent(); assertEquals( artifact, event.getArtifact() ); assertNull( event.getException() ); wrapper = events.get( 1 ); assertEquals( ARTIFACT_DEPLOYED, wrapper.getType() ); event = wrapper.getEvent(); assertEquals( artifact, event.getArtifact() ); assertNull( event.getException() ); } @Test public void testFailingArtifactEvents() { connector = new RecordingRepositoryConnector() { @Override public void get( Collection artifactDownloads, Collection metadataDownloads ) { metadataDownloads = metadataDownloads == null ? Collections. emptyList() : metadataDownloads; artifactDownloads = artifactDownloads == null ? Collections. emptyList() : artifactDownloads; for ( MetadataDownload d : metadataDownloads ) { d.setState( State.ACTIVE ); d.setException( new MetadataTransferException( d.getMetadata(), null, "failed" ) ); d.setState( State.DONE ); } for ( ArtifactDownload d : artifactDownloads ) { d.setState( State.ACTIVE ); d.setException( new ArtifactTransferException( d.getArtifact(), null, "failed" ) ); d.setState( State.DONE ); } } @Override public void put( Collection artifactUploads, Collection metadataUploads ) { metadataUploads = metadataUploads == null ? Collections. emptyList() : metadataUploads; artifactUploads = artifactUploads == null ? Collections. emptyList() : artifactUploads; for ( MetadataUpload d : metadataUploads ) { d.setState( State.ACTIVE ); d.setException( new MetadataTransferException( d.getMetadata(), null, "failed" ) ); d.setState( State.DONE ); } for ( ArtifactUpload d : artifactUploads ) { d.setState( State.ACTIVE ); d.setException( new ArtifactTransferException( d.getArtifact(), null, "failed" ) ); d.setState( State.DONE ); } } }; manager.setConnector( connector ); request.addArtifact( artifact ); try { deployer.deploy( session, request ); fail( "expected exception" ); } catch ( DeploymentException e ) { List events = listener.getEvents(); assertEquals( 2, events.size() ); EventWrapper wrapper = events.get( 0 ); assertEquals( ARTIFACT_DEPLOYING, wrapper.getType() ); RepositoryEvent event = wrapper.getEvent(); assertEquals( artifact, event.getArtifact() ); assertNull( event.getException() ); wrapper = events.get( 1 ); assertEquals( ARTIFACT_DEPLOYED, wrapper.getType() ); event = wrapper.getEvent(); assertEquals( artifact, event.getArtifact() ); assertNotNull( event.getException() ); } } @Test public void testSuccessfulMetadataEvents() throws DeploymentException { request.addMetadata( metadata ); deployer.deploy( session, request ); List events = listener.getEvents(); assertEquals( 2, events.size() ); EventWrapper wrapper = events.get( 0 ); assertEquals( METADATA_DEPLOYING, wrapper.getType() ); RepositoryEvent event = wrapper.getEvent(); assertEquals( metadata, event.getMetadata() ); assertNull( event.getException() ); wrapper = events.get( 1 ); assertEquals( METADATA_DEPLOYED, wrapper.getType() ); event = wrapper.getEvent(); assertEquals( metadata, event.getMetadata() ); assertNull( event.getException() ); } @Test public void testFailingMetdataEvents() { connector = new RecordingRepositoryConnector() { @Override public void get( Collection artifactDownloads, Collection metadataDownloads ) { metadataDownloads = metadataDownloads == null ? Collections. emptyList() : metadataDownloads; artifactDownloads = artifactDownloads == null ? Collections. emptyList() : artifactDownloads; for ( MetadataDownload d : metadataDownloads ) { d.setState( State.ACTIVE ); d.setException( new MetadataTransferException( d.getMetadata(), null, "failed" ) ); d.setState( State.DONE ); } for ( ArtifactDownload d : artifactDownloads ) { d.setState( State.ACTIVE ); d.setException( new ArtifactTransferException( d.getArtifact(), null, "failed" ) ); d.setState( State.DONE ); } } @Override public void put( Collection artifactUploads, Collection metadataUploads ) { metadataUploads = metadataUploads == null ? Collections. emptyList() : metadataUploads; artifactUploads = artifactUploads == null ? Collections. emptyList() : artifactUploads; for ( MetadataUpload d : metadataUploads ) { d.setState( State.ACTIVE ); d.setException( new MetadataTransferException( d.getMetadata(), null, "failed" ) ); d.setState( State.DONE ); } for ( ArtifactUpload d : artifactUploads ) { d.setState( State.ACTIVE ); d.setException( new ArtifactTransferException( d.getArtifact(), null, "failed" ) ); d.setState( State.DONE ); } } }; manager.setConnector( connector ); request.addMetadata( metadata ); try { deployer.deploy( session, request ); fail( "expected exception" ); } catch ( DeploymentException e ) { List events = listener.getEvents(); assertEquals( 2, events.size() ); EventWrapper wrapper = events.get( 0 ); assertEquals( METADATA_DEPLOYING, wrapper.getType() ); RepositoryEvent event = wrapper.getEvent(); assertEquals( metadata, event.getMetadata() ); assertNull( event.getException() ); wrapper = events.get( 1 ); assertEquals( METADATA_DEPLOYED, wrapper.getType() ); event = wrapper.getEvent(); assertEquals( metadata, event.getMetadata() ); assertNotNull( event.getException() ); } } @Test public void testStaleLocalMetadataCopyGetsDeletedBeforeMergeWhenMetadataIsNotCurrentlyPresentInRemoteRepo() throws Exception { MergeableMetadata metadata = new MergeableMetadata() { public Metadata setFile( File file ) { return this; } public String getVersion() { return ""; } public String getType() { return "test.properties"; } public Nature getNature() { return Nature.RELEASE; } public String getGroupId() { return "org"; } public File getFile() { return null; } public String getArtifactId() { return "aether"; } public void merge( File current, File result ) throws RepositoryException { Properties props = new Properties(); try { if ( current.isFile() ) { TestFileUtils.read( props, current ); } props.setProperty( "new", "value" ); TestFileUtils.write( props, result ); } catch ( IOException e ) { throw new RepositoryException( e.getMessage(), e ); } } public boolean isMerged() { return false; } }; manager.setConnector( new RepositoryConnector() { public void put( Collection artifactUploads, Collection metadataUploads ) { } public void get( Collection artifactDownloads, Collection metadataDownloads ) { if ( metadataDownloads != null ) { for ( MetadataDownload download : metadataDownloads ) { download.setException( new MetadataNotFoundException( download.getMetadata(), null, null ) ); } } } public void close() { } } ); request.addMetadata( metadata ); File metadataFile = new File( session.getLocalRepository().getBasedir(), session.getLocalRepositoryManager().getPathForRemoteMetadata( metadata, request.getRepository(), "" ) ); Properties props = new Properties(); props.setProperty( "old", "value" ); TestFileUtils.write( props, metadataFile ); deployer.deploy( session, request ); props = new Properties(); TestFileUtils.read( props, metadataFile ); assertNull( props.toString(), props.get( "old" ) ); } } DefaultFileProcessorTest.java000066400000000000000000000065501167050556700341530ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/java/org/sonatype/aether/impl/internalpackage org.sonatype.aether.impl.internal; /******************************************************************************* * 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 static org.junit.Assert.*; import java.io.File; import java.io.IOException; import java.nio.ByteBuffer; import java.util.concurrent.atomic.AtomicInteger; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.sonatype.aether.spi.io.FileProcessor.ProgressListener; import org.sonatype.aether.test.util.TestFileUtils; /** * @author Benjamin Hanzelmann */ public class DefaultFileProcessorTest { private File targetDir; private DefaultFileProcessor fileProcessor; @Before public void setup() throws IOException { targetDir = TestFileUtils.createTempDir( getClass().getSimpleName() ); fileProcessor = new DefaultFileProcessor(); } @After public void teardown() throws Exception { TestFileUtils.delete( targetDir ); fileProcessor = null; } @Test public void testCopy() throws IOException { File file = TestFileUtils.createTempFile( "testCopy\nasdf" ); File target = new File( targetDir, "testCopy.txt" ); fileProcessor.copy( file, target, null ); TestFileUtils.assertContent( "testCopy\nasdf".getBytes( "UTF-8" ), file ); file.delete(); } @Test public void testOverwrite() throws IOException { File file = TestFileUtils.createTempFile( "testCopy\nasdf" ); for ( int i = 0; i < 5; i++ ) { File target = new File( targetDir, "testCopy.txt" ); fileProcessor.copy( file, target, null ); TestFileUtils.assertContent( "testCopy\nasdf".getBytes( "UTF-8" ), file ); } file.delete(); } @Test public void testCopyEmptyFile() throws IOException { File file = TestFileUtils.createTempFile( "" ); File target = new File( targetDir, "testCopyEmptyFile" ); target.delete(); fileProcessor.copy( file, target, null ); assertTrue( "empty file was not copied", target.exists() && target.length() == 0 ); target.delete(); } @Test public void testProgressingChannel() throws IOException { File file = TestFileUtils.createTempFile( "test" ); File target = new File( targetDir, "testProgressingChannel" ); target.delete(); final AtomicInteger progressed = new AtomicInteger(); ProgressListener listener = new ProgressListener() { public void progressed( ByteBuffer buffer ) throws IOException { progressed.addAndGet( buffer.remaining() ); } }; fileProcessor.copy( file, target, listener ); assertTrue( "file was not created", target.isFile() ); assertEquals( "file was not fully copied", 4, target.length() ); assertEquals( "listener not called", 4, progressed.intValue() ); target.delete(); } } aether-1.13.1/aether-impl/src/test/java/org/sonatype/aether/impl/internal/DefaultInstallerTest.java000066400000000000000000000311001167050556700333750ustar00rootroot00000000000000package org.sonatype.aether.impl.internal; /******************************************************************************* * 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 static org.junit.Assert.*; import static org.sonatype.aether.test.impl.RecordingRepositoryListener.Type.*; import java.io.File; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.util.List; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.sonatype.aether.RepositoryEvent; import org.sonatype.aether.artifact.Artifact; 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.metadata.Metadata.Nature; import org.sonatype.aether.test.impl.RecordingRepositoryListener; import org.sonatype.aether.test.impl.RecordingRepositoryListener.EventWrapper; import org.sonatype.aether.test.impl.TestFileProcessor; import org.sonatype.aether.test.impl.TestLocalRepositoryManager; import org.sonatype.aether.test.impl.TestRepositorySystemSession; import org.sonatype.aether.test.util.TestFileUtils; import org.sonatype.aether.util.artifact.DefaultArtifact; import org.sonatype.aether.util.metadata.DefaultMetadata; public class DefaultInstallerTest { private Artifact artifact; private DefaultMetadata metadata; private TestRepositorySystemSession session; private String localArtifactPath; private String localMetadataPath; private DefaultInstaller installer; private InstallRequest request; private RecordingRepositoryListener listener; private File localArtifactFile; private TestLocalRepositoryManager lrm; @Before public void setup() throws IOException { artifact = new DefaultArtifact( "gid", "aid", "jar", "ver" ); artifact = artifact.setFile( TestFileUtils.createTempFile( "artifact".getBytes(), 1 ) ); metadata = new DefaultMetadata( "gid", "aid", "ver", "type", Nature.RELEASE_OR_SNAPSHOT, TestFileUtils.createTempFile( "metadata".getBytes(), 1 ) ); session = new TestRepositorySystemSession(); localArtifactPath = session.getLocalRepositoryManager().getPathForLocalArtifact( artifact ); localMetadataPath = session.getLocalRepositoryManager().getPathForLocalMetadata( metadata ); localArtifactFile = new File( session.getLocalRepository().getBasedir(), localArtifactPath ); installer = new DefaultInstaller(); installer.setFileProcessor( TestFileProcessor.INSTANCE ); installer.setRepositoryEventDispatcher( new StubRepositoryEventDispatcher() ); installer.setSyncContextFactory( new StubSyncContextFactory() ); request = new InstallRequest(); listener = new RecordingRepositoryListener(); session.setRepositoryListener( listener ); lrm = (TestLocalRepositoryManager) session.getLocalRepositoryManager(); TestFileUtils.delete( session.getLocalRepository().getBasedir() ); } @After public void teardown() throws Exception { TestFileUtils.delete( session.getLocalRepository().getBasedir() ); } @Test public void testSuccessfulInstall() throws InstallationException, UnsupportedEncodingException, IOException { File artifactFile = new File( session.getLocalRepositoryManager().getRepository().getBasedir(), localArtifactPath ); File metadataFile = new File( session.getLocalRepositoryManager().getRepository().getBasedir(), localMetadataPath ); artifactFile.delete(); metadataFile.delete(); request.addArtifact( artifact ); request.addMetadata( metadata ); InstallResult result = installer.install( session, request ); assertTrue( artifactFile.exists() ); TestFileUtils.assertContent( "artifact".getBytes( "UTF-8" ), artifactFile ); assertTrue( metadataFile.exists() ); TestFileUtils.assertContent( "metadata".getBytes( "UTF-8" ), metadataFile ); assertEquals( result.getRequest(), request ); assertEquals( result.getArtifacts().size(), 1 ); assertTrue( result.getArtifacts().contains( artifact ) ); assertEquals( result.getMetadata().size(), 1 ); assertTrue( result.getMetadata().contains( metadata ) ); assertEquals( 1, lrm.getMetadataRegistration().size() ); assertTrue( lrm.getMetadataRegistration().contains( metadata ) ); assertEquals( 1, lrm.getArtifactRegistration().size() ); assertTrue( lrm.getArtifactRegistration().contains( artifact ) ); } @Test( expected = InstallationException.class ) public void testNullArtifactFile() throws InstallationException { InstallRequest request = new InstallRequest(); request.addArtifact( artifact.setFile( null ) ); installer.install( session, request ); } @Test( expected = InstallationException.class ) public void testNullMetadataFile() throws InstallationException { InstallRequest request = new InstallRequest(); request.addMetadata( metadata.setFile( null ) ); installer.install( session, request ); } @Test( expected = InstallationException.class ) public void testArtifactExistsAsDir() throws InstallationException { String path = session.getLocalRepositoryManager().getPathForLocalArtifact( artifact ); File file = new File( session.getLocalRepository().getBasedir(), path ); assertFalse( file.getAbsolutePath() + " is a file, not directory", file.isFile() ); assertFalse( file.getAbsolutePath() + " already exists", file.exists() ); assertTrue( "failed to setup test: could not create " + file.getAbsolutePath(), file.mkdirs() || file.isDirectory() ); request.addArtifact( artifact ); installer.install( session, request ); } @Test( expected = InstallationException.class ) public void testMetadataExistsAsDir() throws InstallationException { String path = session.getLocalRepositoryManager().getPathForLocalMetadata( metadata ); assertTrue( "failed to setup test: could not create " + path, new File( session.getLocalRepository().getBasedir(), path ).mkdirs() ); request.addMetadata( metadata ); installer.install( session, request ); } @Test public void testSuccessfulArtifactEvents() throws InstallationException { InstallRequest request = new InstallRequest(); request.addArtifact( artifact ); installer.install( session, request ); checkEvents( "Repository Event problem", artifact, false ); } @Test public void testSuccessfulMetadataEvents() throws InstallationException { InstallRequest request = new InstallRequest(); request.addMetadata( metadata ); installer.install( session, request ); checkEvents( "Repository Event problem", metadata, false ); } @Test public void testFailingEventsNullArtifactFile() { checkFailedEvents( "null artifact file", this.artifact.setFile( null ) ); } @Test public void testFailingEventsNullMetadataFile() { checkFailedEvents( "null metadata file", this.metadata.setFile( null ) ); } @Test public void testFailingEventsArtifactExistsAsDir() { String path = session.getLocalRepositoryManager().getPathForLocalArtifact( artifact ); assertTrue( "failed to setup test: could not create " + path, new File( session.getLocalRepository().getBasedir(), path ).mkdirs() ); checkFailedEvents( "target exists as dir", artifact ); } @Test public void testFailingEventsMetadataExistsAsDir() { String path = session.getLocalRepositoryManager().getPathForLocalMetadata( metadata ); assertTrue( "failed to setup test: could not create " + path, new File( session.getLocalRepository().getBasedir(), path ).mkdirs() ); checkFailedEvents( "target exists as dir", metadata ); } private void checkFailedEvents( String msg, Metadata metadata ) { InstallRequest request = new InstallRequest().addMetadata( metadata ); msg = "Repository events problem (case: " + msg + ")"; try { installer.install( session, request ); fail( "expected exception" ); } catch ( InstallationException e ) { checkEvents( msg, metadata, true ); } } private void checkEvents( String msg, Metadata metadata, boolean failed ) { List events = listener.getEvents(); assertEquals( msg, 2, events.size() ); EventWrapper wrapper = events.get( 0 ); assertEquals( msg, METADATA_INSTALLING, wrapper.getType() ); RepositoryEvent event = wrapper.getEvent(); assertEquals( msg, metadata, event.getMetadata() ); assertNull( msg, event.getException() ); wrapper = events.get( 1 ); assertEquals( msg, METADATA_INSTALLED, wrapper.getType() ); event = wrapper.getEvent(); assertEquals( msg, metadata, event.getMetadata() ); if ( failed ) { assertNotNull( msg, event.getException() ); } else { assertNull( msg, event.getException() ); } } private void checkFailedEvents( String msg, Artifact artifact ) { InstallRequest request = new InstallRequest().addArtifact( artifact ); msg = "Repository events problem (case: " + msg + ")"; try { installer.install( session, request ); fail( "expected exception" ); } catch ( InstallationException e ) { checkEvents( msg, artifact, true ); } } private void checkEvents( String msg, Artifact artifact, boolean failed ) { List events = listener.getEvents(); assertEquals( msg, 2, events.size() ); EventWrapper wrapper = events.get( 0 ); assertEquals( msg, ARTIFACT_INSTALLING, wrapper.getType() ); RepositoryEvent event = wrapper.getEvent(); assertEquals( msg, artifact, event.getArtifact() ); assertNull( msg, event.getException() ); wrapper = events.get( 1 ); assertEquals( msg, ARTIFACT_INSTALLED, wrapper.getType() ); event = wrapper.getEvent(); assertEquals( msg, artifact, event.getArtifact() ); if ( failed ) { assertNotNull( msg + " > expected exception", event.getException() ); } else { assertNull( msg + " > " + event.getException(), event.getException() ); } } @Test public void testDoNotUpdateUnchangedArtifact() throws InstallationException { request.addArtifact( artifact ); installer.install( session, request ); installer.setFileProcessor( new DefaultFileProcessor() { @Override public long copy( File src, File target, ProgressListener listener ) throws IOException { throw new IOException( "copy called" ); } } ); request = new InstallRequest(); request.addArtifact( artifact ); installer.install( session, request ); } @Test public void testSetArtifactTimestamps() throws InstallationException { artifact.getFile().setLastModified( artifact.getFile().lastModified() - 60000 ); request.addArtifact( artifact ); installer.install( session, request ); assertEquals( "artifact timestamp was not set to src file", artifact.getFile().lastModified(), localArtifactFile.lastModified() ); request = new InstallRequest(); request.addArtifact( artifact ); artifact.getFile().setLastModified( artifact.getFile().lastModified() - 60000 ); installer.install( session, request ); assertEquals( "artifact timestamp was not set to src file", artifact.getFile().lastModified(), localArtifactFile.lastModified() ); } } DefaultMetadataResolverTest.java000066400000000000000000000231531167050556700346340ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/java/org/sonatype/aether/impl/internalpackage org.sonatype.aether.impl.internal; /******************************************************************************* * 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 static org.junit.Assert.*; import java.io.File; import java.io.IOException; import java.net.URI; import java.util.Arrays; import java.util.Collection; import java.util.List; import java.util.Set; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.metadata.Metadata; import org.sonatype.aether.repository.LocalMetadataRegistration; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.resolution.MetadataRequest; import org.sonatype.aether.resolution.MetadataResult; import org.sonatype.aether.spi.connector.ArtifactDownload; import org.sonatype.aether.spi.connector.MetadataDownload; import org.sonatype.aether.test.impl.TestLocalRepositoryManager; import org.sonatype.aether.test.impl.TestRepositorySystemSession; import org.sonatype.aether.test.util.TestFileUtils; import org.sonatype.aether.test.util.impl.StubMetadata; import org.sonatype.aether.transfer.MetadataNotFoundException; /** * @author Benjamin Hanzelmann */ public class DefaultMetadataResolverTest { private DefaultMetadataResolver resolver; private StubRemoteRepositoryManager manager; private RemoteRepository repository; private TestRepositorySystemSession session; private Metadata metadata; private RecordingRepositoryConnector connector; private TestLocalRepositoryManager lrm; @Before public void setup() throws Exception { session = new TestRepositorySystemSession(); // session.setLocalRepositoryManager( new EnhancedLocalRepositoryManager( TestFileUtils.createTempDir() ) ); lrm = (TestLocalRepositoryManager) session.getLocalRepositoryManager(); manager = new StubRemoteRepositoryManager(); resolver = new DefaultMetadataResolver(); resolver.setUpdateCheckManager( new StaticUpdateCheckManager( true ) ); resolver.setRepositoryEventDispatcher( new StubRepositoryEventDispatcher() ); resolver.setRemoteRepositoryManager( manager ); resolver.setSyncContextFactory( new StubSyncContextFactory() ); repository = new RemoteRepository( "test-DMRT", "default", TestFileUtils.createTempDir().toURI().toURL().toString() ); metadata = new StubMetadata( "gid", "aid", "ver", "maven-metadata.xml", Metadata.Nature.RELEASE_OR_SNAPSHOT ); connector = new RecordingRepositoryConnector(); manager.setConnector( connector ); } @After public void teardown() throws Exception { TestFileUtils.delete( new File( new URI( repository.getUrl() ) ) ); TestFileUtils.delete( session.getLocalRepository().getBasedir() ); } @Test public void testNoRepositoryFailing() { MetadataRequest request = new MetadataRequest( metadata, null, "" ); List results = resolver.resolveMetadata( session, Arrays.asList( request ) ); assertEquals( 1, results.size() ); MetadataResult result = results.get( 0 ); assertSame( request, result.getRequest() ); assertNotNull( "" + ( result.getMetadata() != null ? result.getMetadata().getFile() : result.getMetadata() ), result.getException() ); assertEquals( MetadataNotFoundException.class, result.getException().getClass() ); assertNull( result.getMetadata() ); } @Test public void testResolve() throws IOException { connector.setExpectGet( metadata ); // prepare "download" File file = new File( session.getLocalRepository().getBasedir(), session.getLocalRepositoryManager().getPathForRemoteMetadata( metadata, repository, "" ) ); TestFileUtils.write( file.getAbsolutePath(), file ); MetadataRequest request = new MetadataRequest( metadata, repository, "" ); List results = resolver.resolveMetadata( session, Arrays.asList( request ) ); assertEquals( 1, results.size() ); MetadataResult result = results.get( 0 ); assertSame( request, result.getRequest() ); assertNull( result.getException() ); assertNotNull( result.getMetadata() ); assertNotNull( result.getMetadata().getFile() ); assertEquals( file, result.getMetadata().getFile() ); assertEquals( metadata, result.getMetadata().setFile( null ) ); connector.assertSeenExpected(); Set metadataRegistration = ( (TestLocalRepositoryManager) session.getLocalRepositoryManager() ).getMetadataRegistration(); assertTrue( metadataRegistration.contains( metadata ) ); assertEquals( 1, metadataRegistration.size() ); } @Test public void testRemoveMetadataIfMissing() throws IOException { connector = new RecordingRepositoryConnector() { @Override public void get( Collection artifactDownloads, Collection metadataDownloads ) { super.get( artifactDownloads, metadataDownloads ); for ( MetadataDownload d : metadataDownloads ) { d.setException( new MetadataNotFoundException( metadata, repository ) ); } } }; manager.setConnector( connector ); File file = new File( session.getLocalRepository().getBasedir(), session.getLocalRepositoryManager().getPathForRemoteMetadata( metadata, repository, "" ) ); TestFileUtils.write( file.getAbsolutePath(), file ); metadata.setFile( file ); MetadataRequest request = new MetadataRequest( metadata, repository, "" ); request.setDeleteLocalCopyIfMissing( true ); List results = resolver.resolveMetadata( session, Arrays.asList( request ) ); assertEquals( 1, results.size() ); MetadataResult result = results.get( 0 ); assertNotNull( result.getException() ); assertEquals( false, file.exists() ); } @Test public void testOfflineSessionResolveMetadataMissing() { session.setOffline( true ); MetadataRequest request = new MetadataRequest( metadata, repository, "" ); List results = resolver.resolveMetadata( session, Arrays.asList( request ) ); assertEquals( 1, results.size() ); MetadataResult result = results.get( 0 ); assertSame( request, result.getRequest() ); assertNotNull( result.getException() ); assertNull( result.getMetadata() ); connector.assertSeenExpected(); } @Test public void testOfflineSessionResolveMetadata() throws IOException { session.setOffline( true ); String path = session.getLocalRepositoryManager().getPathForRemoteMetadata( metadata, repository, "" ); File file = new File( session.getLocalRepository().getBasedir(), path ); TestFileUtils.write( file.getAbsolutePath(), file ); // set file to use in TestLRM find() metadata = metadata.setFile( file ); MetadataRequest request = new MetadataRequest( metadata, repository, "" ); List results = resolver.resolveMetadata( session, Arrays.asList( request ) ); assertEquals( 1, results.size() ); MetadataResult result = results.get( 0 ); assertSame( request, result.getRequest() ); assertNull( String.valueOf( result.getException() ), result.getException() ); assertNotNull( result.getMetadata() ); assertNotNull( result.getMetadata().getFile() ); assertEquals( file, result.getMetadata().getFile() ); assertEquals( metadata.setFile( null ), result.getMetadata().setFile( null ) ); connector.assertSeenExpected(); } @Test public void testFavorLocal() throws IOException { lrm.add( session, new LocalMetadataRegistration( metadata ) ); String path = session.getLocalRepositoryManager().getPathForLocalMetadata( metadata ); File file = new File( session.getLocalRepository().getBasedir(), path ); TestFileUtils.write( file.getAbsolutePath(), file ); final long timestamp = file.lastModified(); MetadataRequest request = new MetadataRequest( metadata, repository, "" ); request.setFavorLocalRepository( true ); resolver.setUpdateCheckManager( new StaticUpdateCheckManager( false ) { @Override public boolean isUpdatedRequired( RepositorySystemSession session, long lastModified, String policy ) { assertEquals( timestamp, lastModified ); return super.isUpdatedRequired( session, lastModified, policy ); } } ); List results = resolver.resolveMetadata( session, Arrays.asList( request ) ); assertEquals( 1, results.size() ); MetadataResult result = results.get( 0 ); assertSame( request, result.getRequest() ); assertNull( String.valueOf( result.getException() ), result.getException() ); connector.assertSeenExpected(); } } DefaultRemoteRepositoryManagerTest.java000066400000000000000000000275541167050556700362310ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/java/org/sonatype/aether/impl/internalpackage org.sonatype.aether.impl.internal; /******************************************************************************* * 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 static org.junit.Assert.assertEquals; import java.util.Arrays; import java.util.Collections; import java.util.List; import org.junit.Before; import org.junit.Test; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.impl.RemoteRepositoryManager; import org.sonatype.aether.impl.UpdateCheck; import org.sonatype.aether.impl.UpdateCheckManager; import org.sonatype.aether.metadata.Metadata; import org.sonatype.aether.repository.Authentication; import org.sonatype.aether.repository.MirrorSelector; import org.sonatype.aether.repository.Proxy; import org.sonatype.aether.repository.ProxySelector; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.repository.RepositoryPolicy; import org.sonatype.aether.test.impl.SysoutLogger; import org.sonatype.aether.test.impl.TestRepositorySystemSession; import org.sonatype.aether.transfer.ArtifactTransferException; import org.sonatype.aether.transfer.MetadataTransferException; /** * */ public class DefaultRemoteRepositoryManagerTest { private TestRepositorySystemSession session; private RemoteRepositoryManager manager; @Before public void setup() throws Exception { session = new TestRepositorySystemSession(); session.setChecksumPolicy( null ); session.setUpdatePolicy( null ); manager = new DefaultRemoteRepositoryManager( new SysoutLogger(), new StubUpdateCheckManager(), null ); } public void teardown() throws Exception { manager = null; session = null; } private RemoteRepository newRepo( String id, String url, boolean enabled, String updates, String checksums ) { RepositoryPolicy policy = new RepositoryPolicy( enabled, updates, checksums ); return new RemoteRepository( id, "test", url ).setPolicy( true, policy ).setPolicy( false, policy ); } private void assertEqual( RemoteRepository expected, RemoteRepository actual ) { assertEquals( "id", expected.getId(), actual.getId() ); assertEquals( "url", expected.getUrl(), actual.getUrl() ); assertEquals( "type", expected.getContentType(), actual.getContentType() ); assertEqual( expected.getPolicy( false ), actual.getPolicy( false ) ); assertEqual( expected.getPolicy( true ), actual.getPolicy( true ) ); } private void assertEqual( RepositoryPolicy expected, RepositoryPolicy actual ) { assertEquals( "enabled", expected.isEnabled(), actual.isEnabled() ); assertEquals( "checksums", expected.getChecksumPolicy(), actual.getChecksumPolicy() ); assertEquals( "updates", expected.getUpdatePolicy(), actual.getUpdatePolicy() ); } @Test public void testGetPolicy() { RepositoryPolicy snapshotPolicy = new RepositoryPolicy( true, RepositoryPolicy.UPDATE_POLICY_ALWAYS, RepositoryPolicy.CHECKSUM_POLICY_IGNORE ); RepositoryPolicy releasePolicy = new RepositoryPolicy( true, RepositoryPolicy.UPDATE_POLICY_NEVER, RepositoryPolicy.CHECKSUM_POLICY_FAIL ); RemoteRepository repo = new RemoteRepository( "id", "type", "http://localhost" ); repo.setPolicy( true, snapshotPolicy ); repo.setPolicy( false, releasePolicy ); RepositoryPolicy effectivePolicy = manager.getPolicy( session, repo, true, true ); assertEquals( true, effectivePolicy.isEnabled() ); assertEquals( RepositoryPolicy.CHECKSUM_POLICY_IGNORE, effectivePolicy.getChecksumPolicy() ); assertEquals( RepositoryPolicy.UPDATE_POLICY_ALWAYS, effectivePolicy.getUpdatePolicy() ); } @Test public void testAggregateSimpleRepos() { RemoteRepository dominant1 = newRepo( "a", "file://", false, "", "" ); RemoteRepository recessive1 = newRepo( "a", "http://", true, "", "" ); RemoteRepository recessive2 = newRepo( "b", "file://", true, "", "" ); List result = manager.aggregateRepositories( session, Arrays.asList( dominant1 ), Arrays.asList( recessive1, recessive2 ), false ); assertEquals( 2, result.size() ); assertEqual( dominant1, result.get( 0 ) ); assertEqual( recessive2, result.get( 1 ) ); } @Test public void testAggregateMirrorRepos_DominantMirrorComplete() { RemoteRepository dominant1 = newRepo( "a", "http://", false, "", "" ); RemoteRepository dominantMirror1 = newRepo( "x", "file://", false, "", "" ); dominantMirror1.setMirroredRepositories( Arrays.asList( dominant1 ) ); RemoteRepository recessive1 = newRepo( "a", "https://", true, "", "" ); RemoteRepository recessiveMirror1 = newRepo( "x", "http://", true, "", "" ); recessiveMirror1.setMirroredRepositories( Arrays.asList( recessive1 ) ); List result = manager.aggregateRepositories( session, Arrays.asList( dominantMirror1 ), Arrays.asList( recessiveMirror1 ), false ); assertEquals( 1, result.size() ); assertEqual( dominantMirror1, result.get( 0 ) ); assertEquals( 1, result.get( 0 ).getMirroredRepositories().size() ); assertEquals( dominant1, result.get( 0 ).getMirroredRepositories().get( 0 ) ); } @Test public void testAggregateMirrorRepos_DominantMirrorIncomplete() { RemoteRepository dominant1 = newRepo( "a", "http://", false, "", "" ); RemoteRepository dominantMirror1 = newRepo( "x", "file://", false, "", "" ); dominantMirror1.setMirroredRepositories( Arrays.asList( dominant1 ) ); RemoteRepository recessive1 = newRepo( "a", "https://", true, "", "" ); RemoteRepository recessive2 = newRepo( "b", "https://", true, "", "" ); RemoteRepository recessiveMirror1 = newRepo( "x", "http://", true, "", "" ); recessiveMirror1.setMirroredRepositories( Arrays.asList( recessive1, recessive2 ) ); List result = manager.aggregateRepositories( session, Arrays.asList( dominantMirror1 ), Arrays.asList( recessiveMirror1 ), false ); assertEquals( 1, result.size() ); assertEqual( newRepo( "x", "file://", true, "", "" ), result.get( 0 ) ); assertEquals( 2, result.get( 0 ).getMirroredRepositories().size() ); assertEquals( dominant1, result.get( 0 ).getMirroredRepositories().get( 0 ) ); assertEquals( recessive2, result.get( 0 ).getMirroredRepositories().get( 1 ) ); } @Test public void testMirrorAuthentication() { final RemoteRepository repo = newRepo( "a", "http://", false, "", "" ); final RemoteRepository mirror = newRepo( "a", "http://", false, "", "" ); mirror.setAuthentication( new Authentication( "username", "password" ) ); session.setMirrorSelector( new MirrorSelector() { public RemoteRepository getMirror( RemoteRepository repository ) { return mirror; } } ); List result = manager.aggregateRepositories( session, Collections. emptyList(), Arrays.asList( repo ), true ); assertEquals( 1, result.size() ); assertEquals( "username", result.get( 0 ).getAuthentication().getUsername() ); assertEquals( "password", result.get( 0 ).getAuthentication().getPassword() ); } @Test public void testMirrorProxy() { final RemoteRepository repo = newRepo( "a", "http://", false, "", "" ); final RemoteRepository mirror = newRepo( "a", "http://", false, "", "" ); mirror.setProxy( new Proxy( "http", "host", 2011, null ) ); session.setMirrorSelector( new MirrorSelector() { public RemoteRepository getMirror( RemoteRepository repository ) { return mirror; } } ); List result = manager.aggregateRepositories( session, Collections. emptyList(), Arrays.asList( repo ), true ); assertEquals( 1, result.size() ); assertEquals( "http", result.get( 0 ).getProxy().getType() ); assertEquals( "host", result.get( 0 ).getProxy().getHost() ); assertEquals( 2011, result.get( 0 ).getProxy().getPort() ); } @Test public void testProxySelector() { final RemoteRepository repo = newRepo( "a", "http://", false, "", "" ); final Proxy proxy = new Proxy( "http", "host", 2011, null ); session.setProxySelector( new ProxySelector() { public Proxy getProxy( RemoteRepository repository ) { return proxy; } } ); session.setMirrorSelector( new MirrorSelector() { public RemoteRepository getMirror( RemoteRepository repository ) { return null; } } ); List result = manager.aggregateRepositories( session, Collections. emptyList(), Arrays.asList( repo ), true ); assertEquals( 1, result.size() ); assertEquals( "http", result.get( 0 ).getProxy().getType() ); assertEquals( "host", result.get( 0 ).getProxy().getHost() ); assertEquals( 2011, result.get( 0 ).getProxy().getPort() ); } private static class StubUpdateCheckManager implements UpdateCheckManager { public String getEffectiveUpdatePolicy( RepositorySystemSession session, String policy1, String policy2 ) { return ordinalOfUpdatePolicy( policy1 ) < ordinalOfUpdatePolicy( policy2 ) ? policy1 : policy2; } private int ordinalOfUpdatePolicy( String policy ) { if ( RepositoryPolicy.UPDATE_POLICY_DAILY.equals( policy ) ) { return 1440; } else if ( RepositoryPolicy.UPDATE_POLICY_ALWAYS.equals( policy ) ) { return 0; } else if ( policy != null && policy.startsWith( RepositoryPolicy.UPDATE_POLICY_INTERVAL ) ) { String s = policy.substring( RepositoryPolicy.UPDATE_POLICY_INTERVAL.length() + 1 ); return Integer.valueOf( s ); } else { // assume "never" return Integer.MAX_VALUE; } } public boolean isUpdatedRequired( RepositorySystemSession session, long lastModified, String policy ) { return false; } public void checkArtifact( RepositorySystemSession session, UpdateCheck check ) { } public void touchArtifact( RepositorySystemSession session, UpdateCheck check ) { } public void checkMetadata( RepositorySystemSession session, UpdateCheck check ) { } public void touchMetadata( RepositorySystemSession session, UpdateCheck check ) { } } } DefaultRepositoryEventDispatcherTest.java000066400000000000000000000050441167050556700365610ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/java/org/sonatype/aether/impl/internalpackage org.sonatype.aether.impl.internal; /******************************************************************************* * 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 static org.junit.Assert.*; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; import java.util.Locale; import org.junit.Test; import org.sonatype.aether.RepositoryEvent; import org.sonatype.aether.RepositoryListener; import org.sonatype.aether.test.impl.TestRepositorySystemSession; import org.sonatype.aether.util.listener.DefaultRepositoryEvent; /** * @author Benjamin Bentmann */ public class DefaultRepositoryEventDispatcherTest { @Test public void testDispatchHandlesAllEventTypes() throws Exception { DefaultRepositoryEventDispatcher dispatcher = new DefaultRepositoryEventDispatcher(); ListenerHandler handler = new ListenerHandler(); RepositoryListener listener = (RepositoryListener) Proxy.newProxyInstance( getClass().getClassLoader(), new Class[] { RepositoryListener.class }, handler ); TestRepositorySystemSession session = new TestRepositorySystemSession(); session.setRepositoryListener( listener ); for ( RepositoryEvent.EventType type : RepositoryEvent.EventType.values() ) { DefaultRepositoryEvent event = new DefaultRepositoryEvent( type, session, null ); handler.methodName = null; dispatcher.dispatch( event ); assertNotNull( "not handled: " + type, handler.methodName ); assertEquals( "badly handled: " + type, type.name().replace( "_", "" ).toLowerCase( Locale.ENGLISH ), handler.methodName.toLowerCase( Locale.ENGLISH ) ); } } static class ListenerHandler implements InvocationHandler { public String methodName; public Object invoke( Object proxy, Method method, Object[] args ) throws Throwable { if ( args.length == 1 && args[0] instanceof RepositoryEvent ) { methodName = method.getName(); } return null; } } } DefaultUpdateCheckManagerTest.java000066400000000000000000000672351167050556700350560ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/java/org/sonatype/aether/impl/internalpackage org.sonatype.aether.impl.internal; /******************************************************************************* * 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 static org.junit.Assert.*; import static org.sonatype.aether.repository.RepositoryPolicy.*; import java.io.File; import java.net.URI; import java.util.Calendar; import java.util.Date; import java.util.TimeZone; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.impl.UpdateCheck; import org.sonatype.aether.metadata.Metadata; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.repository.RepositoryPolicy; import org.sonatype.aether.test.impl.TestRepositorySystemSession; import org.sonatype.aether.test.util.TestFileUtils; import org.sonatype.aether.test.util.impl.StubArtifact; import org.sonatype.aether.test.util.impl.StubMetadata; import org.sonatype.aether.transfer.ArtifactNotFoundException; import org.sonatype.aether.transfer.ArtifactTransferException; import org.sonatype.aether.transfer.MetadataNotFoundException; import org.sonatype.aether.transfer.MetadataTransferException; /** * @author Benjamin Hanzelmann */ public class DefaultUpdateCheckManagerTest { private static final int HOUR = 60 * 60 * 1000; private DefaultUpdateCheckManager manager; private TestRepositorySystemSession session; private StubMetadata metadata; private RemoteRepository repository; private StubArtifact artifact; @Before public void setup() throws Exception { File dir = TestFileUtils.createTempFile( "" ); TestFileUtils.delete( dir ); File metadataFile = new File( dir, "metadata.txt" ); TestFileUtils.write( "metadata", metadataFile ); File artifactFile = new File( dir, "artifact.txt" ); TestFileUtils.write( "artifact", artifactFile ); session = new TestRepositorySystemSession(); repository = new RemoteRepository( "id", "default", TestFileUtils.createTempDir().toURL().toString() ); manager = new DefaultUpdateCheckManager(); metadata = new StubMetadata( "gid", "aid", "ver", "maven-metadata.xml", Metadata.Nature.RELEASE_OR_SNAPSHOT, metadataFile ); artifact = new StubArtifact( "gid", "aid", "", "ext", "ver" ).setFile( artifactFile ); } @After public void teardown() throws Exception { new File( metadata.getFile().getParent(), "resolver-status.properties" ).delete(); new File( artifact.getFile().getPath() + ".lastUpdated" ).delete(); metadata.getFile().delete(); artifact.getFile().delete(); TestFileUtils.delete( new File( new URI( repository.getUrl() ) ) ); } static void resetSessionData( RepositorySystemSession session ) { session.getData().set( "updateCheckManager.checks", null ); } private UpdateCheck newMetadataCheck() { UpdateCheck check = new UpdateCheck(); check.setItem( metadata ); check.setFile( metadata.getFile() ); check.setRepository( repository ); check.setAuthoritativeRepository( repository ); check.setPolicy( RepositoryPolicy.UPDATE_POLICY_INTERVAL + ":10" ); return check; } private UpdateCheck newArtifactCheck() { UpdateCheck check = new UpdateCheck(); check.setItem( artifact ); check.setFile( artifact.getFile() ); check.setRepository( repository ); check.setPolicy( RepositoryPolicy.UPDATE_POLICY_INTERVAL + ":10" ); return check; } @Test public void testIsUpdateRequired_PolicyNever() throws Exception { String policy = RepositoryPolicy.UPDATE_POLICY_NEVER; assertEquals( false, manager.isUpdatedRequired( session, Long.MIN_VALUE, policy ) ); assertEquals( false, manager.isUpdatedRequired( session, Long.MAX_VALUE, policy ) ); assertEquals( false, manager.isUpdatedRequired( session, 0, policy ) ); assertEquals( false, manager.isUpdatedRequired( session, 1, policy ) ); assertEquals( false, manager.isUpdatedRequired( session, System.currentTimeMillis() - 604800000, policy ) ); } @Test public void testIsUpdateRequired_PolicyAlways() throws Exception { String policy = RepositoryPolicy.UPDATE_POLICY_ALWAYS; assertEquals( true, manager.isUpdatedRequired( session, Long.MIN_VALUE, policy ) ); assertEquals( true, manager.isUpdatedRequired( session, Long.MAX_VALUE, policy ) ); assertEquals( true, manager.isUpdatedRequired( session, 0, policy ) ); assertEquals( true, manager.isUpdatedRequired( session, 1, policy ) ); assertEquals( true, manager.isUpdatedRequired( session, System.currentTimeMillis() - 1000, policy ) ); } @Test public void testIsUpdateRequired_PolicyDaily() throws Exception { Calendar cal = Calendar.getInstance(); cal.set( Calendar.HOUR_OF_DAY, 0 ); cal.set( Calendar.MINUTE, 0 ); cal.set( Calendar.SECOND, 0 ); cal.set( Calendar.MILLISECOND, 0 ); long localMidnight = cal.getTimeInMillis(); String policy = RepositoryPolicy.UPDATE_POLICY_DAILY; assertEquals( true, manager.isUpdatedRequired( session, Long.MIN_VALUE, policy ) ); assertEquals( false, manager.isUpdatedRequired( session, Long.MAX_VALUE, policy ) ); assertEquals( false, manager.isUpdatedRequired( session, localMidnight + 0, policy ) ); assertEquals( false, manager.isUpdatedRequired( session, localMidnight + 1, policy ) ); assertEquals( true, manager.isUpdatedRequired( session, localMidnight - 1, policy ) ); } @Test public void testIsUpdateRequired_PolicyInterval() throws Exception { String policy = RepositoryPolicy.UPDATE_POLICY_INTERVAL + ":5"; assertEquals( true, manager.isUpdatedRequired( session, Long.MIN_VALUE, policy ) ); assertEquals( false, manager.isUpdatedRequired( session, Long.MAX_VALUE, policy ) ); assertEquals( false, manager.isUpdatedRequired( session, System.currentTimeMillis(), policy ) ); assertEquals( false, manager.isUpdatedRequired( session, System.currentTimeMillis() - 5 - 1, policy ) ); assertEquals( false, manager.isUpdatedRequired( session, System.currentTimeMillis() - 1000 * 5 - 1, policy ) ); assertEquals( true, manager.isUpdatedRequired( session, System.currentTimeMillis() - 1000 * 60 * 5 - 1, policy ) ); policy = RepositoryPolicy.UPDATE_POLICY_INTERVAL + ":invalid"; assertEquals( false, manager.isUpdatedRequired( session, System.currentTimeMillis(), policy ) ); } @Test( expected = Exception.class ) public void testCheckMetadataFailOnNoFile() throws Exception { UpdateCheck check = newMetadataCheck(); check.setItem( metadata.setFile( null ) ); check.setFile( null ); manager.checkMetadata( session, check ); } @Test public void testCheckMetadataUpdatePolicyRequired() throws Exception { UpdateCheck check = newMetadataCheck(); Calendar cal = Calendar.getInstance(); cal.add( Calendar.DATE, -1 ); check.setLocalLastUpdated( cal.getTimeInMillis() ); check.setPolicy( RepositoryPolicy.UPDATE_POLICY_ALWAYS ); manager.checkMetadata( session, check ); assertNull( check.getException() ); assertTrue( check.isRequired() ); check.setPolicy( RepositoryPolicy.UPDATE_POLICY_DAILY ); manager.checkMetadata( session, check ); assertNull( check.getException() ); assertTrue( check.isRequired() ); check.setPolicy( RepositoryPolicy.UPDATE_POLICY_INTERVAL + ":60" ); manager.checkMetadata( session, check ); assertNull( check.getException() ); assertTrue( check.isRequired() ); } @Test public void testCheckMetadataUpdatePolicyNotRequired() throws Exception { UpdateCheck check = newMetadataCheck(); check.setLocalLastUpdated( System.currentTimeMillis() ); check.setPolicy( RepositoryPolicy.UPDATE_POLICY_NEVER ); manager.checkMetadata( session, check ); assertFalse( check.isRequired() ); check.setPolicy( RepositoryPolicy.UPDATE_POLICY_DAILY ); manager.checkMetadata( session, check ); assertFalse( check.isRequired() ); check.setPolicy( RepositoryPolicy.UPDATE_POLICY_INTERVAL + ":61" ); manager.checkMetadata( session, check ); assertFalse( check.isRequired() ); check.setPolicy( "no particular policy" ); manager.checkMetadata( session, check ); assertFalse( check.isRequired() ); } @Test public void testCheckMetadata() throws Exception { UpdateCheck check = newMetadataCheck(); check.setPolicy( RepositoryPolicy.UPDATE_POLICY_DAILY ); // existing file, never checked before manager.checkMetadata( session, check ); assertEquals( true, check.isRequired() ); // just checked manager.touchMetadata( session, check ); resetSessionData( session ); check = newMetadataCheck(); check.setPolicy( RepositoryPolicy.UPDATE_POLICY_INTERVAL + ":60" ); manager.checkMetadata( session, check ); assertEquals( false, check.isRequired() ); // no local file check.getFile().delete(); manager.checkMetadata( session, check ); assertEquals( true, check.isRequired() ); // (! file.exists && ! repoKey) -> no timestamp } @Test public void testCheckMetadataNoLocalFile() throws Exception { metadata.getFile().delete(); UpdateCheck check = newMetadataCheck(); long lastUpdate = new Date().getTime() - HOUR; check.setLocalLastUpdated( lastUpdate ); // ! file.exists && updateRequired -> check in remote repo check.setLocalLastUpdated( lastUpdate ); manager.checkMetadata( session, check ); assertEquals( true, check.isRequired() ); } @Test public void testCheckMetadataNotFoundInRepoCachingEnabled() throws Exception { metadata.getFile().delete(); session.setNotFoundCachingEnabled( true ); UpdateCheck check = newMetadataCheck(); check.setException( new MetadataNotFoundException( metadata, repository, "" ) ); manager.touchMetadata( session, check ); resetSessionData( session ); // ! file.exists && ! updateRequired -> artifact not found in remote repo check = newMetadataCheck().setPolicy( RepositoryPolicy.UPDATE_POLICY_DAILY ); manager.checkMetadata( session, check ); assertEquals( false, check.isRequired() ); assertNotNull( check.getException() ); } @Test public void testCheckMetadataNotFoundInRepoCachingDisabled() throws Exception { metadata.getFile().delete(); session.setNotFoundCachingEnabled( false ); UpdateCheck check = newMetadataCheck(); check.setException( new MetadataNotFoundException( metadata, repository, "" ) ); manager.touchMetadata( session, check ); resetSessionData( session ); // ! file.exists && ! updateRequired -> artifact not found in remote repo // ignore NotFoundCaching-setting, don't check if update policy does not say so for metadata check.setPolicy( RepositoryPolicy.UPDATE_POLICY_DAILY ); manager.checkMetadata( session, check ); assertEquals( false, check.isRequired() ); assertTrue( check.getException() instanceof MetadataNotFoundException ); } @Test public void testCheckMetadataErrorFromRepo() throws Exception { metadata.getFile().delete(); UpdateCheck check = newMetadataCheck(); check.setPolicy( RepositoryPolicy.UPDATE_POLICY_DAILY ); check.setException( new MetadataTransferException( metadata, repository, "some error" ) ); manager.touchMetadata( session, check ); resetSessionData( session ); // ! file.exists && ! updateRequired && previousError -> depends on transfer error caching check = newMetadataCheck(); session.setTransferErrorCachingEnabled( true ); manager.checkMetadata( session, check ); assertEquals( false, check.isRequired() ); assertTrue( check.getException() instanceof MetadataTransferException ); assertTrue( String.valueOf( check.getException() ), check.getException().getMessage().contains( "some error" ) ); } @Test public void testCheckMetadataErrorFromRepoNoCaching() throws Exception { metadata.getFile().delete(); UpdateCheck check = newMetadataCheck(); check.setPolicy( RepositoryPolicy.UPDATE_POLICY_DAILY ); check.setException( new MetadataTransferException( metadata, repository, "some error" ) ); manager.touchMetadata( session, check ); resetSessionData( session ); // ! file.exists && ! updateRequired && previousError -> depends on transfer error caching check = newMetadataCheck(); session.setTransferErrorCachingEnabled( false ); manager.checkMetadata( session, check ); assertEquals( true, check.isRequired() ); assertNull( check.getException() ); } @Test public void testCheckMetadataAtMostOnceDuringSessionEvenIfUpdatePolicyAlways() throws Exception { UpdateCheck check = newMetadataCheck(); check.setPolicy( RepositoryPolicy.UPDATE_POLICY_ALWAYS ); // first check manager.checkMetadata( session, check ); assertEquals( true, check.isRequired() ); manager.touchMetadata( session, check ); // second check in same session manager.checkMetadata( session, check ); assertEquals( false, check.isRequired() ); } @Test public void testCheckMetadataWhenLocallyMissingEvenIfUpdatePolicyIsNever() throws Exception { UpdateCheck check = newMetadataCheck(); check.setPolicy( RepositoryPolicy.UPDATE_POLICY_NEVER ); session.setNotFoundCachingEnabled( true ); check.getFile().delete(); assertEquals( check.getFile().getAbsolutePath(), false, check.getFile().exists() ); manager.checkMetadata( session, check ); assertEquals( true, check.isRequired() ); } @Test public void testCheckMetadataWhenLocallyPresentButInvalidEvenIfUpdatePolicyIsNever() throws Exception { UpdateCheck check = newMetadataCheck(); check.setPolicy( RepositoryPolicy.UPDATE_POLICY_NEVER ); session.setNotFoundCachingEnabled( true ); manager.touchMetadata( session, check ); resetSessionData( session ); check.setFileValid( false ); manager.checkMetadata( session, check ); assertEquals( true, check.isRequired() ); } @Test public void testCheckMetadataWhenLocallyDeletedEvenIfTimestampUpToDate() throws Exception { UpdateCheck check = newMetadataCheck(); session.setNotFoundCachingEnabled( true ); manager.touchMetadata( session, check ); resetSessionData( session ); check.getFile().delete(); assertEquals( check.getFile().getAbsolutePath(), false, check.getFile().exists() ); manager.checkMetadata( session, check ); assertEquals( true, check.isRequired() ); } @Test public void testCheckMetadataNotWhenUpdatePolicyIsNeverAndTimestampIsUnavailable() throws Exception { UpdateCheck check = newMetadataCheck(); check.setPolicy( RepositoryPolicy.UPDATE_POLICY_NEVER ); session.setNotFoundCachingEnabled( true ); manager.checkMetadata( session, check ); assertEquals( false, check.isRequired() ); } @Test( expected = IllegalArgumentException.class ) public void testCheckArtifactFailOnNoFile() throws Exception { UpdateCheck check = newArtifactCheck(); check.setItem( artifact.setFile( null ) ); check.setFile( null ); manager.checkArtifact( session, check ); assertNotNull( check.getException() ); } @Test public void testCheckArtifactUpdatePolicyRequired() throws Exception { UpdateCheck check = newArtifactCheck(); check.setItem( artifact ); check.setFile( artifact.getFile() ); Calendar cal = Calendar.getInstance( TimeZone.getTimeZone( "UTC" ) ); cal.add( Calendar.DATE, -1 ); long lastUpdate = cal.getTimeInMillis(); artifact.getFile().setLastModified( lastUpdate ); check.setLocalLastUpdated( lastUpdate ); check.setPolicy( RepositoryPolicy.UPDATE_POLICY_ALWAYS ); manager.checkArtifact( session, check ); assertNull( check.getException() ); assertTrue( check.isRequired() ); check.setPolicy( RepositoryPolicy.UPDATE_POLICY_DAILY ); manager.checkArtifact( session, check ); assertNull( check.getException() ); assertTrue( check.isRequired() ); check.setPolicy( RepositoryPolicy.UPDATE_POLICY_INTERVAL + ":60" ); manager.checkArtifact( session, check ); assertNull( check.getException() ); assertTrue( check.isRequired() ); } @Test public void testCheckArtifactUpdatePolicyNotRequired() throws Exception { UpdateCheck check = newArtifactCheck(); check.setItem( artifact ); check.setFile( artifact.getFile() ); Calendar cal = Calendar.getInstance( TimeZone.getTimeZone( "UTC" ) ); cal.add( Calendar.HOUR_OF_DAY, -1 ); check.setLocalLastUpdated( cal.getTimeInMillis() ); check.setPolicy( RepositoryPolicy.UPDATE_POLICY_NEVER ); manager.checkArtifact( session, check ); assertFalse( check.isRequired() ); check.setPolicy( RepositoryPolicy.UPDATE_POLICY_DAILY ); manager.checkArtifact( session, check ); assertFalse( check.isRequired() ); check.setPolicy( RepositoryPolicy.UPDATE_POLICY_INTERVAL + ":61" ); manager.checkArtifact( session, check ); assertFalse( check.isRequired() ); check.setPolicy( "no particular policy" ); manager.checkArtifact( session, check ); assertFalse( check.isRequired() ); } @Test public void testCheckArtifact() throws Exception { UpdateCheck check = newArtifactCheck(); long fifteenMinutes = new Date().getTime() - ( 15 * 60 * 1000 ); check.getFile().setLastModified( fifteenMinutes ); // time is truncated on setLastModfied fifteenMinutes = check.getFile().lastModified(); // never checked before manager.checkArtifact( session, check ); assertEquals( true, check.isRequired() ); // just checked check.setLocalLastUpdated( 0 ); long lastUpdate = new Date().getTime(); check.getFile().setLastModified( lastUpdate ); lastUpdate = check.getFile().lastModified(); manager.checkArtifact( session, check ); assertEquals( false, check.isRequired() ); // no local file, no repo timestamp check.setLocalLastUpdated( 0 ); check.getFile().delete(); manager.checkArtifact( session, check ); assertEquals( true, check.isRequired() ); } @Test public void testCheckArtifactNoLocalFile() throws Exception { artifact.getFile().delete(); UpdateCheck check = newArtifactCheck(); long lastUpdate = new Date().getTime() - HOUR; // ! file.exists && updateRequired -> check in remote repo check.setLocalLastUpdated( lastUpdate ); manager.checkArtifact( session, check ); assertEquals( true, check.isRequired() ); } @Test public void testCheckArtifactNotFoundInRepoCachingEnabled() throws Exception { artifact.getFile().delete(); session.setNotFoundCachingEnabled( true ); UpdateCheck check = newArtifactCheck(); check.setException( new ArtifactNotFoundException( artifact, repository ) ); manager.touchArtifact( session, check ); resetSessionData( session ); // ! file.exists && ! updateRequired -> artifact not found in remote repo check = newArtifactCheck().setPolicy( RepositoryPolicy.UPDATE_POLICY_DAILY ); manager.checkArtifact( session, check ); assertEquals( false, check.isRequired() ); assertTrue( check.getException() instanceof ArtifactNotFoundException ); } @Test public void testCheckArtifactNotFoundInRepoCachingDisabled() throws Exception { artifact.getFile().delete(); session.setNotFoundCachingEnabled( false ); UpdateCheck check = newArtifactCheck(); check.setException( new ArtifactNotFoundException( artifact, repository ) ); manager.touchArtifact( session, check ); resetSessionData( session ); // ! file.exists && ! updateRequired -> artifact not found in remote repo check = newArtifactCheck().setPolicy( RepositoryPolicy.UPDATE_POLICY_DAILY ); manager.checkArtifact( session, check ); assertEquals( true, check.isRequired() ); assertNull( check.getException() ); } @Test public void testCheckArtifactErrorFromRepoCachingEnabled() throws Exception { artifact.getFile().delete(); UpdateCheck check = newArtifactCheck(); check.setPolicy( RepositoryPolicy.UPDATE_POLICY_DAILY ); check.setException( new ArtifactTransferException( artifact, repository, "some error" ) ); manager.touchArtifact( session, check ); resetSessionData( session ); // ! file.exists && ! updateRequired && previousError -> depends on transfer error caching check = newArtifactCheck(); session.setTransferErrorCachingEnabled( true ); manager.checkArtifact( session, check ); assertEquals( false, check.isRequired() ); assertTrue( check.getException() instanceof ArtifactTransferException ); } @Test public void testCheckArtifactErrorFromRepoCachingDisabled() throws Exception { artifact.getFile().delete(); UpdateCheck check = newArtifactCheck(); check.setPolicy( RepositoryPolicy.UPDATE_POLICY_DAILY ); check.setException( new ArtifactTransferException( artifact, repository, "some error" ) ); manager.touchArtifact( session, check ); resetSessionData( session ); // ! file.exists && ! updateRequired && previousError -> depends on transfer error caching check = newArtifactCheck(); session.setTransferErrorCachingEnabled( false ); manager.checkArtifact( session, check ); assertEquals( true, check.isRequired() ); assertNull( check.getException() ); } @Test public void testCheckArtifactAtMostOnceDuringSessionEvenIfUpdatePolicyAlways() throws Exception { UpdateCheck check = newArtifactCheck(); check.setPolicy( RepositoryPolicy.UPDATE_POLICY_ALWAYS ); // first check manager.checkArtifact( session, check ); assertEquals( true, check.isRequired() ); manager.touchArtifact( session, check ); // second check in same session manager.checkArtifact( session, check ); assertEquals( false, check.isRequired() ); } @Test public void testCheckArtifactWhenLocallyMissingEvenIfUpdatePolicyIsNever() throws Exception { UpdateCheck check = newArtifactCheck(); check.setPolicy( RepositoryPolicy.UPDATE_POLICY_NEVER ); session.setNotFoundCachingEnabled( true ); check.getFile().delete(); assertEquals( check.getFile().getAbsolutePath(), false, check.getFile().exists() ); manager.checkArtifact( session, check ); assertEquals( true, check.isRequired() ); } @Test public void testCheckArtifactWhenLocallyPresentButInvalidEvenIfUpdatePolicyIsNever() throws Exception { UpdateCheck check = newArtifactCheck(); check.setPolicy( RepositoryPolicy.UPDATE_POLICY_NEVER ); session.setNotFoundCachingEnabled( true ); manager.touchArtifact( session, check ); resetSessionData( session ); check.setFileValid( false ); manager.checkArtifact( session, check ); assertEquals( true, check.isRequired() ); } @Test public void testCheckArtifactWhenLocallyDeletedEvenIfTimestampUpToDate() throws Exception { UpdateCheck check = newArtifactCheck(); session.setNotFoundCachingEnabled( true ); manager.touchArtifact( session, check ); resetSessionData( session ); check.getFile().delete(); assertEquals( check.getFile().getAbsolutePath(), false, check.getFile().exists() ); manager.checkArtifact( session, check ); assertEquals( true, check.isRequired() ); } @Test public void testCheckArtifactNotWhenUpdatePolicyIsNeverAndTimestampIsUnavailable() throws Exception { UpdateCheck check = newArtifactCheck(); check.setPolicy( RepositoryPolicy.UPDATE_POLICY_NEVER ); session.setNotFoundCachingEnabled( true ); manager.checkArtifact( session, check ); assertEquals( false, check.isRequired() ); } @Test public void testEffectivePolicy() { assertEquals( UPDATE_POLICY_ALWAYS, manager.getEffectiveUpdatePolicy( session, UPDATE_POLICY_ALWAYS, UPDATE_POLICY_DAILY ) ); assertEquals( UPDATE_POLICY_ALWAYS, manager.getEffectiveUpdatePolicy( session, UPDATE_POLICY_ALWAYS, UPDATE_POLICY_NEVER ) ); assertEquals( UPDATE_POLICY_DAILY, manager.getEffectiveUpdatePolicy( session, UPDATE_POLICY_DAILY, UPDATE_POLICY_NEVER ) ); assertEquals( UPDATE_POLICY_INTERVAL + ":60", manager.getEffectiveUpdatePolicy( session, UPDATE_POLICY_DAILY, UPDATE_POLICY_INTERVAL + ":60" ) ); assertEquals( UPDATE_POLICY_INTERVAL + ":60", manager.getEffectiveUpdatePolicy( session, UPDATE_POLICY_INTERVAL + ":100", UPDATE_POLICY_INTERVAL + ":60" ) ); } } aether-1.13.1/aether-impl/src/test/java/org/sonatype/aether/impl/internal/DependencyGraphDumper.java000066400000000000000000000127401167050556700335210ustar00rootroot00000000000000package org.sonatype.aether.impl.internal; /******************************************************************************* * 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 * and Apache License v2.0 which accompanies this distribution. * The Eclipse Public License is available at * http://www.eclipse.org/legal/epl-v10.html * The Apache License v2.0 is available at * http://www.apache.org/licenses/LICENSE-2.0.html * You may elect to redistribute this code under either of these licenses. *******************************************************************************/ import java.io.PrintWriter; import java.util.ArrayList; import java.util.IdentityHashMap; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; import org.sonatype.aether.graph.Dependency; import org.sonatype.aether.graph.DependencyNode; /** * A helper to visualize dependency graphs. * * @author Benjamin Bentmann */ public class DependencyGraphDumper { public static void dump( PrintWriter writer, DependencyNode node ) { Context context = new Context(); dump( context, node, 0, true ); LinkedList indents = new LinkedList(); for ( Line line : context.lines ) { if ( line.depth > indents.size() ) { if ( !indents.isEmpty() ) { if ( indents.getLast() == Indent.CHILD ) { indents.removeLast(); indents.addLast( Indent.CHILDREN ); } else if ( indents.getLast() == Indent.LAST_CHILD ) { indents.removeLast(); indents.addLast( Indent.NO_CHILDREN ); } } indents.addLast( line.last ? Indent.LAST_CHILD : Indent.CHILD ); } else if ( line.depth < indents.size() ) { while ( line.depth <= indents.size() ) { indents.removeLast(); } indents.addLast( line.last ? Indent.LAST_CHILD : Indent.CHILD ); } else if ( line.last && !indents.isEmpty() ) { indents.removeLast(); indents.addLast( Indent.LAST_CHILD ); } for ( Indent indent : indents ) { writer.print( indent ); } line.print( writer ); } writer.flush(); } private static void dump( Context context, DependencyNode node, int depth, boolean last ) { Line line = context.nodes.get( node ); if ( line != null ) { if ( line.id <= 0 ) { line.id = ++context.ids; } context.lines.add( new Line( null, line.id, depth, last ) ); return; } Dependency dependency = node.getDependency(); if ( dependency == null ) { line = new Line( null, 0, depth, last ); } else { line = new Line( dependency, 0, depth, last ); } context.lines.add( line ); context.nodes.put( node, line ); depth++; for ( Iterator it = node.getChildren().iterator(); it.hasNext(); ) { DependencyNode child = it.next(); dump( context, child, depth, !it.hasNext() ); } } static enum Indent { NO_CHILDREN( " " ), CHILDREN( "| " ), CHILD( "+- " ), LAST_CHILD( "\\- " ); private final String chars; Indent( String chars ) { this.chars = chars; } @Override public String toString() { return chars; } } static class Context { int ids; List lines; Map nodes; Context() { this.lines = new ArrayList(); this.nodes = new IdentityHashMap( 1024 ); } } static class Line { Dependency dependency; int id; int depth; boolean last; Line( Dependency dependency, int id, int depth, boolean last ) { this.dependency = dependency; this.id = id; this.depth = depth; this.last = last; } void print( PrintWriter writer ) { if ( dependency == null ) { if ( id > 0 ) { writer.print( "^" ); writer.print( id ); } else { writer.print( "(null)" ); } } else { if ( id > 0 ) { writer.print( "(" ); writer.print( id ); writer.print( ")" ); } writer.print( dependency.getArtifact() ); if ( dependency.getScope().length() > 0 ) { writer.print( ":" ); writer.print( dependency.getScope() ); } } writer.println(); } } } EnhancedLocalRepositoryManagerTest.java000066400000000000000000000251471167050556700361450ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/java/org/sonatype/aether/impl/internalpackage org.sonatype.aether.impl.internal; /******************************************************************************* * 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 static org.junit.Assert.*; import java.io.File; import java.io.IOException; import java.net.URI; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.metadata.Metadata; import org.sonatype.aether.metadata.Metadata.Nature; import org.sonatype.aether.repository.LocalArtifactRegistration; import org.sonatype.aether.repository.LocalArtifactRequest; import org.sonatype.aether.repository.LocalArtifactResult; import org.sonatype.aether.repository.LocalMetadataRequest; import org.sonatype.aether.repository.LocalMetadataResult; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.test.impl.TestRepositorySystemSession; import org.sonatype.aether.test.util.TestFileUtils; import org.sonatype.aether.util.artifact.DefaultArtifact; import org.sonatype.aether.util.metadata.DefaultMetadata; public class EnhancedLocalRepositoryManagerTest { private Artifact artifact; private File basedir; private EnhancedLocalRepositoryManager manager; private File artifactFile; private RemoteRepository repository; private String testContext = "project/compile"; private RepositorySystemSession session; private Metadata metadata; private Metadata noVerMetadata; @Before public void setup() throws Exception { repository = new RemoteRepository( "enhanced-remote-repo", "default", TestFileUtils.createTempDir( "enhanced-remote-repo" ).toURI().toURL().toString() ); repository.setRepositoryManager( true ); artifact = new DefaultArtifact( "gid", "aid", "", "jar", "1-test", Collections. emptyMap(), TestFileUtils.createTempFile( "artifact" ) ); metadata = new DefaultMetadata( "gid", "aid", "1-test", "maven-metadata.xml", Nature.RELEASE, TestFileUtils.createTempFile( "metadata" ) ); noVerMetadata = new DefaultMetadata( "gid", "aid", null, "maven-metadata.xml", Nature.RELEASE, TestFileUtils.createTempFile( "metadata" ) ); basedir = TestFileUtils.createTempDir( "enhanced-repo" ); manager = new EnhancedLocalRepositoryManager( basedir ); artifactFile = new File( basedir, manager.getPathForLocalArtifact( artifact ) ); session = new TestRepositorySystemSession(); } @After public void tearDown() throws Exception { TestFileUtils.delete( basedir ); TestFileUtils.delete( new File( new URI( repository.getUrl() ) ) ); session = null; manager = null; repository = null; artifact = null; } private long addLocalArtifact( Artifact artifact ) throws IOException { manager.add( session, new LocalArtifactRegistration( artifact ) ); String path = manager.getPathForLocalArtifact( artifact ); return copy( artifact, path ); } private long addRemoteArtifact( Artifact artifact ) throws IOException { Collection contexts = Arrays.asList( testContext ); manager.add( session, new LocalArtifactRegistration( artifact, repository, contexts ) ); String path = manager.getPathForRemoteArtifact( artifact, repository, testContext ); return copy( artifact, path ); } private long copy( Metadata metadata, String path ) throws IOException { if ( metadata.getFile() == null ) { return -1; } return TestFileUtils.copy( metadata.getFile(), new File( basedir, path ) ); } private long copy( Artifact artifact, String path ) throws IOException { if ( artifact.getFile() == null ) { return -1; } File artifactFile = new File( basedir, path ); return TestFileUtils.copy( artifact.getFile(), artifactFile ); } @Test public void testGetPathForLocalArtifact() { Artifact artifact = new DefaultArtifact( "g.i.d:a.i.d:1.0-SNAPSHOT" ); assertEquals( "1.0-SNAPSHOT", artifact.getBaseVersion() ); assertEquals( "g/i/d/a.i.d/1.0-SNAPSHOT/a.i.d-1.0-SNAPSHOT.jar", manager.getPathForLocalArtifact( artifact ) ); artifact = new DefaultArtifact( "g.i.d:a.i.d:1.0-20110329.221805-4" ); assertEquals( "1.0-SNAPSHOT", artifact.getBaseVersion() ); assertEquals( "g/i/d/a.i.d/1.0-SNAPSHOT/a.i.d-1.0-SNAPSHOT.jar", manager.getPathForLocalArtifact( artifact ) ); } @Test public void testGetPathForRemoteArtifact() { RemoteRepository remoteRepo = new RemoteRepository( "repo", "default", "ram:/void" ); Artifact artifact = new DefaultArtifact( "g.i.d:a.i.d:1.0-SNAPSHOT" ); assertEquals( "1.0-SNAPSHOT", artifact.getBaseVersion() ); assertEquals( "g/i/d/a.i.d/1.0-SNAPSHOT/a.i.d-1.0-SNAPSHOT.jar", manager.getPathForRemoteArtifact( artifact, remoteRepo, "" ) ); artifact = new DefaultArtifact( "g.i.d:a.i.d:1.0-20110329.221805-4" ); assertEquals( "1.0-SNAPSHOT", artifact.getBaseVersion() ); assertEquals( "g/i/d/a.i.d/1.0-SNAPSHOT/a.i.d-1.0-20110329.221805-4.jar", manager.getPathForRemoteArtifact( artifact, remoteRepo, "" ) ); } @Test public void testFindLocalArtifact() throws Exception { addLocalArtifact( artifact ); LocalArtifactRequest request = new LocalArtifactRequest( artifact, null, null ); LocalArtifactResult result = manager.find( session, request ); assertTrue( result.isAvailable() ); } @Test public void testFindRemoteArtifact() throws Exception { addRemoteArtifact( artifact ); LocalArtifactRequest request = new LocalArtifactRequest( artifact, Arrays.asList( repository ), testContext ); LocalArtifactResult result = manager.find( session, request ); assertTrue( result.isAvailable() ); } @Test public void testDoNotFindDifferentContext() throws Exception { addRemoteArtifact( artifact ); LocalArtifactRequest request = new LocalArtifactRequest( artifact, Arrays.asList( repository ), "different" ); LocalArtifactResult result = manager.find( session, request ); assertFalse( result.isAvailable() ); } @Test public void testDoNotFindNullFile() throws Exception { artifact = artifact.setFile( null ); addLocalArtifact( artifact ); LocalArtifactRequest request = new LocalArtifactRequest( artifact, Arrays.asList( repository ), testContext ); LocalArtifactResult result = manager.find( session, request ); assertFalse( result.isAvailable() ); } @Test public void testDoNotFindDeletedFile() throws Exception { addLocalArtifact( artifact ); assertTrue( "could not delete artifact file", artifactFile.delete() ); LocalArtifactRequest request = new LocalArtifactRequest( artifact, Arrays.asList( repository ), testContext ); LocalArtifactResult result = manager.find( session, request ); assertFalse( result.isAvailable() ); } @Test public void testFindUntrackedFile() throws Exception { copy( artifact, manager.getPathForLocalArtifact( artifact ) ); LocalArtifactRequest request = new LocalArtifactRequest( artifact, Arrays.asList( repository ), testContext ); LocalArtifactResult result = manager.find( session, request ); assertTrue( result.isAvailable() ); } private long addMetadata( Metadata metadata, RemoteRepository repo ) throws IOException { String path; if ( repo == null ) { path = manager.getPathForLocalMetadata( metadata ); } else { path = manager.getPathForRemoteMetadata( metadata, repo, testContext ); } System.err.println( path ); return copy( metadata, path ); } @Test public void testFindLocalMetadata() throws Exception { addMetadata( metadata, null ); LocalMetadataRequest request = new LocalMetadataRequest( metadata, null, testContext ); LocalMetadataResult result = manager.find( session, request ); assertNotNull( result.getFile() ); } @Test public void testFindLocalMetadataNoVersion() throws Exception { addMetadata( noVerMetadata, null ); LocalMetadataRequest request = new LocalMetadataRequest( noVerMetadata, null, testContext ); LocalMetadataResult result = manager.find( session, request ); assertNotNull( result.getFile() ); } @Test public void testDoNotFindRemoteMetadataDifferentContext() throws Exception { addMetadata( noVerMetadata, repository ); addMetadata( metadata, repository ); LocalMetadataRequest request = new LocalMetadataRequest( noVerMetadata, repository, "different" ); LocalMetadataResult result = manager.find( session, request ); assertNull( result.getFile() ); request = new LocalMetadataRequest( metadata, repository, "different" ); result = manager.find( session, request ); assertNull( result.getFile() ); } @Test public void testFindArtifactUsesTimestampedVersion() throws Exception { Artifact artifact = new DefaultArtifact( "g.i.d:a.i.d:1.0-SNAPSHOT" ); File file = new File( basedir, manager.getPathForLocalArtifact( artifact ) ); TestFileUtils.write( "test", file ); addLocalArtifact( artifact ); artifact = artifact.setVersion( "1.0-20110329.221805-4" ); LocalArtifactRequest request = new LocalArtifactRequest(); request.setArtifact( artifact ); LocalArtifactResult result = manager.find( session, request ); assertNull( result.toString(), result.getFile() ); assertFalse( result.toString(), result.isAvailable() ); } } IniArtifactDescriptorReader.java000066400000000000000000000015761167050556700346110ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/java/org/sonatype/aether/impl/internalpackage org.sonatype.aether.impl.internal; /******************************************************************************* * 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.impl.ArtifactDescriptorReader; /** */ public class IniArtifactDescriptorReader extends org.sonatype.aether.test.util.IniArtifactDescriptorReader implements ArtifactDescriptorReader { /** * Use the given prefix to load the artifact descriptions. */ public IniArtifactDescriptorReader( String prefix ) { super( prefix ); } } RecordingRepositoryConnector.java000066400000000000000000000156021167050556700351140ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/java/org/sonatype/aether/impl/internalpackage org.sonatype.aether.impl.internal; /******************************************************************************* * 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 static junit.framework.Assert.*; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.metadata.Metadata; import org.sonatype.aether.spi.connector.ArtifactDownload; import org.sonatype.aether.spi.connector.ArtifactUpload; import org.sonatype.aether.spi.connector.MetadataDownload; import org.sonatype.aether.spi.connector.MetadataUpload; import org.sonatype.aether.spi.connector.RepositoryConnector; import org.sonatype.aether.spi.connector.Transfer.State; import org.sonatype.aether.test.util.TestFileUtils; import org.sonatype.aether.transfer.ArtifactTransferException; import org.sonatype.aether.transfer.MetadataTransferException; /** * A repository connector recording all get/put-requests and faking the results. * * @author Benjamin Hanzelmann */ class RecordingRepositoryConnector implements RepositoryConnector { private Artifact[] expectGet; private Artifact[] expectPut; private Metadata[] expectGetMD; private Metadata[] expectPutMD; private List actualGet = new ArrayList(); private List actualGetMD = new ArrayList(); private List actualPut = new ArrayList(); private List actualPutMD = new ArrayList(); public RecordingRepositoryConnector( Artifact[] expectGet, Artifact[] expectPut, Metadata[] expectGetMD, Metadata[] expectPutMD ) { this.expectGet = expectGet; this.expectPut = expectPut; this.expectGetMD = expectGetMD; this.expectPutMD = expectPutMD; } public RecordingRepositoryConnector() { } public void get( Collection artifactDownloads, Collection metadataDownloads ) { try { if ( artifactDownloads != null ) { for ( ArtifactDownload artifactDownload : artifactDownloads ) { artifactDownload.setState( State.ACTIVE ); Artifact artifact = artifactDownload.getArtifact(); this.actualGet.add( artifact ); TestFileUtils.write( artifact.toString(), artifactDownload.getFile() ); artifactDownload.setState( State.DONE ); } } if ( metadataDownloads != null ) { for ( MetadataDownload metadataDownload : metadataDownloads ) { metadataDownload.setState( State.ACTIVE ); Metadata metadata = metadataDownload.getMetadata(); this.actualGetMD.add( metadata ); TestFileUtils.write( metadata.toString(), metadataDownload.getFile() ); metadataDownload.setState( State.DONE ); } } } catch ( IOException e ) { throw new IllegalStateException( "Cannot create temporary file", e ); } } public void put( Collection artifactUploads, Collection metadataUploads ) { if ( artifactUploads != null ) { for ( ArtifactUpload artifactUpload : artifactUploads ) { // mimic "real" connector artifactUpload.setState( State.ACTIVE ); if ( artifactUpload.getFile() == null ) { artifactUpload.setException( new ArtifactTransferException( artifactUpload.getArtifact(), null, "no file" ) ); } this.actualPut.add( artifactUpload.getArtifact() ); artifactUpload.setState( State.DONE ); } } if ( metadataUploads != null ) { for ( MetadataUpload metadataUpload : metadataUploads ) { // mimic "real" connector metadataUpload.setState( State.ACTIVE ); if ( metadataUpload.getFile() == null ) { metadataUpload.setException( new MetadataTransferException( metadataUpload.getMetadata(), null, "no file" ) ); } this.actualPutMD.add( metadataUpload.getMetadata() ); metadataUpload.setState( State.DONE ); } } } public void close() { } public void assertSeenExpected() { assertSeenExpected( actualGet, expectGet ); assertSeenExpected( actualGetMD, expectGetMD ); assertSeenExpected( actualPut, expectPut ); assertSeenExpected( actualPutMD, expectPutMD ); } private void assertSeenExpected( List actual, Object[] expected ) { if ( expected == null ) { expected = new Object[0]; } assertEquals( "different number of expected and actual elements:\n", expected.length, actual.size() ); int idx = 0; for ( Object actualObject : actual ) { assertEquals( "seen object differs", expected[idx++], actualObject ); } } public List getActualArtifactGetRequests() { return actualGet; } public List getActualMetadataGetRequests() { return actualGetMD; } public List getActualArtifactPutRequests() { return actualPut; } public List getActualMetadataPutRequests() { return actualPutMD; } public void setExpectGet( Artifact... expectGet ) { this.expectGet = expectGet; } public void setExpectPut( Artifact... expectPut ) { this.expectPut = expectPut; } public void setExpectGet( Metadata... expectGetMD ) { this.expectGetMD = expectGetMD; } public void setExpectPut( Metadata... expectPutMD ) { this.expectPutMD = expectPutMD; } public void resetActual() { this.actualGet = new ArrayList(); this.actualGetMD = new ArrayList(); this.actualPut = new ArrayList(); this.actualPutMD = new ArrayList(); } } SimpleLocalRepositoryManagerTest.java000066400000000000000000000077351167050556700356740ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/java/org/sonatype/aether/impl/internalpackage org.sonatype.aether.impl.internal; /******************************************************************************* * 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 static org.junit.Assert.*; import java.io.File; import java.io.IOException; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.repository.LocalArtifactRequest; import org.sonatype.aether.repository.LocalArtifactResult; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.test.impl.TestRepositorySystemSession; import org.sonatype.aether.test.util.TestFileUtils; import org.sonatype.aether.util.artifact.DefaultArtifact; /** * @author Benjamin Bentmann */ public class SimpleLocalRepositoryManagerTest { private File basedir; private SimpleLocalRepositoryManager manager; private RepositorySystemSession session; @Before public void setup() throws IOException { basedir = TestFileUtils.createTempDir( "simple-repo" ); manager = new SimpleLocalRepositoryManager( basedir ); session = new TestRepositorySystemSession(); } @After public void tearDown() throws Exception { TestFileUtils.delete( basedir ); manager = null; session = null; } @Test public void testGetPathForLocalArtifact() throws Exception { Artifact artifact = new DefaultArtifact( "g.i.d:a.i.d:1.0-SNAPSHOT" ); assertEquals( "1.0-SNAPSHOT", artifact.getBaseVersion() ); assertEquals( "g/i/d/a.i.d/1.0-SNAPSHOT/a.i.d-1.0-SNAPSHOT.jar", manager.getPathForLocalArtifact( artifact ) ); artifact = new DefaultArtifact( "g.i.d:a.i.d:1.0-20110329.221805-4" ); assertEquals( "1.0-SNAPSHOT", artifact.getBaseVersion() ); assertEquals( "g/i/d/a.i.d/1.0-SNAPSHOT/a.i.d-1.0-SNAPSHOT.jar", manager.getPathForLocalArtifact( artifact ) ); artifact = new DefaultArtifact( "g.i.d", "a.i.d", "", "", "1.0-SNAPSHOT" ); assertEquals( "g/i/d/a.i.d/1.0-SNAPSHOT/a.i.d-1.0-SNAPSHOT", manager.getPathForLocalArtifact( artifact ) ); } @Test public void testGetPathForRemoteArtifact() throws Exception { RemoteRepository remoteRepo = new RemoteRepository( "repo", "default", "ram:/void" ); Artifact artifact = new DefaultArtifact( "g.i.d:a.i.d:1.0-SNAPSHOT" ); assertEquals( "1.0-SNAPSHOT", artifact.getBaseVersion() ); assertEquals( "g/i/d/a.i.d/1.0-SNAPSHOT/a.i.d-1.0-SNAPSHOT.jar", manager.getPathForRemoteArtifact( artifact, remoteRepo, "" ) ); artifact = new DefaultArtifact( "g.i.d:a.i.d:1.0-20110329.221805-4" ); assertEquals( "1.0-SNAPSHOT", artifact.getBaseVersion() ); assertEquals( "g/i/d/a.i.d/1.0-SNAPSHOT/a.i.d-1.0-20110329.221805-4.jar", manager.getPathForRemoteArtifact( artifact, remoteRepo, "" ) ); } @Test public void testFindArtifactUsesTimestampedVersion() throws Exception { Artifact artifact = new DefaultArtifact( "g.i.d:a.i.d:1.0-SNAPSHOT" ); File file = new File( basedir, manager.getPathForLocalArtifact( artifact ) ); TestFileUtils.write( "test", file ); artifact = artifact.setVersion( "1.0-20110329.221805-4" ); LocalArtifactRequest request = new LocalArtifactRequest(); request.setArtifact( artifact ); LocalArtifactResult result = manager.find( session, request ); assertNull( result.toString(), result.getFile() ); assertFalse( result.toString(), result.isAvailable() ); } } StaticUpdateCheckManager.java000066400000000000000000000047301167050556700340500ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/java/org/sonatype/aether/impl/internalpackage org.sonatype.aether.impl.internal; /******************************************************************************* * 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; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.impl.UpdateCheck; import org.sonatype.aether.impl.UpdateCheckManager; import org.sonatype.aether.metadata.Metadata; import org.sonatype.aether.transfer.ArtifactNotFoundException; import org.sonatype.aether.transfer.ArtifactTransferException; import org.sonatype.aether.transfer.MetadataNotFoundException; import org.sonatype.aether.transfer.MetadataTransferException; class StaticUpdateCheckManager implements UpdateCheckManager { private boolean checkRequired; public StaticUpdateCheckManager( boolean checkRequired ) { this.checkRequired = checkRequired; } public void touchMetadata( RepositorySystemSession session, UpdateCheck check ) { } public void touchArtifact( RepositorySystemSession session, UpdateCheck check ) { } public String getEffectiveUpdatePolicy( RepositorySystemSession session, String policy1, String policy2 ) { return policy1; } public void checkMetadata( RepositorySystemSession session, UpdateCheck check ) { check.setRequired( checkRequired ); if ( !check.isRequired() && !check.getFile().isFile() ) { check.setException( new MetadataNotFoundException( check.getItem(), check.getRepository() ) ); } } public void checkArtifact( RepositorySystemSession session, UpdateCheck check ) { check.setRequired( checkRequired ); if ( !check.isRequired() && !check.getFile().isFile() ) { check.setException( new ArtifactNotFoundException( check.getItem(), check.getRepository() ) ); } } public boolean isUpdatedRequired( RepositorySystemSession session, long lastModified, String policy ) { return checkRequired; } } StubRemoteRepositoryManager.java000066400000000000000000000050051167050556700347050ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/java/org/sonatype/aether/impl/internalpackage org.sonatype.aether.impl.internal; /******************************************************************************* * 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.impl.RemoteRepositoryManager; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.repository.RepositoryPolicy; import org.sonatype.aether.spi.connector.RepositoryConnector; import org.sonatype.aether.transfer.NoRepositoryConnectorException; import org.sonatype.aether.util.StringUtils; class StubRemoteRepositoryManager implements RemoteRepositoryManager { public StubRemoteRepositoryManager( RepositoryConnector connector ) { setConnector( connector ); } public StubRemoteRepositoryManager() { } private RepositoryConnector connector; public void setConnector( RepositoryConnector connector ) { this.connector = connector; } public List aggregateRepositories( RepositorySystemSession session, List dominantRepositories, List recessiveRepositories, boolean recessiveIsRaw ) { return dominantRepositories; } public RepositoryPolicy getPolicy( RepositorySystemSession session, RemoteRepository repository, boolean releases, boolean snapshots ) { RepositoryPolicy policy = repository.getPolicy( snapshots ); if ( !StringUtils.isEmpty( session.getChecksumPolicy() ) ) { policy = policy.setChecksumPolicy( session.getChecksumPolicy() ); } if ( !StringUtils.isEmpty( session.getUpdatePolicy() ) ) { policy = policy.setUpdatePolicy( session.getUpdatePolicy() ); } return policy; } public RepositoryConnector getRepositoryConnector( RepositorySystemSession session, RemoteRepository repository ) throws NoRepositoryConnectorException { return connector; } } StubRepositoryEventDispatcher.java000066400000000000000000000064351167050556700352570ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/java/org/sonatype/aether/impl/internalpackage org.sonatype.aether.impl.internal; /******************************************************************************* * 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.RepositoryEvent; import org.sonatype.aether.RepositoryListener; import org.sonatype.aether.impl.RepositoryEventDispatcher; /** * @author Benjamin Bentmann */ public class StubRepositoryEventDispatcher implements RepositoryEventDispatcher { public void dispatch( RepositoryEvent event ) { RepositoryListener listener = event.getSession().getRepositoryListener(); if ( listener == null ) { return; } switch ( event.getType() ) { case ARTIFACT_DEPLOYED: listener.artifactDeployed( event ); break; case ARTIFACT_DEPLOYING: listener.artifactDeploying( event ); break; case ARTIFACT_DESCRIPTOR_INVALID: listener.artifactDescriptorInvalid( event ); break; case ARTIFACT_DESCRIPTOR_MISSING: listener.artifactDescriptorMissing( event ); break; case ARTIFACT_DOWNLOADED: listener.artifactDownloaded( event ); break; case ARTIFACT_DOWNLOADING: listener.artifactDownloading( event ); break; case ARTIFACT_INSTALLED: listener.artifactInstalled( event ); break; case ARTIFACT_INSTALLING: listener.artifactInstalling( event ); break; case ARTIFACT_RESOLVED: listener.artifactResolved( event ); break; case ARTIFACT_RESOLVING: listener.artifactResolving( event ); break; case METADATA_DEPLOYED: listener.metadataDeployed( event ); break; case METADATA_DEPLOYING: listener.metadataDeploying( event ); break; case METADATA_DOWNLOADED: listener.metadataDownloaded( event ); break; case METADATA_DOWNLOADING: listener.metadataDownloading( event ); break; case METADATA_INSTALLED: listener.metadataInstalled( event ); break; case METADATA_INSTALLING: listener.metadataInstalling( event ); break; case METADATA_INVALID: listener.metadataInvalid( event ); break; case METADATA_RESOLVED: listener.metadataResolved( event ); break; case METADATA_RESOLVING: listener.metadataResolving( event ); break; default: throw new IllegalStateException( "unknown repository event type " + event.getType() ); } } } StubSyncContextFactory.java000066400000000000000000000022761167050556700336770ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/java/org/sonatype/aether/impl/internalpackage org.sonatype.aether.impl.internal; /******************************************************************************* * 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.RepositorySystemSession; import org.sonatype.aether.SyncContext; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.impl.SyncContextFactory; import org.sonatype.aether.metadata.Metadata; /** * */ public class StubSyncContextFactory implements SyncContextFactory { public SyncContext newInstance( RepositorySystemSession session, boolean shared ) { return new SyncContext() { public void release() { } public void acquire( Collection artifacts, Collection metadatas ) { } }; } } StubVersionRangeResolver.java000066400000000000000000000034601167050556700342060ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/java/org/sonatype/aether/impl/internalpackage org.sonatype.aether.impl.internal; /******************************************************************************* * 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.Arrays; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.impl.VersionRangeResolver; import org.sonatype.aether.resolution.VersionRangeRequest; import org.sonatype.aether.resolution.VersionRangeResolutionException; import org.sonatype.aether.resolution.VersionRangeResult; import org.sonatype.aether.test.util.impl.StubVersion; import org.sonatype.aether.version.Version; /** * @author Benjamin Hanzelmann */ public class StubVersionRangeResolver implements VersionRangeResolver { public VersionRangeResult resolveVersionRange( RepositorySystemSession session, VersionRangeRequest request ) throws VersionRangeResolutionException { String version = request.getArtifact().getVersion(); boolean range = false; if ( version.matches( "\\[[^,]+,.*" ) ) { version = version.substring( 1, version.indexOf( ',', 1 ) ); range = true; } VersionRangeResult result = new VersionRangeResult( request ); StubVersion ver = new StubVersion( version ); result.setVersions( Arrays.asList( (Version) ver ) ); if ( range && !request.getRepositories().isEmpty() ) { result.setRepository( ver, request.getRepositories().get( 0 ) ); } return result; } } aether-1.13.1/aether-impl/src/test/java/org/sonatype/aether/impl/internal/StubVersionResolver.java000066400000000000000000000024461167050556700333130ustar00rootroot00000000000000package org.sonatype.aether.impl.internal; /******************************************************************************* * 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; import org.sonatype.aether.impl.VersionResolver; import org.sonatype.aether.resolution.VersionRequest; import org.sonatype.aether.resolution.VersionResolutionException; import org.sonatype.aether.resolution.VersionResult; /** * @author Benjamin Hanzelmann * */ class StubVersionResolver implements VersionResolver { public VersionResult resolveVersion( RepositorySystemSession session, VersionRequest request ) throws VersionResolutionException { VersionResult result = new VersionResult( request ).setVersion( request.getArtifact().getVersion() ); if ( request.getRepositories().size() > 0 ) { result = result.setRepository( request.getRepositories().get( 0 ) ); } return result; } } TrackingFileManagerTest.java000066400000000000000000000112501167050556700337150ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/java/org/sonatype/aether/impl/internalpackage org.sonatype.aether.impl.internal; /******************************************************************************* * 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 static org.junit.Assert.*; import java.io.File; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Properties; import org.junit.Test; import org.sonatype.aether.test.util.TestFileUtils; /** */ public class TrackingFileManagerTest { @Test public void testRead() throws Exception { TrackingFileManager tfm = new TrackingFileManager(); File propFile = TestFileUtils.createTempFile( "#COMMENT\nkey1=value1\nkey2 : value2" ); Properties props = tfm.read( propFile ); assertNotNull( props ); assertEquals( String.valueOf( props ), 2, props.size() ); assertEquals( "value1", props.get( "key1" ) ); assertEquals( "value2", props.get( "key2" ) ); assertTrue( "Leaked file: " + propFile, propFile.delete() ); props = tfm.read( propFile ); assertNull( String.valueOf( props ), props ); } @Test public void testReadNoFileLeak() throws Exception { TrackingFileManager tfm = new TrackingFileManager(); for ( int i = 0; i < 1000; i++ ) { File propFile = TestFileUtils.createTempFile( "#COMMENT\nkey1=value1\nkey2 : value2" ); assertNotNull( tfm.read( propFile ) ); assertTrue( "Leaked file: " + propFile, propFile.delete() ); } } @Test public void testUpdate() throws Exception { TrackingFileManager tfm = new TrackingFileManager(); // NOTE: The excessive repetitions are to check the update properly truncates the file File propFile = TestFileUtils.createTempFile( "key1=value1\nkey2 : value2\n".getBytes( "UTF-8" ), 1000 ); Map updates = new HashMap(); updates.put( "key1", "v" ); updates.put( "key2", null ); tfm.update( propFile, updates ); Properties props = tfm.read( propFile ); assertNotNull( props ); assertEquals( String.valueOf( props ), 1, props.size() ); assertEquals( "v", props.get( "key1" ) ); assertNull( String.valueOf( props.get( "key2" ) ), props.get( "key2" ) ); } @Test public void testUpdateNoFileLeak() throws Exception { TrackingFileManager tfm = new TrackingFileManager(); Map updates = new HashMap(); updates.put( "k", "v" ); for ( int i = 0; i < 1000; i++ ) { File propFile = TestFileUtils.createTempFile( "#COMMENT\nkey1=value1\nkey2 : value2" ); assertNotNull( tfm.update( propFile, updates ) ); assertTrue( "Leaked file: " + propFile, propFile.delete() ); } } @Test public void testLockingOnCanonicalPath() throws Exception { final TrackingFileManager tfm = new TrackingFileManager(); final File propFile = TestFileUtils.createTempFile( "#COMMENT\nkey1=value1\nkey2 : value2" ); final List errors = Collections.synchronizedList( new ArrayList() ); Thread[] threads = new Thread[4]; for ( int i = 0; i < threads.length; i++ ) { String path = propFile.getParent(); for ( int j = 0; j < i; j++ ) { path += "/."; } path += "/" + propFile.getName(); final File file = new File( path ); threads[i] = new Thread() { public void run() { try { for ( int i = 0; i < 1000; i++ ) { assertNotNull( tfm.read( file ) ); } } catch ( Throwable e ) { errors.add( e ); } } }; } for ( int i = 0; i < threads.length; i++ ) { threads[i].start(); } for ( int i = 0; i < threads.length; i++ ) { threads[i].join(); } assertEquals( Collections.emptyList(), errors ); } } aether-1.13.1/aether-impl/src/test/resources/000077500000000000000000000000001167050556700210505ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/000077500000000000000000000000001167050556700253515ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big.txt000066400000000000000000000000261167050556700277460ustar00rootroot000000000000001:2:pom:5.50-SNAPSHOT aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big/000077500000000000000000000000001167050556700272075ustar00rootroot0000000000000010_117_4.0-SNAPSHOT_pom.ini000066400000000000000000000024311167050556700331320ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:74:pom:3.5.0-SNAPSHOT 1:64:pom:1.3-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:8:pom:2.1.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:86:pom:7.13.2-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:4:pom:2.5.4-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:55:pom:4.4-SNAPSHOT 1:78:pom:2.6-SNAPSHOT 1:36:pom:2.0-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:32:pom:720-SNAPSHOT 1:33:pom:711-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:119:pom:1.0-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 1:115:pom:4.2.1-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:19:pom:6.3-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:5:pom:1.6-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:120:pom:1.0-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:121:pom:3.0-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:172:pom:4.0-SNAPSHOT 10:349:pom:4.0-SNAPSHOT 10:139:pom:3.0-SNAPSHOT 10:205:pom:4.0-SNAPSHOT 10:180:pom:3.1-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:226:pom:4.0-SNAPSHOT 10:141:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10:212:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:242:pom:4.0-SNAPSHOT 10:146:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10_117_4.1-SNAPSHOT_pom.ini000066400000000000000000000025131167050556700331340ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:74:pom:3.5.0-SNAPSHOT 1:64:pom:1.3-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:8:pom:2.1.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:86:pom:7.13.2-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:4:pom:2.5.4-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:55:pom:4.8.2-SNAPSHOT 1:78:pom:2.6-SNAPSHOT 1:36:pom:2.0-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:32:pom:720-SNAPSHOT 1:33:pom:711-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:119:pom:1.0-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 1:115:pom:4.2.1-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:19:pom:6.3-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:5:pom:1.6-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:120:pom:1.0-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:121:pom:3.1-SNAPSHOT 10:359:pom:4.1-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:172:pom:4.1-SNAPSHOT 10:349:pom:4.1-SNAPSHOT 10:357:pom:4.1-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 10:205:pom:4.1-SNAPSHOT 10:180:pom:3.2-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:226:pom:4.1-SNAPSHOT 10:141:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:212:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:242:pom:4.1-SNAPSHOT 10:146:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10_11_4.0-SNAPSHOT_pom.ini000066400000000000000000000003421167050556700330420ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 10:12:pom:4.0-SNAPSHOT 10:42:pom:4.0-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:19:pom:6.3-SNAPSHOT 1:208:pom:10.0-SNAPSHOT 1:264:pom:6.2-SNAPSHOT 1:371:pom:822-SNAPSHOT 1:40:pom:6.1-SNAPSHOT 10_11_4.1-SNAPSHOT_pom.ini000066400000000000000000000003421167050556700330430ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 10:12:pom:4.1-SNAPSHOT 10:42:pom:4.1-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:19:pom:6.3-SNAPSHOT 1:208:pom:10.0-SNAPSHOT 1:264:pom:6.2-SNAPSHOT 1:371:pom:822-SNAPSHOT 1:40:pom:6.1-SNAPSHOT 10_121_3.0-SNAPSHOT_pom.ini000066400000000000000000000027561167050556700331360ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:122:pom:3.1.1-SNAPSHOT 1:123:pom:3.1.1-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:4:pom:2.5.4-SNAPSHOT 1:3:pom:1.28-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:124:pom:2.2-SNAPSHOT 1:125:pom:8.1-SNAPSHOT 1:125:pom:9.1-SNAPSHOT 1:125:pom:9.5-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:126:pom:2.81-SNAPSHOT 1:126:pom:2.90-SNAPSHOT 1:126:pom:3.50-SNAPSHOT 1:127:pom:6.20-SNAPSHOT 1:127:pom:6.30-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:128:pom:2006-SNAPSHOT 1:55:pom:4.4-SNAPSHOT 1:78:pom:2.6-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:129:pom:10.1-SNAPSHOT 1:130:pom:10.1-SNAPSHOT 1:130:pom:10.2-SNAPSHOT 1:130:pom:11.1-SNAPSHOT 1:130:pom:9.2-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 1:131:pom:5.0-SNAPSHOT 1:131:pom:5.3-SNAPSHOT 1:131:pom:6.0-SNAPSHOT 1:115:pom:4.2.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:132:pom:7.7-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:133:pom:12.5-SNAPSHOT 1:133:pom:15.0-SNAPSHOT 1:134:pom:12.6-SNAPSHOT 1:134:pom:12.7-SNAPSHOT 1:135:pom:10.0-SNAPSHOT 1:135:pom:11.0-SNAPSHOT 1:136:pom:3.04-SNAPSHOT 1:136:pom:3.06-SNAPSHOT 1:137:pom:2.2.12-SNAPSHOT 1:138:pom:7.7.06-SNAPSHOT 1:119:pom:1.0-SNAPSHOT 1:33:pom:711-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:139:pom:3.0-SNAPSHOT 10:163:pom:4.0-SNAPSHOT 10:164:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:141:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:146:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 1:32:pom:720-SNAPSHOT 10_121_3.1-SNAPSHOT_pom.ini000066400000000000000000000034011167050556700331230ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:122:pom:3.1.1-SNAPSHOT 1:123:pom:3.1.1-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:4:pom:2.5.4-SNAPSHOT 1:3:pom:1.28-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:124:pom:2.2-SNAPSHOT 1:125:pom:8.1-SNAPSHOT 1:125:pom:9.1-SNAPSHOT 1:125:pom:9.5-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:126:pom:2.81-SNAPSHOT 1:126:pom:2.90-SNAPSHOT 1:126:pom:3.50-SNAPSHOT 1:127:pom:6.20-SNAPSHOT 1:127:pom:6.30-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:128:pom:2006-SNAPSHOT 1:196:pom:1.2.12-SNAPSHOT 1:55:pom:4.8.2-SNAPSHOT 1:78:pom:2.6-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:129:pom:10.1-SNAPSHOT 1:130:pom:10.1-SNAPSHOT 1:130:pom:10.2-SNAPSHOT 1:130:pom:11.1-SNAPSHOT 1:130:pom:9.2-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 1:131:pom:5.0-SNAPSHOT 1:131:pom:5.3-SNAPSHOT 1:131:pom:6.0-SNAPSHOT 1:115:pom:4.2.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:132:pom:7.7-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:133:pom:12.5-SNAPSHOT 1:133:pom:15.0-SNAPSHOT 1:133:pom:15.5-SNAPSHOT 1:134:pom:12.6-SNAPSHOT 1:134:pom:12.7-SNAPSHOT 1:135:pom:10.0-SNAPSHOT 1:135:pom:11.0-SNAPSHOT 1:136:pom:3.04-SNAPSHOT 1:136:pom:3.06-SNAPSHOT 1:137:pom:2.2.12-SNAPSHOT 1:138:pom:7.7.06-SNAPSHOT 1:119:pom:1.0-SNAPSHOT 1:33:pom:711-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 10:164:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:141:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:146:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 1:32:pom:720-SNAPSHOT 1:184:pom:20080807-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:30:pom:0.7.0-SNAPSHOT 1:159:pom:2.1_03-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:51:pom:1.6.2-SNAPSHOT 1:311:pom:2.3.0-SNAPSHOT 1:29:pom:3.0.5-SNAPSHOT 10_12_4.0-SNAPSHOT_pom.ini000066400000000000000000000013431167050556700330450ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:15:pom:1.36.0-SNAPSHOT 1:16:pom:1.8.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:35:pom:1.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:7:pom:5.8.9-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 1:40:pom:6.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:41:pom:5.0-SNAPSHOT 1:21:pom:3.2.1.2-SNAPSHOT 10:148:pom:4.0-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:261:pom:4.0-SNAPSHOT 10:263:pom:4.0-SNAPSHOT 10:42:pom:4.0-SNAPSHOT 10:146:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10:149:pom:4.0-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 10_12_4.1-SNAPSHOT_pom.ini000066400000000000000000000013721167050556700330500ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:34:pom:1.13-SNAPSHOT 1:15:pom:1.36.0-SNAPSHOT 1:16:pom:1.8.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:35:pom:1.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:7:pom:5.8.9-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 1:40:pom:6.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:41:pom:5.0-SNAPSHOT 1:21:pom:3.2.1.2-SNAPSHOT 10:148:pom:4.1-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:261:pom:4.1-SNAPSHOT 10:263:pom:4.1-SNAPSHOT 10:42:pom:4.1-SNAPSHOT 10:146:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10:149:pom:4.1-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 10_139_3.0-SNAPSHOT_pom.ini000066400000000000000000000014451167050556700331410ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:8:pom:2.1.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:4:pom:2.5.4-SNAPSHOT 1:3:pom:1.28-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:36:pom:2.0-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 1:115:pom:4.2.1-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:141:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 1:32:pom:720-SNAPSHOT 1:33:pom:711-SNAPSHOT 10_139_3.1-SNAPSHOT_pom.ini000066400000000000000000000013351167050556700331400ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:8:pom:2.1.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:4:pom:2.5.4-SNAPSHOT 1:3:pom:1.28-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:4.2.1-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:36:pom:2.0-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 1:115:pom:4.2.1-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 1:32:pom:720-SNAPSHOT 1:33:pom:711-SNAPSHOT 10_141_4.0-SNAPSHOT_pom.ini000066400000000000000000000013421167050556700331270ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:8:pom:2.1.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:16:pom:1.8.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:142:pom:9.1-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:18:pom:5.1.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:143:pom:6.0-SNAPSHOT 1:109:pom:6.0.5-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:69:pom:8.1.7-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:138:pom:7.7.06-SNAPSHOT 1:33:pom:711-SNAPSHOT 1:103:pom:6403-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:41:pom:5.0-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:144:pom:15.0-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10:150:pom:4.0-SNAPSHOT 10:146:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10_141_4.1-SNAPSHOT_pom.ini000066400000000000000000000013451167050556700331330ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:8:pom:2.1.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:16:pom:1.8.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:142:pom:9.1-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:18:pom:5.1.1.41-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:143:pom:6.0-SNAPSHOT 1:109:pom:6.0.5-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:69:pom:8.1.7-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:138:pom:7.7.06-SNAPSHOT 1:33:pom:711-SNAPSHOT 1:103:pom:6403-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:41:pom:5.0-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:144:pom:15.0-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:150:pom:4.1-SNAPSHOT 10:146:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10_145_4.0-SNAPSHOT_pom.ini000066400000000000000000000006641167050556700331410ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:8:pom:2.7.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:18:pom:5.1.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:109:pom:6.0.5-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:141:pom:4.0-SNAPSHOT 10:146:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10:148:pom:4.0-SNAPSHOT 10:149:pom:4.0-SNAPSHOT 10_145_4.1-SNAPSHOT_pom.ini000066400000000000000000000006671167050556700331450ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:8:pom:2.7.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:18:pom:5.1.1.41-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:109:pom:6.0.5-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:141:pom:4.1-SNAPSHOT 10:146:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10:148:pom:4.1-SNAPSHOT 10:149:pom:4.1-SNAPSHOT 10_146_4.0-SNAPSHOT_pom.ini000066400000000000000000000004441167050556700331360ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:18:pom:5.1.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10_146_4.1-SNAPSHOT_pom.ini000066400000000000000000000004471167050556700331420ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:18:pom:5.1.1.41-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10_147_4.0-SNAPSHOT_pom.ini000066400000000000000000000007621167050556700331420ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:16:pom:1.8.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:77:pom:1.45-SNAPSHOT 1:18:pom:5.1.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:33:pom:711-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:144:pom:15.0-SNAPSHOT 1:116:pom:4.0-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10_147_4.1-SNAPSHOT_pom.ini000066400000000000000000000007651167050556700331460ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:16:pom:1.8.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:77:pom:1.45-SNAPSHOT 1:18:pom:5.1.1.41-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:33:pom:711-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:144:pom:15.0-SNAPSHOT 1:116:pom:4.0-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10_148_4.0-SNAPSHOT_pom.ini000066400000000000000000000003661167050556700331430ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 10:11:pom:4.0-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:119:pom:1.0-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10_148_4.1-SNAPSHOT_pom.ini000066400000000000000000000003661167050556700331440ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 10:11:pom:4.1-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:119:pom:1.0-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10_149_4.0-SNAPSHOT_pom.ini000066400000000000000000000007751167050556700331500ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:18:pom:5.1.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:109:pom:6.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:21:pom:3.2.1.2-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:108:pom:4.0-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:141:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10:148:pom:4.0-SNAPSHOT 10_149_4.1-SNAPSHOT_pom.ini000066400000000000000000000010001167050556700331270ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:18:pom:5.1.1.41-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:109:pom:6.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:21:pom:3.2.1.2-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:108:pom:4.0-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:141:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10:148:pom:4.1-SNAPSHOT 10_150_4.0-SNAPSHOT_pom.ini000066400000000000000000000020561167050556700331320ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:48:pom:1.3-SNAPSHOT 1:83:pom:1.10.0-SNAPSHOT 1:8:pom:2.1.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:15:pom:1.36.0-SNAPSHOT 1:49:pom:6.0.5.25-SNAPSHOT 1:16:pom:1.8.0-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:52:pom:1.8-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:55:pom:4.4-SNAPSHOT 1:18:pom:5.1.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:35:pom:1.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 1:21:pom:3.2.1.2-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:41:pom:5.0-SNAPSHOT 1:151:pom:3.7.1-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:141:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:156:pom:4.0-SNAPSHOT 10:42:pom:4.0-SNAPSHOT 10:12:pom:4.0-SNAPSHOT 10:146:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10:148:pom:4.0-SNAPSHOT 10:149:pom:4.0-SNAPSHOT 10:160:pom:4.0-SNAPSHOT 10:43:pom:4.0-SNAPSHOT 10:162:pom:4.0-SNAPSHOT 10:161:pom:4.0-SNAPSHOT 10_150_4.1-SNAPSHOT_pom.ini000066400000000000000000000020351167050556700331300ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:48:pom:1.3-SNAPSHOT 1:83:pom:1.10.0-SNAPSHOT 1:8:pom:2.1.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:15:pom:1.36.0-SNAPSHOT 1:49:pom:6.0.5.25-SNAPSHOT 1:16:pom:1.8.0-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:55:pom:4.8.2-SNAPSHOT 1:18:pom:5.1.1.41-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:35:pom:1.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 1:21:pom:3.2.1.2-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:41:pom:5.0-SNAPSHOT 1:151:pom:3.7.1-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:141:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:156:pom:4.1-SNAPSHOT 10:42:pom:4.1-SNAPSHOT 10:12:pom:4.1-SNAPSHOT 10:146:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10:148:pom:4.1-SNAPSHOT 10:149:pom:4.1-SNAPSHOT 10:160:pom:4.1-SNAPSHOT 10:43:pom:4.1-SNAPSHOT 10:162:pom:4.1-SNAPSHOT 10:161:pom:4.1-SNAPSHOT 10_152_4.0-SNAPSHOT_pom.ini000066400000000000000000000013501167050556700331300ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:153:pom:1.1.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:48:pom:1.3-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:52:pom:1.8-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:55:pom:4.4-SNAPSHOT 1:18:pom:5.1.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:154:pom:3.3-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:139:pom:3.0-SNAPSHOT 10:155:pom:4.0-SNAPSHOT 10:42:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:160:pom:4.0-SNAPSHOT 10:43:pom:4.0-SNAPSHOT 10:161:pom:4.0-SNAPSHOT 1:158:pom:3.5-SNAPSHOT 10_152_4.1-SNAPSHOT_pom.ini000066400000000000000000000014371167050556700331370ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:153:pom:1.1.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:48:pom:1.3-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:55:pom:4.8.2-SNAPSHOT 1:18:pom:5.1.1.41-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:154:pom:3.3-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:357:pom:4.1-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 10:155:pom:4.1-SNAPSHOT 10:42:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:160:pom:4.1-SNAPSHOT 10:43:pom:4.1-SNAPSHOT 10:161:pom:4.1-SNAPSHOT 1:158:pom:3.5-SNAPSHOT 10:363:pom:4.1-SNAPSHOT 1:29:pom:3.0.5-SNAPSHOT 10_155_4.0-SNAPSHOT_pom.ini000066400000000000000000000003371167050556700331370ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:156:pom:4.0-SNAPSHOT 10_155_4.1-SNAPSHOT_pom.ini000066400000000000000000000003371167050556700331400ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:156:pom:4.1-SNAPSHOT 10_156_4.0-SNAPSHOT_pom.ini000066400000000000000000000014621167050556700331400ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:30:pom:0.7.0-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:153:pom:1.1.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:48:pom:1.3-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:157:pom:0.0.356_sap.1-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:158:pom:3.5-SNAPSHOT 1:50:pom:3.5-SNAPSHOT 1:52:pom:1.8-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:77:pom:1.45-SNAPSHOT 1:55:pom:4.4-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:40:pom:6.1-SNAPSHOT 1:159:pom:2.1_03-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10:160:pom:4.0-SNAPSHOT 10:43:pom:4.0-SNAPSHOT 10:161:pom:4.0-SNAPSHOT 10_156_4.1-SNAPSHOT_pom.ini000066400000000000000000000014361167050556700331420ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:30:pom:0.7.0-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:153:pom:1.1.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:48:pom:1.3-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:157:pom:0.0.356_sap.1-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:158:pom:3.5-SNAPSHOT 1:50:pom:3.5-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:77:pom:1.45-SNAPSHOT 1:55:pom:4.8.2-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:40:pom:6.1-SNAPSHOT 1:159:pom:2.1_03-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10:160:pom:4.1-SNAPSHOT 10:43:pom:4.1-SNAPSHOT 10:161:pom:4.1-SNAPSHOT 10_160_4.0-SNAPSHOT_pom.ini000066400000000000000000000001221167050556700331230ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:48:pom:1.3-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10_160_4.1-SNAPSHOT_pom.ini000066400000000000000000000001221167050556700331240ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:48:pom:1.3-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10_161_4.0-SNAPSHOT_pom.ini000066400000000000000000000004741167050556700331360ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:48:pom:1.3-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:52:pom:1.8-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10:160:pom:4.0-SNAPSHOT 10:162:pom:4.0-SNAPSHOT 10_161_4.1-SNAPSHOT_pom.ini000066400000000000000000000004461167050556700331360ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:48:pom:1.3-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10:160:pom:4.1-SNAPSHOT 10:162:pom:4.1-SNAPSHOT 10_162_4.0-SNAPSHOT_pom.ini000066400000000000000000000003421167050556700331310ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:8:pom:2.7.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:141:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10_162_4.1-SNAPSHOT_pom.ini000066400000000000000000000003421167050556700331320ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:8:pom:2.7.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:141:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10_163_4.0-SNAPSHOT_pom.ini000066400000000000000000000006371167050556700331410ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:8:pom:2.1.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:18:pom:5.1.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:93:pom:10.0-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:101:pom:1.0_sap.1-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10:141:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10_163_4.1-SNAPSHOT_pom.ini000066400000000000000000000006421167050556700331360ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:8:pom:2.1.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:18:pom:5.1.1.41-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:93:pom:10.0-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:101:pom:1.0_sap.1-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:141:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10_164_4.0-SNAPSHOT_pom.ini000066400000000000000000000010461167050556700331350ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:8:pom:2.7.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:165:pom:11.1-SNAPSHOT 1:165:pom:7.0-SNAPSHOT 1:165:pom:7.1-SNAPSHOT 1:165:pom:9.3-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:166:pom:720-SNAPSHOT 1:33:pom:711-SNAPSHOT 1:103:pom:6403-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:81:pom:4.0-SNAPSHOT 10:167:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:141:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10:146:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10_164_4.1-SNAPSHOT_pom.ini000066400000000000000000000010461167050556700331360ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:8:pom:2.7.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:165:pom:11.1-SNAPSHOT 1:165:pom:7.0-SNAPSHOT 1:165:pom:7.1-SNAPSHOT 1:165:pom:9.3-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:166:pom:720-SNAPSHOT 1:33:pom:711-SNAPSHOT 1:103:pom:6403-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:81:pom:4.1-SNAPSHOT 10:167:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:141:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:146:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10_167_4.0-SNAPSHOT_pom.ini000066400000000000000000000031041167050556700331350ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:63:pom:1.1-SNAPSHOT 1:63:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:64:pom:1.3-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:65:pom:2.1.0-SNAPSHOT 1:8:pom:2.1.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:66:pom:0.11-SNAPSHOT 1:168:pom:6.0-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:169:pom:4.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:142:pom:9.1-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:18:pom:5.1.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:94:pom:6.0-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:170:pom:10.0-SNAPSHOT 1:95:pom:7.0-SNAPSHOT 1:97:pom:3.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:69:pom:10.1.0-SNAPSHOT 1:69:pom:11.1.0-SNAPSHOT 1:69:pom:8.1.7-SNAPSHOT 1:69:pom:9.0.1-SNAPSHOT 1:171:pom:8.45-SNAPSHOT 1:171:pom:8.46-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:100:pom:4.1-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:70:pom:9.0-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:103:pom:6403-SNAPSHOT 1:104:pom:70-SNAPSHOT 1:105:pom:70-SNAPSHOT 1:108:pom:4.0-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 1:89:pom:2.3-SNAPSHOT 10:121:pom:3.0-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:172:pom:4.0-SNAPSHOT 10:117:pom:4.0-SNAPSHOT 10:139:pom:3.0-SNAPSHOT 10:205:pom:4.0-SNAPSHOT 10:81:pom:4.0-SNAPSHOT 10:163:pom:4.0-SNAPSHOT 10:246:pom:4.0-SNAPSHOT 10:225:pom:4.0-SNAPSHOT 10:224:pom:4.0-SNAPSHOT 10:243:pom:4.0-SNAPSHOT 10:266:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:141:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:146:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10_167_4.1-SNAPSHOT_pom.ini000066400000000000000000000031071167050556700331410ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:63:pom:1.1-SNAPSHOT 1:63:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:64:pom:1.3-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:65:pom:2.1.0-SNAPSHOT 1:8:pom:2.1.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:66:pom:0.11-SNAPSHOT 1:168:pom:6.0-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:169:pom:4.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:142:pom:9.1-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:18:pom:5.1.1.41-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:94:pom:6.0-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:170:pom:10.0-SNAPSHOT 1:95:pom:7.0-SNAPSHOT 1:97:pom:3.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:69:pom:10.1.0-SNAPSHOT 1:69:pom:11.1.0-SNAPSHOT 1:69:pom:8.1.7-SNAPSHOT 1:69:pom:9.0.1-SNAPSHOT 1:171:pom:8.45-SNAPSHOT 1:171:pom:8.46-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:100:pom:4.1-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:70:pom:9.0-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:103:pom:6403-SNAPSHOT 1:104:pom:70-SNAPSHOT 1:105:pom:70-SNAPSHOT 1:108:pom:4.0-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 1:89:pom:2.3-SNAPSHOT 10:359:pom:4.1-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:172:pom:4.1-SNAPSHOT 10:117:pom:4.1-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 10:205:pom:4.1-SNAPSHOT 10:81:pom:4.1-SNAPSHOT 10:163:pom:4.1-SNAPSHOT 10:246:pom:4.1-SNAPSHOT 10:225:pom:4.1-SNAPSHOT 10:224:pom:4.1-SNAPSHOT 10:243:pom:4.1-SNAPSHOT 10:266:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:141:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:146:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10_172_4.0-SNAPSHOT_pom.ini000066400000000000000000000020241167050556700331310ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 10:173:pom:4.0-SNAPSHOT 10:121:pom:3.0-SNAPSHOT 10:81:pom:4.0-SNAPSHOT 10:174:pom:4.0-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:164:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:141:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:117:pom:4.0-SNAPSHOT 10:146:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10:139:pom:3.0-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:8:pom:2.1.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:4:pom:2.5.4-SNAPSHOT 1:3:pom:1.28-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:36:pom:2.0-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:143:pom:6.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:39:pom:0.9.8l-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:119:pom:1.0-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 1:289:pom:2.2.0-SNAPSHOT 1:115:pom:4.2.1-SNAPSHOT 1:21:pom:3.2.1.2-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:40:pom:6.1-SNAPSHOT 1:32:pom:720-SNAPSHOT 1:33:pom:711-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10_172_4.1-SNAPSHOT_pom.ini000066400000000000000000000020541167050556700331350ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 10:173:pom:4.1-SNAPSHOT 10:121:pom:3.1-SNAPSHOT 10:81:pom:4.1-SNAPSHOT 10:174:pom:4.1-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:164:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:141:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:117:pom:4.1-SNAPSHOT 10:146:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10:357:pom:4.1-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:8:pom:2.1.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:4:pom:2.5.4-SNAPSHOT 1:3:pom:1.28-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:36:pom:2.0-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:143:pom:6.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:39:pom:0.9.8l-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:119:pom:1.0-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 1:289:pom:2.2.0-SNAPSHOT 1:115:pom:4.2.1-SNAPSHOT 1:21:pom:3.2.1.2-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:40:pom:6.1-SNAPSHOT 1:32:pom:720-SNAPSHOT 1:33:pom:711-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10_173_4.0-SNAPSHOT_pom.ini000066400000000000000000000001501167050556700331300ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10_173_4.1-SNAPSHOT_pom.ini000066400000000000000000000001501167050556700331310ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10_174_4.0-SNAPSHOT_pom.ini000066400000000000000000000035771167050556700331510ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:30:pom:0.7.0-SNAPSHOT 10:175:pom:2.0-SNAPSHOT 10:173:pom:4.0-SNAPSHOT 10:121:pom:3.0-SNAPSHOT 10:180:pom:3.1-SNAPSHOT 10:189:pom:4.0-SNAPSHOT 10:202:pom:4.0-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:172:pom:4.0-SNAPSHOT 10:203:pom:4.0-SNAPSHOT 10:176:pom:4.0-SNAPSHOT 10:177:pom:4.0-SNAPSHOT 10:345:pom:4.0-SNAPSHOT 10:178:pom:4.0-SNAPSHOT 10:179:pom:4.0-SNAPSHOT 10:346:pom:4.0-SNAPSHOT 10:347:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:226:pom:4.0-SNAPSHOT 10:232:pom:4.0-SNAPSHOT 10:141:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:117:pom:4.0-SNAPSHOT 10:257:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10:139:pom:3.0-SNAPSHOT 1:123:pom:3.1.1-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:76:pom:1.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:64:pom:1.3-SNAPSHOT 1:46:pom:1.0.2-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:65:pom:2.1.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:50:pom:3.5-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:184:pom:20080807-SNAPSHOT 1:185:pom:1.0_sap.1-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:348:pom:3.8.0-SNAPSHOT 1:195:pom:3.2-SNAPSHOT 1:55:pom:4.4-SNAPSHOT 1:84:pom:2.2.0036-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 1:289:pom:2.2.0-SNAPSHOT 1:115:pom:4.2.1-SNAPSHOT 1:19:pom:6.3-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:29:pom:3.0.5-SNAPSHOT 1:40:pom:6.1-SNAPSHOT 1:32:pom:720-SNAPSHOT 1:33:pom:711-SNAPSHOT 1:188:pom:1.9-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:75:pom:26-SNAPSHOT 1:342:pom:1.2-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:318:pom:4.0-SNAPSHOT 10:320:pom:4.0-SNAPSHOT 10:319:pom:4.0-SNAPSHOT 10:205:pom:4.0-SNAPSHOT 1:201:pom:3.5.2-SNAPSHOT 10_174_4.1-SNAPSHOT_pom.ini000066400000000000000000000037671167050556700331530ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:30:pom:0.7.0-SNAPSHOT 10:175:pom:2.1-SNAPSHOT 10:173:pom:4.1-SNAPSHOT 10:360:pom:1.0-SNAPSHOT 10:121:pom:3.1-SNAPSHOT 10:359:pom:4.1-SNAPSHOT 10:180:pom:3.2-SNAPSHOT 10:189:pom:4.1-SNAPSHOT 10:202:pom:4.1-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:172:pom:4.1-SNAPSHOT 10:203:pom:4.1-SNAPSHOT 10:176:pom:4.1-SNAPSHOT 10:177:pom:4.1-SNAPSHOT 10:345:pom:4.1-SNAPSHOT 10:178:pom:4.1-SNAPSHOT 10:179:pom:4.1-SNAPSHOT 10:346:pom:4.1-SNAPSHOT 10:347:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:226:pom:4.1-SNAPSHOT 10:232:pom:4.1-SNAPSHOT 10:141:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:117:pom:4.1-SNAPSHOT 10:257:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10:357:pom:4.1-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 1:123:pom:3.1.1-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:76:pom:1.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:64:pom:1.3-SNAPSHOT 1:46:pom:1.0.2-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:65:pom:2.1.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:50:pom:3.5-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:184:pom:20080807-SNAPSHOT 1:185:pom:1.0_sap.2-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:348:pom:3.8.0-SNAPSHOT 1:370:pom:6.0-SNAPSHOT 1:195:pom:3.2-SNAPSHOT 1:55:pom:4.8.2-SNAPSHOT 1:84:pom:2.2.0036-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 1:289:pom:2.2.0-SNAPSHOT 1:115:pom:4.2.1-SNAPSHOT 1:19:pom:6.3-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:29:pom:3.0.5-SNAPSHOT 1:40:pom:6.1-SNAPSHOT 1:32:pom:720-SNAPSHOT 1:33:pom:711-SNAPSHOT 1:188:pom:1.9-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:75:pom:26-SNAPSHOT 1:342:pom:1.2-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:318:pom:4.1-SNAPSHOT 10:320:pom:4.1-SNAPSHOT 10:319:pom:4.1-SNAPSHOT 10:205:pom:4.1-SNAPSHOT 1:201:pom:3.5.2-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 10_175_2.0-SNAPSHOT_pom.ini000066400000000000000000000010131167050556700331270ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 10:11:pom:4.0-SNAPSHOT 10:176:pom:4.0-SNAPSHOT 10:177:pom:4.0-SNAPSHOT 10:178:pom:4.0-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:5:pom:1.6-SNAPSHOT 1:65:pom:2.1.0-SNAPSHOT 1:75:pom:25-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:47:pom:2.9.1-SNAPSHOT 1:74:pom:3.5.0-SNAPSHOT 1:77:pom:1.45-SNAPSHOT 1:29:pom:3.0.5-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 1:55:pom:3.8.1-SNAPSHOT 1:55:pom:4.4-SNAPSHOT 10_175_2.1-SNAPSHOT_pom.ini000066400000000000000000000007341167050556700331410ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 10:11:pom:4.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:5:pom:1.6-SNAPSHOT 1:65:pom:2.1.0-SNAPSHOT 1:75:pom:26-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:47:pom:2.9.1-SNAPSHOT 1:74:pom:3.5.0-SNAPSHOT 1:77:pom:1.45-SNAPSHOT 1:29:pom:3.0.5-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 1:55:pom:3.8.1-SNAPSHOT 1:55:pom:4.8.2-SNAPSHOT 10:42:pom:4.1-SNAPSHOT 10_176_4.0-SNAPSHOT_pom.ini000066400000000000000000000003421167050556700331360ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:177:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10_176_4.1-SNAPSHOT_pom.ini000066400000000000000000000003421167050556700331370ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:177:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10_177_4.0-SNAPSHOT_pom.ini000066400000000000000000000003031167050556700331340ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10_177_4.1-SNAPSHOT_pom.ini000066400000000000000000000003031167050556700331350ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10_178_4.0-SNAPSHOT_pom.ini000066400000000000000000000005271167050556700331450ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:123:pom:3.1.1-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:65:pom:2.1.0-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:75:pom:26-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:177:pom:4.0-SNAPSHOT 10:179:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10_178_4.1-SNAPSHOT_pom.ini000066400000000000000000000005271167050556700331460ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:123:pom:3.1.1-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:65:pom:2.1.0-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:75:pom:26-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:177:pom:4.1-SNAPSHOT 10:179:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10_179_4.0-SNAPSHOT_pom.ini000066400000000000000000000003701167050556700331420ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:123:pom:3.1.1-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:75:pom:26-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10_179_4.1-SNAPSHOT_pom.ini000066400000000000000000000003701167050556700331430ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:123:pom:3.1.1-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:75:pom:26-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10_180_3.1-SNAPSHOT_pom.ini000066400000000000000000000012721167050556700331340ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:181:pom:1.0-SNAPSHOT 1:182:pom:3.2-SNAPSHOT 1:183:pom:0.9-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:184:pom:20080807-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:185:pom:1.0_sap.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:186:pom:4.1-SNAPSHOT 1:55:pom:4.4-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:187:pom:4.3-SNAPSHOT 1:188:pom:1.9-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:5:pom:1.6-SNAPSHOT 1:120:pom:1.0-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 1:30:pom:0.7.0-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:139:pom:3.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 10_180_3.2-SNAPSHOT_pom.ini000066400000000000000000000013241167050556700331330ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:181:pom:1.0-SNAPSHOT 1:182:pom:3.2-SNAPSHOT 1:183:pom:0.9-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:73:pom:2.4.1-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:184:pom:20080807-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:185:pom:1.0_sap.2-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:186:pom:4.1-SNAPSHOT 1:55:pom:4.8.2-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:187:pom:4.3-SNAPSHOT 1:188:pom:1.9-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:5:pom:1.6-SNAPSHOT 1:120:pom:1.0-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 1:30:pom:0.7.0-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 10_189_4.0-SNAPSHOT_pom.ini000066400000000000000000000020211167050556700331360ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:190:pom:2.0.8-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:184:pom:20080807-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:191:pom:3.2-SNAPSHOT 1:192:pom:1.8.0.7-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:193:pom:0.8.1-SNAPSHOT 1:194:pom:2.3.0-SNAPSHOT 1:195:pom:3.2-SNAPSHOT 1:196:pom:1.2.12-SNAPSHOT 1:197:pom:5.1.3-SNAPSHOT 1:55:pom:4.4-SNAPSHOT 1:84:pom:2.2.0036-SNAPSHOT 1:56:pom:1.2-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:69:pom:10.1.0-SNAPSHOT 1:69:pom:8.1.7-SNAPSHOT 1:69:pom:9.0.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:29:pom:3.0.5-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:198:pom:9.1.3-SNAPSHOT 1:199:pom:2.2-SNAPSHOT 1:187:pom:4.3-SNAPSHOT 1:89:pom:2.3-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:200:pom:3.1.12-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:121:pom:3.0-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:139:pom:3.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:149:pom:4.0-SNAPSHOT 10:148:pom:4.0-SNAPSHOT 1:30:pom:0.7.0-SNAPSHOT 1:201:pom:3.5.2-SNAPSHOT 10:180:pom:3.1-SNAPSHOT 10_189_4.1-SNAPSHOT_pom.ini000066400000000000000000000021031167050556700331400ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:123:pom:3.1.1-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:190:pom:2.0.8-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:184:pom:20080807-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:191:pom:3.2-SNAPSHOT 1:192:pom:1.8.0.7-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:193:pom:0.8.1-SNAPSHOT 1:194:pom:2.3.0-SNAPSHOT 1:195:pom:3.2-SNAPSHOT 1:196:pom:1.2.12-SNAPSHOT 1:197:pom:5.1.3-SNAPSHOT 1:55:pom:4.8.2-SNAPSHOT 1:84:pom:2.2.0036-SNAPSHOT 1:56:pom:1.2-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:69:pom:10.1.0-SNAPSHOT 1:69:pom:8.1.7-SNAPSHOT 1:69:pom:9.0.1-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:29:pom:3.0.5-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:198:pom:9.1.3-SNAPSHOT 1:199:pom:2.2-SNAPSHOT 1:187:pom:4.3-SNAPSHOT 1:89:pom:2.3-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:200:pom:3.1.12-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:121:pom:3.1-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:149:pom:4.1-SNAPSHOT 10:148:pom:4.1-SNAPSHOT 1:30:pom:0.7.0-SNAPSHOT 1:201:pom:3.5.2-SNAPSHOT 10:180:pom:3.2-SNAPSHOT 10_202_4.0-SNAPSHOT_pom.ini000066400000000000000000000012031167050556700331210ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:64:pom:1.3-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:55:pom:4.4-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:19:pom:6.3-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:121:pom:3.0-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:180:pom:3.1-SNAPSHOT 10:189:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:156:pom:4.0-SNAPSHOT 1:30:pom:0.7.0-SNAPSHOT 10_202_4.1-SNAPSHOT_pom.ini000066400000000000000000000012351167050556700331270ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:64:pom:1.3-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:55:pom:4.8.2-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:19:pom:6.3-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:121:pom:3.1-SNAPSHOT 10:359:pom:4.1-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:180:pom:3.2-SNAPSHOT 10:189:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:156:pom:4.1-SNAPSHOT 1:30:pom:0.7.0-SNAPSHOT 10_203_4.0-SNAPSHOT_pom.ini000066400000000000000000000011751167050556700331320ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:204:pom:1.6.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.2.12-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:139:pom:3.0-SNAPSHOT 10:205:pom:4.0-SNAPSHOT 10:62:pom:4.0-SNAPSHOT 10:243:pom:4.0-SNAPSHOT 10:275:pom:4.0-SNAPSHOT 10:276:pom:4.0-SNAPSHOT 10:177:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:226:pom:4.0-SNAPSHOT 10:232:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:284:pom:2.0-SNAPSHOT 1:185:pom:1.0_sap.1-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 10_203_4.1-SNAPSHOT_pom.ini000066400000000000000000000011751167050556700331330ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:204:pom:1.6.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.2.12-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 10:205:pom:4.1-SNAPSHOT 10:62:pom:4.1-SNAPSHOT 10:243:pom:4.1-SNAPSHOT 10:275:pom:4.1-SNAPSHOT 10:276:pom:4.1-SNAPSHOT 10:177:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:226:pom:4.1-SNAPSHOT 10:232:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:284:pom:2.1-SNAPSHOT 1:185:pom:1.0_sap.2-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 10_205_4.0-SNAPSHOT_pom.ini000066400000000000000000000044711167050556700331360ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 10:121:pom:3.0-SNAPSHOT 10:180:pom:3.1-SNAPSHOT 10:174:pom:4.0-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:172:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:206:pom:4.0-SNAPSHOT 10:216:pom:4.0-SNAPSHOT 10:220:pom:4.0-SNAPSHOT 10:226:pom:4.0-SNAPSHOT 10:231:pom:4.0-SNAPSHOT 10:232:pom:4.0-SNAPSHOT 10:141:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:156:pom:4.0-SNAPSHOT 10:235:pom:4.0-SNAPSHOT 10:261:pom:4.0-SNAPSHOT 10:242:pom:4.0-SNAPSHOT 10:238:pom:4.0-SNAPSHOT 10:117:pom:4.0-SNAPSHOT 10:257:pom:4.0-SNAPSHOT 10:146:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10:149:pom:4.0-SNAPSHOT 10:139:pom:3.0-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:76:pom:1.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:64:pom:1.3-SNAPSHOT 1:46:pom:1.0.2-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:65:pom:2.1.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:8:pom:2.1.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:287:pom:1.1.2.1-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:184:pom:20080807-SNAPSHOT 1:185:pom:1.0_sap.1-SNAPSHOT 1:4:pom:2.5.4-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:87:pom:6b-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:222:pom:beta8-SNAPSHOT 1:197:pom:5.1.3-SNAPSHOT 1:338:pom:2.8-SNAPSHOT 1:217:pom:1.0_sap.1-SNAPSHOT 1:55:pom:4.4-SNAPSHOT 1:36:pom:2.0-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:143:pom:6.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:339:pom:8.0.1p5-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 1:289:pom:2.2.0-SNAPSHOT 1:115:pom:4.2.1-SNAPSHOT 1:19:pom:6.3-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:112:pom:1.0.30-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:283:pom:1.0-SNAPSHOT 1:5:pom:1.6-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:340:pom:2.9-SNAPSHOT 1:341:pom:0.9-SNAPSHOT 1:114:pom:2.50.28_sap.1-SNAPSHOT 1:120:pom:1.0-SNAPSHOT 1:75:pom:26-SNAPSHOT 1:342:pom:1.2-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:343:pom:4.0-SNAPSHOT 10:212:pom:4.0-SNAPSHOT 1:24:pom:1.2.10-SNAPSHOT 1:239:pom:3.0-SNAPSHOT 1:240:pom:720-SNAPSHOT 10:320:pom:4.0-SNAPSHOT 10:318:pom:4.0-SNAPSHOT 10:319:pom:4.0-SNAPSHOT 10:305:pom:4.0-SNAPSHOT 10:212:pom:4.0-SNAPSHOT 1:24:pom:1.2.10-SNAPSHOT 1:239:pom:3.0-SNAPSHOT 10:42:pom:4.0-SNAPSHOT 1:151:pom:3.7.1-SNAPSHOT 1:344:pom:1.6.0-SNAPSHOT 10_205_4.1-SNAPSHOT_pom.ini000066400000000000000000000046671167050556700331460ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 10:121:pom:3.1-SNAPSHOT 10:359:pom:4.1-SNAPSHOT 10:180:pom:3.2-SNAPSHOT 10:174:pom:4.1-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:172:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:206:pom:4.1-SNAPSHOT 10:216:pom:4.1-SNAPSHOT 10:220:pom:4.1-SNAPSHOT 10:226:pom:4.1-SNAPSHOT 10:231:pom:4.1-SNAPSHOT 10:232:pom:4.1-SNAPSHOT 10:141:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:156:pom:4.1-SNAPSHOT 10:235:pom:4.1-SNAPSHOT 10:261:pom:4.1-SNAPSHOT 10:242:pom:4.1-SNAPSHOT 10:238:pom:4.1-SNAPSHOT 10:117:pom:4.1-SNAPSHOT 10:257:pom:4.1-SNAPSHOT 10:146:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10:149:pom:4.1-SNAPSHOT 10:357:pom:4.1-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:76:pom:1.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:64:pom:1.3-SNAPSHOT 1:46:pom:1.0.2-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:65:pom:2.1.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:8:pom:2.1.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:287:pom:1.1.2.1-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:184:pom:20080807-SNAPSHOT 1:185:pom:1.0_sap.2-SNAPSHOT 1:4:pom:2.5.4-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:87:pom:6b-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:222:pom:beta8-SNAPSHOT 1:197:pom:5.1.3-SNAPSHOT 1:338:pom:3.0-SNAPSHOT 1:217:pom:1.0_sap.1-SNAPSHOT 1:55:pom:4.8.2-SNAPSHOT 1:36:pom:2.0-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:143:pom:6.0-SNAPSHOT 1:368:pom:4.7.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:339:pom:8.0.1p5-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 1:289:pom:2.2.0-SNAPSHOT 1:369:pom:2.4.5-SNAPSHOT 1:115:pom:4.2.1-SNAPSHOT 1:19:pom:6.3-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:112:pom:1.0.30-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:283:pom:1.0-SNAPSHOT 1:5:pom:1.6-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:340:pom:2.11-SNAPSHOT 1:341:pom:1.3-SNAPSHOT 1:114:pom:2.50.28_sap.1-SNAPSHOT 1:120:pom:1.0-SNAPSHOT 1:75:pom:26-SNAPSHOT 1:342:pom:1.2-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:343:pom:4.1-SNAPSHOT 10:212:pom:4.1-SNAPSHOT 1:24:pom:1.2.10-SNAPSHOT 1:239:pom:3.0-SNAPSHOT 1:240:pom:720-SNAPSHOT 10:320:pom:4.1-SNAPSHOT 10:318:pom:4.1-SNAPSHOT 10:319:pom:4.1-SNAPSHOT 10:305:pom:4.1-SNAPSHOT 10:212:pom:4.1-SNAPSHOT 1:24:pom:1.2.10-SNAPSHOT 1:239:pom:3.0-SNAPSHOT 10:42:pom:4.1-SNAPSHOT 1:151:pom:3.7.1-SNAPSHOT 1:344:pom:1.6.0-SNAPSHOT 1:260:pom:2.3.3-SNAPSHOT 10_206_4.0-SNAPSHOT_pom.ini000066400000000000000000000004261167050556700331330ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:24:pom:1.2.10-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:207:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:214:pom:4.0-SNAPSHOT 10:215:pom:4.0-SNAPSHOT 10:212:pom:4.0-SNAPSHOT 10_206_4.1-SNAPSHOT_pom.ini000066400000000000000000000004261167050556700331340ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:24:pom:1.2.10-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:207:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:214:pom:4.1-SNAPSHOT 10:215:pom:4.1-SNAPSHOT 10:212:pom:4.1-SNAPSHOT 10_207_4.0-SNAPSHOT_pom.ini000066400000000000000000000012401167050556700331270ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:24:pom:1.2.10-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:18:pom:5.1.1-SNAPSHOT 1:208:pom:10.0-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:32:pom:720-SNAPSHOT 1:33:pom:711-SNAPSHOT 1:93:pom:10.0-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:95:pom:7.1-SNAPSHOT 1:95:pom:8.0-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:108:pom:4.0-SNAPSHOT 1:209:pom:3.51-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:210:pom:4.0-SNAPSHOT 10:213:pom:4.0-SNAPSHOT 10:81:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:212:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10:148:pom:4.0-SNAPSHOT 10:149:pom:4.0-SNAPSHOT 10:43:pom:4.0-SNAPSHOT 10_207_4.1-SNAPSHOT_pom.ini000066400000000000000000000012431167050556700331330ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:24:pom:1.2.10-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:18:pom:5.1.1.41-SNAPSHOT 1:208:pom:10.0-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:32:pom:720-SNAPSHOT 1:33:pom:711-SNAPSHOT 1:93:pom:10.0-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:95:pom:7.1-SNAPSHOT 1:95:pom:8.0-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:108:pom:4.0-SNAPSHOT 1:209:pom:3.51-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:210:pom:4.1-SNAPSHOT 10:213:pom:4.1-SNAPSHOT 10:81:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:212:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10:148:pom:4.1-SNAPSHOT 10:149:pom:4.1-SNAPSHOT 10:43:pom:4.1-SNAPSHOT 10_210_4.0-SNAPSHOT_pom.ini000066400000000000000000000006001167050556700331200ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:32:pom:720-SNAPSHOT 1:33:pom:711-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:211:pom:1.0-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:81:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10:212:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10_210_4.1-SNAPSHOT_pom.ini000066400000000000000000000006001167050556700331210ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:32:pom:720-SNAPSHOT 1:33:pom:711-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:211:pom:1.0-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:81:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:212:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10_212_4.0-SNAPSHOT_pom.ini000066400000000000000000000006371167050556700331340ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:24:pom:1.2.10-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:18:pom:5.1.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:32:pom:720-SNAPSHOT 1:33:pom:711-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:211:pom:1.0-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10_212_4.1-SNAPSHOT_pom.ini000066400000000000000000000006421167050556700331310ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:24:pom:1.2.10-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:18:pom:5.1.1.41-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:32:pom:720-SNAPSHOT 1:33:pom:711-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:211:pom:1.0-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10_213_4.0-SNAPSHOT_pom.ini000066400000000000000000000003441167050556700331300ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:210:pom:4.0-SNAPSHOT 10:207:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:212:pom:4.0-SNAPSHOT 10_213_4.1-SNAPSHOT_pom.ini000066400000000000000000000003441167050556700331310ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:210:pom:4.1-SNAPSHOT 10:207:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:212:pom:4.1-SNAPSHOT 10_214_4.0-SNAPSHOT_pom.ini000066400000000000000000000003141167050556700331260ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:210:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:212:pom:4.0-SNAPSHOT 10_214_4.1-SNAPSHOT_pom.ini000066400000000000000000000003141167050556700331270ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:210:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:212:pom:4.1-SNAPSHOT 10_215_4.0-SNAPSHOT_pom.ini000066400000000000000000000003431167050556700331310ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:214:pom:4.0-SNAPSHOT 10:212:pom:4.0-SNAPSHOT 10_215_4.1-SNAPSHOT_pom.ini000066400000000000000000000003431167050556700331320ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:214:pom:4.1-SNAPSHOT 10:212:pom:4.1-SNAPSHOT 10_216_4.0-SNAPSHOT_pom.ini000066400000000000000000000021561167050556700331360ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:46:pom:1.0.2-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:50:pom:3.5-SNAPSHOT 1:185:pom:1.0_sap.1-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:217:pom:1.0_sap.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:59:pom:1.0.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:218:pom:2.2.1-SNAPSHOT 1:219:pom:2.3.4-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:139:pom:3.0-SNAPSHOT 10:205:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:220:pom:4.0-SNAPSHOT 10:226:pom:4.0-SNAPSHOT 10:231:pom:4.0-SNAPSHOT 10:232:pom:4.0-SNAPSHOT 10:285:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:298:pom:4.0-SNAPSHOT 10:238:pom:4.0-SNAPSHOT 10:242:pom:4.0-SNAPSHOT 10:263:pom:4.0-SNAPSHOT 10:148:pom:4.0-SNAPSHOT 10:149:pom:4.0-SNAPSHOT 10:43:pom:4.0-SNAPSHOT 10:161:pom:4.0-SNAPSHOT 10:337:pom:4.0-SNAPSHOT 10:228:pom:1.0-SNAPSHOT 10_216_4.1-SNAPSHOT_pom.ini000066400000000000000000000021561167050556700331370ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:46:pom:1.0.2-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:50:pom:3.5-SNAPSHOT 1:185:pom:1.0_sap.2-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:217:pom:1.0_sap.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:59:pom:1.0.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:218:pom:2.2.1-SNAPSHOT 1:219:pom:2.3.4-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 10:205:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:220:pom:4.1-SNAPSHOT 10:226:pom:4.1-SNAPSHOT 10:231:pom:4.1-SNAPSHOT 10:232:pom:4.1-SNAPSHOT 10:285:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:298:pom:4.1-SNAPSHOT 10:238:pom:4.1-SNAPSHOT 10:242:pom:4.1-SNAPSHOT 10:263:pom:4.1-SNAPSHOT 10:148:pom:4.1-SNAPSHOT 10:149:pom:4.1-SNAPSHOT 10:43:pom:4.1-SNAPSHOT 10:161:pom:4.1-SNAPSHOT 10:337:pom:4.1-SNAPSHOT 10:228:pom:1.0-SNAPSHOT 10_220_4.0-SNAPSHOT_pom.ini000066400000000000000000000023451167050556700331310ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:46:pom:1.0.2-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:65:pom:2.1.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:50:pom:3.5-SNAPSHOT 1:185:pom:1.0_sap.1-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:77:pom:1.45-SNAPSHOT 1:221:pom:8.9-SNAPSHOT 1:222:pom:1.1.1-SNAPSHOT 1:84:pom:2.2.0036-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:59:pom:1.0.1-SNAPSHOT 1:69:pom:8.1.7-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:29:pom:3.0.5-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:223:pom:7.5-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 1:218:pom:2.2.1-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:117:pom:4.0-SNAPSHOT 10:139:pom:3.0-SNAPSHOT 10:205:pom:4.0-SNAPSHOT 10:224:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:229:pom:4.0-SNAPSHOT 10:226:pom:4.0-SNAPSHOT 10:231:pom:4.0-SNAPSHOT 10:232:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:156:pom:4.0-SNAPSHOT 10:261:pom:4.0-SNAPSHOT 10:262:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10:43:pom:4.0-SNAPSHOT 10:161:pom:4.0-SNAPSHOT 10:228:pom:1.0-SNAPSHOT 10_220_4.1-SNAPSHOT_pom.ini000066400000000000000000000023751167050556700331350ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:46:pom:1.0.2-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:65:pom:2.1.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:50:pom:3.5-SNAPSHOT 1:185:pom:1.0_sap.2-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:77:pom:1.45-SNAPSHOT 1:221:pom:8.9-SNAPSHOT 1:222:pom:1.1.1-SNAPSHOT 1:84:pom:2.2.0036-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:59:pom:1.0.1-SNAPSHOT 1:69:pom:8.1.7-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:29:pom:3.0.5-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:223:pom:7.5-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 1:218:pom:2.2.1-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:117:pom:4.1-SNAPSHOT 10:357:pom:4.1-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 10:205:pom:4.1-SNAPSHOT 10:224:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:229:pom:4.1-SNAPSHOT 10:226:pom:4.1-SNAPSHOT 10:231:pom:4.1-SNAPSHOT 10:232:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:156:pom:4.1-SNAPSHOT 10:261:pom:4.1-SNAPSHOT 10:262:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10:43:pom:4.1-SNAPSHOT 10:161:pom:4.1-SNAPSHOT 10:228:pom:1.0-SNAPSHOT 10_224_4.0-SNAPSHOT_pom.ini000066400000000000000000000007321167050556700331330ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:221:pom:8.9-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:29:pom:3.0.5-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:223:pom:7.5-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:62:pom:4.0-SNAPSHOT 10:225:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:226:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10_224_4.1-SNAPSHOT_pom.ini000066400000000000000000000007321167050556700331340ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:221:pom:8.9-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:29:pom:3.0.5-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:223:pom:7.5-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:62:pom:4.1-SNAPSHOT 10:225:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:226:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10_225_4.0-SNAPSHOT_pom.ini000066400000000000000000000010731167050556700331330ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:104:pom:70-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:104:pom:70-SNAPSHOT 1:105:pom:70-SNAPSHOT 1:108:pom:4.0-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:139:pom:3.0-SNAPSHOT 10:81:pom:4.0-SNAPSHOT 10:163:pom:4.0-SNAPSHOT 10:167:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:141:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10:212:pom:4.0-SNAPSHOT 10:146:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10:149:pom:4.0-SNAPSHOT 10_225_4.1-SNAPSHOT_pom.ini000066400000000000000000000010731167050556700331340ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:104:pom:70-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:104:pom:70-SNAPSHOT 1:105:pom:70-SNAPSHOT 1:108:pom:4.0-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 10:81:pom:4.1-SNAPSHOT 10:163:pom:4.1-SNAPSHOT 10:167:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:141:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:212:pom:4.1-SNAPSHOT 10:146:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10:149:pom:4.1-SNAPSHOT 10_226_4.0-SNAPSHOT_pom.ini000066400000000000000000000014651167050556700331410ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:46:pom:1.0.2-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:15:pom:1.36.0-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:50:pom:3.5-SNAPSHOT 1:185:pom:1.0_sap.1-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:217:pom:1.0_sap.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:227:pom:7.0-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:154:pom:3.3-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:42:pom:4.0-SNAPSHOT 10:12:pom:4.0-SNAPSHOT 10:228:pom:1.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10_226_4.1-SNAPSHOT_pom.ini000066400000000000000000000015151167050556700331360ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:46:pom:1.0.2-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:15:pom:1.36.0-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:50:pom:3.5-SNAPSHOT 1:185:pom:1.0_sap.2-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:217:pom:1.0_sap.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:29:pom:3.0.5-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:227:pom:7.0-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:154:pom:3.3-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:42:pom:4.1-SNAPSHOT 10:12:pom:4.1-SNAPSHOT 10:228:pom:1.0-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10_228_1.0-SNAPSHOT_pom.ini000066400000000000000000000002021167050556700331240ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 10:139:pom:3.0-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10_229_4.0-SNAPSHOT_pom.ini000066400000000000000000000013251167050556700331370ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:46:pom:1.0.2-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:50:pom:3.5-SNAPSHOT 1:185:pom:1.0_sap.1-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:217:pom:1.0_sap.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:154:pom:3.3-SNAPSHOT 1:219:pom:2.3.4-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:230:pom:4.0-SNAPSHOT 10:226:pom:4.0-SNAPSHOT 10:232:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10_229_4.1-SNAPSHOT_pom.ini000066400000000000000000000013251167050556700331400ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:46:pom:1.0.2-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:50:pom:3.5-SNAPSHOT 1:185:pom:1.0_sap.2-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:217:pom:1.0_sap.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:154:pom:3.3-SNAPSHOT 1:219:pom:2.3.4-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:230:pom:4.1-SNAPSHOT 10:226:pom:4.1-SNAPSHOT 10:232:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10_22_4.0-SNAPSHOT_pom.ini000066400000000000000000000010241167050556700330420ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:24:pom:1.2.10-SNAPSHOT 1:4:pom:2.5.4-SNAPSHOT 1:3:pom:1.28-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:21:pom:3.2.1.2-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:29:pom:3.0.5-SNAPSHOT 1:30:pom:0.7.0-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:32:pom:720-SNAPSHOT 1:33:pom:711-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:43:pom:4.0-SNAPSHOT 10_22_4.1-SNAPSHOT_pom.ini000066400000000000000000000010541167050556700330460ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:24:pom:1.2.10-SNAPSHOT 1:4:pom:2.5.4-SNAPSHOT 1:3:pom:1.28-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:21:pom:3.2.1.2-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:29:pom:3.0.5-SNAPSHOT 1:30:pom:0.7.0-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:32:pom:720-SNAPSHOT 1:33:pom:711-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:43:pom:4.1-SNAPSHOT 10:160:pom:4.1-SNAPSHOT 10_230_4.0-SNAPSHOT_pom.ini000066400000000000000000000017041167050556700331300ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:46:pom:1.0.2-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:50:pom:3.5-SNAPSHOT 1:185:pom:1.0_sap.1-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:217:pom:1.0_sap.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:59:pom:1.0.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:227:pom:7.0-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:154:pom:3.3-SNAPSHOT 1:218:pom:2.2.1-SNAPSHOT 1:219:pom:2.3.4-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:216:pom:4.0-SNAPSHOT 10:220:pom:4.0-SNAPSHOT 10:226:pom:4.0-SNAPSHOT 10:231:pom:4.0-SNAPSHOT 10:232:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:233:pom:4.0-SNAPSHOT 10:43:pom:4.0-SNAPSHOT 10:161:pom:4.0-SNAPSHOT 10:337:pom:4.0-SNAPSHOT 10_230_4.1-SNAPSHOT_pom.ini000066400000000000000000000017041167050556700331310ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:46:pom:1.0.2-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:50:pom:3.5-SNAPSHOT 1:185:pom:1.0_sap.2-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:217:pom:1.0_sap.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:59:pom:1.0.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:227:pom:7.0-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:154:pom:3.3-SNAPSHOT 1:218:pom:2.2.1-SNAPSHOT 1:219:pom:2.3.4-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:216:pom:4.1-SNAPSHOT 10:220:pom:4.1-SNAPSHOT 10:226:pom:4.1-SNAPSHOT 10:231:pom:4.1-SNAPSHOT 10:232:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:233:pom:4.1-SNAPSHOT 10:43:pom:4.1-SNAPSHOT 10:161:pom:4.1-SNAPSHOT 10:337:pom:4.1-SNAPSHOT 10_231_4.0-SNAPSHOT_pom.ini000066400000000000000000000006031167050556700331260ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:226:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10_231_4.1-SNAPSHOT_pom.ini000066400000000000000000000006031167050556700331270ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:226:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10_232_4.0-SNAPSHOT_pom.ini000066400000000000000000000012121167050556700331240ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:217:pom:1.0_sap.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:205:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:226:pom:4.0-SNAPSHOT 10:231:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:233:pom:4.0-SNAPSHOT 10:238:pom:4.0-SNAPSHOT 10:242:pom:4.0-SNAPSHOT 10:263:pom:4.0-SNAPSHOT 10:228:pom:1.0-SNAPSHOT 10_232_4.1-SNAPSHOT_pom.ini000066400000000000000000000012121167050556700331250ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:217:pom:1.0_sap.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:205:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:226:pom:4.1-SNAPSHOT 10:231:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:233:pom:4.1-SNAPSHOT 10:238:pom:4.1-SNAPSHOT 10:242:pom:4.1-SNAPSHOT 10:263:pom:4.1-SNAPSHOT 10:228:pom:1.0-SNAPSHOT 10_233_4.0-SNAPSHOT_pom.ini000066400000000000000000000011611167050556700331300ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:153:pom:1.1.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:73:pom:2.4.1-SNAPSHOT 1:74:pom:3.5.0-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:78:pom:2.6-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:79:pom:0.7.2-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:234:pom:1.0-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:174:pom:4.0-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:235:pom:4.0-SNAPSHOT 10_233_4.1-SNAPSHOT_pom.ini000066400000000000000000000011611167050556700331310ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:153:pom:1.1.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:73:pom:2.4.1-SNAPSHOT 1:74:pom:3.5.0-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:78:pom:2.6-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:79:pom:0.7.2-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:234:pom:1.0-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:174:pom:4.1-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:235:pom:4.1-SNAPSHOT 10_235_4.0-SNAPSHOT_pom.ini000066400000000000000000000015071167050556700331360ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:153:pom:1.1.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:48:pom:1.3-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:52:pom:1.8-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:18:pom:5.1.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:155:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:141:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:150:pom:4.0-SNAPSHOT 10:236:pom:4.0-SNAPSHOT 10:156:pom:4.0-SNAPSHOT 10:146:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10:160:pom:4.0-SNAPSHOT 10:161:pom:4.0-SNAPSHOT 10_235_4.1-SNAPSHOT_pom.ini000066400000000000000000000014641167050556700331410ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:153:pom:1.1.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:48:pom:1.3-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:18:pom:5.1.1.41-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:155:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:141:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:150:pom:4.1-SNAPSHOT 10:236:pom:4.1-SNAPSHOT 10:156:pom:4.1-SNAPSHOT 10:146:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10:160:pom:4.1-SNAPSHOT 10:161:pom:4.1-SNAPSHOT 10_236_4.0-SNAPSHOT_pom.ini000066400000000000000000000007111167050556700331330ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:8:pom:2.7.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:141:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10:237:pom:4.0-SNAPSHOT 10:150:pom:4.0-SNAPSHOT 10:146:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10:43:pom:4.0-SNAPSHOT 10:162:pom:4.0-SNAPSHOT 10_236_4.1-SNAPSHOT_pom.ini000066400000000000000000000007111167050556700331340ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:8:pom:2.7.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:141:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:237:pom:4.1-SNAPSHOT 10:150:pom:4.1-SNAPSHOT 10:146:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10:43:pom:4.1-SNAPSHOT 10:162:pom:4.1-SNAPSHOT 10_237_4.0-SNAPSHOT_pom.ini000066400000000000000000000006331167050556700331370ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:8:pom:2.7.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:18:pom:5.1.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:141:pom:4.0-SNAPSHOT 10:146:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10:148:pom:4.0-SNAPSHOT 10:149:pom:4.0-SNAPSHOT 10_237_4.1-SNAPSHOT_pom.ini000066400000000000000000000006361167050556700331430ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:8:pom:2.7.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:18:pom:5.1.1.41-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:141:pom:4.1-SNAPSHOT 10:146:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10:148:pom:4.1-SNAPSHOT 10:149:pom:4.1-SNAPSHOT 10_238_4.0-SNAPSHOT_pom.ini000066400000000000000000000016211167050556700331360ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:48:pom:1.3-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:52:pom:1.8-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:239:pom:3.0-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:240:pom:720-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:154:pom:3.3-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:139:pom:3.0-SNAPSHOT 10:205:pom:4.0-SNAPSHOT 10:241:pom:4.0-SNAPSHOT 10:62:pom:4.0-SNAPSHOT 10:155:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:150:pom:4.0-SNAPSHOT 10:235:pom:4.0-SNAPSHOT 10:298:pom:4.0-SNAPSHOT 10:242:pom:4.0-SNAPSHOT 10:160:pom:4.0-SNAPSHOT 10:43:pom:4.0-SNAPSHOT 10:161:pom:4.0-SNAPSHOT 10:317:pom:4.0-SNAPSHOT 10_238_4.1-SNAPSHOT_pom.ini000066400000000000000000000016231167050556700331410ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:48:pom:1.3-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:239:pom:3.0-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:240:pom:720-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:154:pom:3.3-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 10:205:pom:4.1-SNAPSHOT 10:241:pom:4.1-SNAPSHOT 10:62:pom:4.1-SNAPSHOT 10:155:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:150:pom:4.1-SNAPSHOT 10:235:pom:4.1-SNAPSHOT 10:298:pom:4.1-SNAPSHOT 10:363:pom:4.1-SNAPSHOT 10:242:pom:4.1-SNAPSHOT 10:160:pom:4.1-SNAPSHOT 10:43:pom:4.1-SNAPSHOT 10:161:pom:4.1-SNAPSHOT 10:317:pom:4.1-SNAPSHOT 10_241_4.0-SNAPSHOT_pom.ini000066400000000000000000000006051167050556700331310ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:226:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:242:pom:4.0-SNAPSHOT 10_241_4.1-SNAPSHOT_pom.ini000066400000000000000000000006051167050556700331320ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:226:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:242:pom:4.1-SNAPSHOT 10_242_4.0-SNAPSHOT_pom.ini000066400000000000000000000013221167050556700331270ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:64:pom:1.3-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:55:pom:4.4-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:19:pom:6.3-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:154:pom:3.3-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:139:pom:3.0-SNAPSHOT 10:243:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:150:pom:4.0-SNAPSHOT 10:261:pom:4.0-SNAPSHOT 10:262:pom:4.0-SNAPSHOT 10_242_4.1-SNAPSHOT_pom.ini000066400000000000000000000012741167050556700331360ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:64:pom:1.3-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:55:pom:4.8.2-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:19:pom:6.3-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:154:pom:3.3-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:150:pom:4.1-SNAPSHOT 10:261:pom:4.1-SNAPSHOT 10:262:pom:4.1-SNAPSHOT 10_243_4.0-SNAPSHOT_pom.ini000066400000000000000000000012641167050556700331350ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:244:pom:1.2-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:55:pom:3.8.1-SNAPSHOT 1:55:pom:4.4-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:245:pom:1.0.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:246:pom:4.0-SNAPSHOT 10:247:pom:4.0-SNAPSHOT 10:180:pom:3.1-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:43:pom:4.0-SNAPSHOT 10:161:pom:4.0-SNAPSHOT 10_243_4.1-SNAPSHOT_pom.ini000066400000000000000000000014301167050556700331310ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:358:pom:1.1.2-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:260:pom:2.3.3-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:244:pom:1.2-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:55:pom:3.8.1-SNAPSHOT 1:55:pom:4.8.2-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:245:pom:1.0.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:246:pom:4.1-SNAPSHOT 10:247:pom:4.1-SNAPSHOT 10:363:pom:4.1-SNAPSHOT 10:180:pom:3.2-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:364:pom:4.1-SNAPSHOT 10:43:pom:4.1-SNAPSHOT 10:161:pom:4.1-SNAPSHOT 10_246_4.0-SNAPSHOT_pom.ini000066400000000000000000000005241167050556700331360ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:55:pom:4.4-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:149:pom:4.0-SNAPSHOT 10_246_4.1-SNAPSHOT_pom.ini000066400000000000000000000005261167050556700331410ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:55:pom:4.8.2-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:149:pom:4.1-SNAPSHOT 10_247_4.0-SNAPSHOT_pom.ini000066400000000000000000000023571167050556700331450ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:63:pom:1.1-SNAPSHOT 1:63:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:64:pom:1.3-SNAPSHOT 1:48:pom:1.3-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:65:pom:2.1.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:244:pom:1.2-SNAPSHOT 1:248:pom:5.5-SNAPSHOT 1:249:pom:9.2.2-SNAPSHOT 1:66:pom:0.11-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:53:pom:2.3.0.677-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:222:pom:beta8-SNAPSHOT 1:55:pom:4.4-SNAPSHOT 1:84:pom:2.2.0036-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:56:pom:1.2-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:69:pom:10.1.0-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:70:pom:9.0-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:200:pom:5.1-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:250:pom:1.0_sap.1-SNAPSHOT 1:75:pom:26-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:121:pom:3.0-SNAPSHOT 10:174:pom:4.0-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:62:pom:4.0-SNAPSHOT 10:246:pom:4.0-SNAPSHOT 10:167:pom:4.0-SNAPSHOT 10:243:pom:4.0-SNAPSHOT 10:251:pom:4.0-SNAPSHOT 10:180:pom:3.1-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:257:pom:4.0-SNAPSHOT 10:149:pom:4.0-SNAPSHOT 10:43:pom:4.0-SNAPSHOT 10:161:pom:4.0-SNAPSHOT 10_247_4.1-SNAPSHOT_pom.ini000066400000000000000000000024111167050556700331350ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:63:pom:1.1-SNAPSHOT 1:63:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:64:pom:1.3-SNAPSHOT 1:48:pom:1.3-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:65:pom:2.1.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:244:pom:1.2-SNAPSHOT 1:248:pom:5.5-SNAPSHOT 1:249:pom:9.2.2-SNAPSHOT 1:66:pom:0.11-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:53:pom:2.3.0.677-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:222:pom:beta8-SNAPSHOT 1:55:pom:4.8.2-SNAPSHOT 1:84:pom:2.2.0036-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:56:pom:1.2-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:69:pom:10.1.0-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:70:pom:9.0-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:200:pom:5.1-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:250:pom:1.0_sap.1-SNAPSHOT 1:75:pom:26-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:121:pom:3.1-SNAPSHOT 10:359:pom:4.1-SNAPSHOT 10:174:pom:4.1-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:62:pom:4.1-SNAPSHOT 10:246:pom:4.1-SNAPSHOT 10:167:pom:4.1-SNAPSHOT 10:243:pom:4.1-SNAPSHOT 10:251:pom:4.1-SNAPSHOT 10:180:pom:3.2-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:257:pom:4.1-SNAPSHOT 10:149:pom:4.1-SNAPSHOT 10:43:pom:4.1-SNAPSHOT 10:161:pom:4.1-SNAPSHOT 10_251_4.0-SNAPSHOT_pom.ini000066400000000000000000000010321167050556700331250ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:217:pom:1.0_sap.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:219:pom:2.3.4-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:62:pom:4.0-SNAPSHOT 10:246:pom:4.0-SNAPSHOT 10:243:pom:4.0-SNAPSHOT 10:252:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10_251_4.1-SNAPSHOT_pom.ini000066400000000000000000000011141167050556700331270ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:358:pom:1.1.2-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:260:pom:2.3.3-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:217:pom:1.0_sap.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:219:pom:2.3.4-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:62:pom:4.1-SNAPSHOT 10:246:pom:4.1-SNAPSHOT 10:243:pom:4.1-SNAPSHOT 10:252:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10_252_4.0-SNAPSHOT_pom.ini000066400000000000000000000012071167050556700331320ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:253:pom:1.3.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:59:pom:1.0.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:219:pom:2.3.4-SNAPSHOT 10:139:pom:3.0-SNAPSHOT 10:62:pom:4.0-SNAPSHOT 10:81:pom:4.0-SNAPSHOT 10:247:pom:4.0-SNAPSHOT 10:243:pom:4.0-SNAPSHOT 10:254:pom:4.0-SNAPSHOT 10:255:pom:4.0-SNAPSHOT 10:251:pom:4.0-SNAPSHOT 10:180:pom:3.1-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:160:pom:4.0-SNAPSHOT 10:43:pom:4.0-SNAPSHOT 10:161:pom:4.0-SNAPSHOT 10_252_4.1-SNAPSHOT_pom.ini000066400000000000000000000012371167050556700331360ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:253:pom:1.3.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:59:pom:1.0.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:219:pom:2.3.4-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 10:62:pom:4.1-SNAPSHOT 10:361:pom:4.1-SNAPSHOT 10:81:pom:4.1-SNAPSHOT 10:247:pom:4.1-SNAPSHOT 10:243:pom:4.1-SNAPSHOT 10:254:pom:4.1-SNAPSHOT 10:255:pom:4.1-SNAPSHOT 10:251:pom:4.1-SNAPSHOT 10:180:pom:3.2-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:160:pom:4.1-SNAPSHOT 10:43:pom:4.1-SNAPSHOT 10:161:pom:4.1-SNAPSHOT 10_254_4.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331320ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 10_254_4.1-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331330ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 10_255_4.0-SNAPSHOT_pom.ini000066400000000000000000000002271167050556700331360ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:181:pom:1.0-SNAPSHOT 1:256:pom:3.2-SNAPSHOT 1:182:pom:3.2-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10_255_4.1-SNAPSHOT_pom.ini000066400000000000000000000002271167050556700331370ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:181:pom:1.0-SNAPSHOT 1:256:pom:3.2-SNAPSHOT 1:182:pom:3.2-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10_257_4.0-SNAPSHOT_pom.ini000066400000000000000000000013171167050556700331410ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:76:pom:1.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:64:pom:1.3-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:65:pom:2.1.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:55:pom:4.4-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:19:pom:6.3-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:117:pom:4.0-SNAPSHOT 10:139:pom:3.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:258:pom:4.0-SNAPSHOT 1:259:pom:2.0-SNAPSHOT 1:260:pom:2.2.5-SNAPSHOT 10_257_4.1-SNAPSHOT_pom.ini000066400000000000000000000013211167050556700331350ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:76:pom:1.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:64:pom:1.3-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:65:pom:2.1.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:55:pom:4.8.2-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:19:pom:6.3-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:117:pom:4.1-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:258:pom:4.1-SNAPSHOT 1:259:pom:2.0-SNAPSHOT 1:260:pom:2.3.3-SNAPSHOT 10_258_4.0-SNAPSHOT_pom.ini000066400000000000000000000000761167050556700331430ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 10:212:pom:4.0-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10_258_4.1-SNAPSHOT_pom.ini000066400000000000000000000000761167050556700331440ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 10:212:pom:4.1-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10_261_4.0-SNAPSHOT_pom.ini000066400000000000000000000011051167050556700331270ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:15:pom:1.36.0-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:141:pom:4.0-SNAPSHOT 10:42:pom:4.0-SNAPSHOT 10:12:pom:4.0-SNAPSHOT 10_261_4.1-SNAPSHOT_pom.ini000066400000000000000000000011051167050556700331300ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:15:pom:1.36.0-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:141:pom:4.1-SNAPSHOT 10:42:pom:4.1-SNAPSHOT 10:12:pom:4.1-SNAPSHOT 10_262_4.0-SNAPSHOT_pom.ini000066400000000000000000000020131167050556700331270ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 10:42:pom:4.0-SNAPSHOT 10:263:pom:4.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:64:pom:1.3-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:15:pom:1.36.0-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:7:pom:5.8.9-SNAPSHOT 1:21:pom:3.2.1.2-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:19:pom:6.3-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10:261:pom:4.0-SNAPSHOT 10:12:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10:149:pom:4.0-SNAPSHOT 10:148:pom:4.0-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:264:pom:6.2-SNAPSHOT 1:166:pom:720-SNAPSHOT 10:265:pom:4.0-SNAPSHOT 1:267:pom:3.0-SNAPSHOT 10:268:pom:4.0-SNAPSHOT 1:104:pom:70-SNAPSHOT 1:270:pom:1.6.5-SNAPSHOT 10:225:pom:4.0-SNAPSHOT 10:271:pom:4.0-SNAPSHOT 10:297:pom:4.0-SNAPSHOT 10_262_4.1-SNAPSHOT_pom.ini000066400000000000000000000020431167050556700331330ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 10:42:pom:4.1-SNAPSHOT 10:263:pom:4.1-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:64:pom:1.3-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:15:pom:1.36.0-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:7:pom:5.8.9-SNAPSHOT 1:21:pom:3.2.1.2-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:19:pom:6.3-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:261:pom:4.1-SNAPSHOT 10:12:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10:149:pom:4.1-SNAPSHOT 10:148:pom:4.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:264:pom:6.2-SNAPSHOT 1:166:pom:720-SNAPSHOT 10:265:pom:4.1-SNAPSHOT 1:267:pom:3.0-SNAPSHOT 10:268:pom:4.1-SNAPSHOT 1:104:pom:70-SNAPSHOT 1:270:pom:1.6.5-SNAPSHOT 10:225:pom:4.1-SNAPSHOT 10:271:pom:4.1-SNAPSHOT 10:297:pom:4.1-SNAPSHOT 10:226:pom:4.1-SNAPSHOT 10_263_4.0-SNAPSHOT_pom.ini000066400000000000000000000006271167050556700331410ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:15:pom:1.36.0-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:41:pom:5.0-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:42:pom:4.0-SNAPSHOT 10:12:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10:149:pom:4.0-SNAPSHOT 10_263_4.1-SNAPSHOT_pom.ini000066400000000000000000000006271167050556700331420ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:15:pom:1.36.0-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:41:pom:5.0-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:42:pom:4.1-SNAPSHOT 10:12:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10:149:pom:4.1-SNAPSHOT 10_265_4.0-SNAPSHOT_pom.ini000066400000000000000000000010041167050556700331310ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:165:pom:7.0-SNAPSHOT 1:165:pom:7.1-SNAPSHOT 1:165:pom:9.3-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:103:pom:6403-SNAPSHOT 1:105:pom:70-SNAPSHOT 1:114:pom:2.50.16.busObj.1-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:81:pom:4.0-SNAPSHOT 10:167:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:141:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10:148:pom:4.0-SNAPSHOT 10:149:pom:4.0-SNAPSHOT 10:266:pom:4.0-SNAPSHOT 10_265_4.1-SNAPSHOT_pom.ini000066400000000000000000000010041167050556700331320ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:165:pom:7.0-SNAPSHOT 1:165:pom:7.1-SNAPSHOT 1:165:pom:9.3-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:103:pom:6403-SNAPSHOT 1:105:pom:70-SNAPSHOT 1:114:pom:2.50.16.busObj.1-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:81:pom:4.1-SNAPSHOT 10:167:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:141:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10:148:pom:4.1-SNAPSHOT 10:149:pom:4.1-SNAPSHOT 10:266:pom:4.1-SNAPSHOT 10_266_4.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331350ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 10_266_4.1-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331360ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 10_268_4.0-SNAPSHOT_pom.ini000066400000000000000000000006031167050556700331400ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:8:pom:2.7.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:269:pom:4.0-SNAPSHOT 10:141:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10:146:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10_268_4.1-SNAPSHOT_pom.ini000066400000000000000000000006031167050556700331410ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:8:pom:2.7.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:269:pom:4.1-SNAPSHOT 10:141:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:146:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10_269_4.0-SNAPSHOT_pom.ini000066400000000000000000000005561167050556700331500ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:8:pom:2.7.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:218:pom:2.2.1-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:141:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10:146:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10_269_4.1-SNAPSHOT_pom.ini000066400000000000000000000005561167050556700331510ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:8:pom:2.7.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:218:pom:2.2.1-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:141:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:146:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10_271_4.0-SNAPSHOT_pom.ini000066400000000000000000000026761167050556700331460ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 10:174:pom:4.0-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:30:pom:0.7.0-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:46:pom:1.0.2-SNAPSHOT 1:65:pom:2.1.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:117:pom:4.0-SNAPSHOT 10:139:pom:3.0-SNAPSHOT 10:62:pom:4.0-SNAPSHOT 10:167:pom:4.0-SNAPSHOT 10:243:pom:4.0-SNAPSHOT 10:203:pom:4.0-SNAPSHOT 10:272:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:226:pom:4.0-SNAPSHOT 10:232:pom:4.0-SNAPSHOT 10:285:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:235:pom:4.0-SNAPSHOT 10:238:pom:4.0-SNAPSHOT 10:286:pom:4.0-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:55:pom:4.4-SNAPSHOT 1:185:pom:1.0_sap.1-SNAPSHOT 1:197:pom:5.1.3-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10:149:pom:4.0-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 10:141:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 1:290:pom:8.0.2.0-SNAPSHOT 10:139:pom:3.0-SNAPSHOT 10:121:pom:3.0-SNAPSHOT 10:189:pom:4.0-SNAPSHOT 10:202:pom:4.0-SNAPSHOT 10:205:pom:4.0-SNAPSHOT 1:29:pom:3.0.5-SNAPSHOT 10:291:pom:4.0-SNAPSHOT 10:292:pom:4.0-SNAPSHOT 1:188:pom:1.9-SNAPSHOT 1:296:pom:1.0-SNAPSHOT 10_271_4.1-SNAPSHOT_pom.ini000066400000000000000000000030041167050556700331310ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 10:174:pom:4.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:30:pom:0.7.0-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:63:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:46:pom:1.0.2-SNAPSHOT 1:65:pom:2.1.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:117:pom:4.1-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 10:62:pom:4.1-SNAPSHOT 10:167:pom:4.1-SNAPSHOT 10:243:pom:4.1-SNAPSHOT 10:203:pom:4.1-SNAPSHOT 10:272:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:226:pom:4.1-SNAPSHOT 10:232:pom:4.1-SNAPSHOT 10:285:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:235:pom:4.1-SNAPSHOT 10:238:pom:4.1-SNAPSHOT 10:286:pom:4.1-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:55:pom:4.8.2-SNAPSHOT 1:185:pom:1.0_sap.2-SNAPSHOT 1:197:pom:5.1.3-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10:149:pom:4.1-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 10:141:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 1:290:pom:8.0.2.0-SNAPSHOT 10:121:pom:3.1-SNAPSHOT 10:359:pom:4.1-SNAPSHOT 10:189:pom:4.1-SNAPSHOT 10:202:pom:4.1-SNAPSHOT 10:205:pom:4.1-SNAPSHOT 1:29:pom:3.0.5-SNAPSHOT 10:291:pom:4.1-SNAPSHOT 10:292:pom:4.1-SNAPSHOT 1:188:pom:1.9-SNAPSHOT 1:296:pom:1.0-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 10:242:pom:4.1-SNAPSHOT 10_272_4.0-SNAPSHOT_pom.ini000066400000000000000000000017161167050556700331410ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:153:pom:1.1.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:273:pom:1.0.3-SNAPSHOT 1:46:pom:1.0.2-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:65:pom:2.1.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:204:pom:1.6.1-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:185:pom:1.0_sap.1-SNAPSHOT 1:274:pom:1.0.0-SNAPSHOT 1:55:pom:3.8.1-SNAPSHOT 1:55:pom:4.4-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.2.12-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:117:pom:4.0-SNAPSHOT 10:139:pom:3.0-SNAPSHOT 10:205:pom:4.0-SNAPSHOT 10:62:pom:4.0-SNAPSHOT 10:243:pom:4.0-SNAPSHOT 10:275:pom:4.0-SNAPSHOT 10:203:pom:4.0-SNAPSHOT 10:276:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:216:pom:4.0-SNAPSHOT 10:226:pom:4.0-SNAPSHOT 10:232:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10_272_4.1-SNAPSHOT_pom.ini000066400000000000000000000017201167050556700331350ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:153:pom:1.1.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:273:pom:1.0.3-SNAPSHOT 1:46:pom:1.0.2-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:65:pom:2.1.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:204:pom:1.6.1-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:185:pom:1.0_sap.2-SNAPSHOT 1:274:pom:1.0.0-SNAPSHOT 1:55:pom:3.8.1-SNAPSHOT 1:55:pom:4.8.2-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.2.12-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:117:pom:4.1-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 10:205:pom:4.1-SNAPSHOT 10:62:pom:4.1-SNAPSHOT 10:243:pom:4.1-SNAPSHOT 10:275:pom:4.1-SNAPSHOT 10:203:pom:4.1-SNAPSHOT 10:276:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:216:pom:4.1-SNAPSHOT 10:226:pom:4.1-SNAPSHOT 10:232:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10_275_4.0-SNAPSHOT_pom.ini000066400000000000000000000006221167050556700331370ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:204:pom:1.6.1-SNAPSHOT 1:59:pom:1.0.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.2.12-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:276:pom:4.0-SNAPSHOT 10:216:pom:4.0-SNAPSHOT 10:220:pom:4.0-SNAPSHOT 10:226:pom:4.0-SNAPSHOT 10:43:pom:4.0-SNAPSHOT 10:161:pom:4.0-SNAPSHOT 10:284:pom:2.0-SNAPSHOT 10_275_4.1-SNAPSHOT_pom.ini000066400000000000000000000007021167050556700331370ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:204:pom:1.6.1-SNAPSHOT 1:59:pom:1.0.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.2.12-SNAPSHOT 1:55:pom:3.8.1-SNAPSHOT 1:55:pom:4.8.2-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:276:pom:4.1-SNAPSHOT 10:216:pom:4.1-SNAPSHOT 10:220:pom:4.1-SNAPSHOT 10:226:pom:4.1-SNAPSHOT 10:43:pom:4.1-SNAPSHOT 10:161:pom:4.1-SNAPSHOT 10:284:pom:2.1-SNAPSHOT 10_276_4.0-SNAPSHOT_pom.ini000066400000000000000000000013241167050556700331400ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:153:pom:1.1.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:74:pom:3.5.0-SNAPSHOT 1:65:pom:2.1.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:77:pom:1.45-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:29:pom:3.0.5-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:175:pom:2.0-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:175:pom:2.0-SNAPSHOT 10:180:pom:3.1-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:277:pom:4.0-SNAPSHOT 10:280:pom:4.0-SNAPSHOT 10:281:pom:4.0-SNAPSHOT 10:177:pom:4.0-SNAPSHOT 10_276_4.1-SNAPSHOT_pom.ini000066400000000000000000000011641167050556700331430ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:153:pom:1.1.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:74:pom:3.5.0-SNAPSHOT 1:65:pom:2.1.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:77:pom:1.45-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:29:pom:3.0.5-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:175:pom:2.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:180:pom:3.2-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:177:pom:4.1-SNAPSHOT 10_277_4.0-SNAPSHOT_pom.ini000066400000000000000000000006101167050556700331360ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:65:pom:2.1.0-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:55:pom:4.4-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:278:pom:1.8.0-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:279:pom:4.0-SNAPSHOT 10:280:pom:4.0-SNAPSHOT 10:281:pom:4.0-SNAPSHOT 1:29:pom:3.0.5-SNAPSHOT 10_279_4.0-SNAPSHOT_pom.ini000066400000000000000000000001521167050556700331410ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:65:pom:2.1.0-SNAPSHOT 1:55:pom:4.4-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10_280_4.0-SNAPSHOT_pom.ini000066400000000000000000000007441167050556700331400ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 10:279:pom:4.0-SNAPSHOT 10:281:pom:4.0-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:65:pom:2.1.0-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:55:pom:4.4-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:278:pom:1.8.0-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:282:pom:2.0-SNAPSHOT 1:283:pom:1.0-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:279:pom:4.0-SNAPSHOT 10:277:pom:4.0-SNAPSHOT 10:281:pom:4.0-SNAPSHOT 10_281_4.0-SNAPSHOT_pom.ini000066400000000000000000000004311167050556700331320ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 10:279:pom:4.0-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:65:pom:2.1.0-SNAPSHOT 1:55:pom:4.4-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:279:pom:4.0-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 10_284_2.0-SNAPSHOT_pom.ini000066400000000000000000000006351167050556700331410ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 10:11:pom:4.0-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:12:pom:4.0-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:5:pom:1.6-SNAPSHOT 1:204:pom:1.6.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:140:pom:6.0.18-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:61:pom:1.2.12-SNAPSHOT 1:59:pom:1.0.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10_284_2.1-SNAPSHOT_pom.ini000066400000000000000000000003331167050556700331350ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 10:11:pom:4.1-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:30:pom:0.7.0-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 10:42:pom:4.1-SNAPSHOT 10_285_4.0-SNAPSHOT_pom.ini000066400000000000000000000007351167050556700331450ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:48:pom:1.3-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:52:pom:1.8-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:139:pom:3.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:160:pom:4.0-SNAPSHOT 10:161:pom:4.0-SNAPSHOT 10_285_4.1-SNAPSHOT_pom.ini000066400000000000000000000007071167050556700331450ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:48:pom:1.3-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:160:pom:4.1-SNAPSHOT 10:161:pom:4.1-SNAPSHOT 10_286_4.0-SNAPSHOT_pom.ini000066400000000000000000000020501167050556700331360ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:76:pom:1.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:64:pom:1.3-SNAPSHOT 1:46:pom:1.0.2-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:287:pom:1.1.2.1-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:222:pom:beta8-SNAPSHOT 1:217:pom:1.0_sap.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:19:pom:6.3-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:154:pom:3.3-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:174:pom:4.0-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:172:pom:4.0-SNAPSHOT 10:117:pom:4.0-SNAPSHOT 10:139:pom:3.0-SNAPSHOT 10:205:pom:4.0-SNAPSHOT 10:62:pom:4.0-SNAPSHOT 10:180:pom:3.1-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:156:pom:4.0-SNAPSHOT 10:242:pom:4.0-SNAPSHOT 10:288:pom:4.0-SNAPSHOT 10:257:pom:4.0-SNAPSHOT 1:158:pom:3.5-SNAPSHOT 1:289:pom:2.2.0-SNAPSHOT 10_286_4.1-SNAPSHOT_pom.ini000066400000000000000000000020501167050556700331370ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:76:pom:1.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:64:pom:1.3-SNAPSHOT 1:46:pom:1.0.2-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:287:pom:1.1.2.1-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:222:pom:beta8-SNAPSHOT 1:217:pom:1.0_sap.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:19:pom:6.3-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:154:pom:3.3-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:174:pom:4.1-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:172:pom:4.1-SNAPSHOT 10:117:pom:4.1-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 10:205:pom:4.1-SNAPSHOT 10:62:pom:4.1-SNAPSHOT 10:180:pom:3.2-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:156:pom:4.1-SNAPSHOT 10:242:pom:4.1-SNAPSHOT 10:288:pom:4.1-SNAPSHOT 10:257:pom:4.1-SNAPSHOT 1:158:pom:3.5-SNAPSHOT 1:289:pom:2.2.0-SNAPSHOT 10_288_4.0-SNAPSHOT_pom.ini000066400000000000000000000011021167050556700331350ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:154:pom:3.3-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:117:pom:4.0-SNAPSHOT 10:139:pom:3.0-SNAPSHOT 10:205:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:242:pom:4.0-SNAPSHOT 10_288_4.1-SNAPSHOT_pom.ini000066400000000000000000000011021167050556700331360ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:154:pom:3.3-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:117:pom:4.1-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 10:205:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:242:pom:4.1-SNAPSHOT 10_291_4.0-SNAPSHOT_pom.ini000066400000000000000000000031261167050556700331370ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:181:pom:1.0-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:153:pom:1.1.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:46:pom:1.0.2-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:83:pom:1.10.0-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:65:pom:2.1.0-SNAPSHOT 1:8:pom:2.1.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:15:pom:1.36.0-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:185:pom:1.0_sap.1-SNAPSHOT 1:4:pom:2.5.4-SNAPSHOT 1:3:pom:1.28-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:55:pom:4.4-SNAPSHOT 1:36:pom:2.0-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:69:pom:8.1.7-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 1:115:pom:4.2.1-SNAPSHOT 1:30:pom:0.7.0-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:32:pom:720-SNAPSHOT 1:33:pom:711-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:5:pom:1.6-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 1:21:pom:3.2.1.2-SNAPSHOT 1:41:pom:5.0-SNAPSHOT 1:197:pom:5.1.3-SNAPSHOT 10:121:pom:3.0-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:172:pom:4.0-SNAPSHOT 10:117:pom:4.0-SNAPSHOT 10:139:pom:3.0-SNAPSHOT 10:205:pom:4.0-SNAPSHOT 10:62:pom:4.0-SNAPSHOT 10:81:pom:4.0-SNAPSHOT 10:243:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:226:pom:4.0-SNAPSHOT 10:232:pom:4.0-SNAPSHOT 10:141:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:261:pom:4.0-SNAPSHOT 10:42:pom:4.0-SNAPSHOT 10:12:pom:4.0-SNAPSHOT 10:146:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10:148:pom:4.0-SNAPSHOT 10:233:pom:4.0-SNAPSHOT 10_291_4.1-SNAPSHOT_pom.ini000066400000000000000000000033211167050556700331350ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 10:242:pom:4.1-SNAPSHOT 1:181:pom:1.0-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:63:pom:1.3-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:153:pom:1.1.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:46:pom:1.0.2-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:83:pom:1.10.0-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:65:pom:2.1.0-SNAPSHOT 1:8:pom:2.1.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:15:pom:1.36.0-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:365:pom:3.4.1-SNAPSHOT 1:185:pom:1.0_sap.2-SNAPSHOT 1:4:pom:2.5.4-SNAPSHOT 1:3:pom:1.28-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:55:pom:4.8.2-SNAPSHOT 1:36:pom:2.0-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:69:pom:8.1.7-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 1:115:pom:4.2.1-SNAPSHOT 1:30:pom:0.7.0-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:32:pom:720-SNAPSHOT 1:33:pom:711-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:5:pom:1.6-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 1:21:pom:3.2.1.2-SNAPSHOT 1:41:pom:5.0-SNAPSHOT 1:197:pom:5.1.3-SNAPSHOT 10:121:pom:3.1-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:172:pom:4.1-SNAPSHOT 10:117:pom:4.1-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 10:205:pom:4.1-SNAPSHOT 10:62:pom:4.1-SNAPSHOT 10:81:pom:4.1-SNAPSHOT 10:243:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:226:pom:4.1-SNAPSHOT 10:232:pom:4.1-SNAPSHOT 10:141:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:261:pom:4.1-SNAPSHOT 10:42:pom:4.1-SNAPSHOT 10:12:pom:4.1-SNAPSHOT 10:146:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10:148:pom:4.1-SNAPSHOT 10:233:pom:4.1-SNAPSHOT 1:365:pom:3.4.1-SNAPSHOT 10:366:pom:4.1-SNAPSHOT 1:260:pom:2.3.3-SNAPSHOT 10_292_4.0-SNAPSHOT_pom.ini000066400000000000000000000021261167050556700331370ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:182:pom:3.2-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:46:pom:1.0.2-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:65:pom:2.1.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:222:pom:beta8-SNAPSHOT 1:197:pom:5.1.3-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 1:293:pom:0.2.5-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:62:pom:4.0-SNAPSHOT 10:243:pom:4.0-SNAPSHOT 10:294:pom:4.0-SNAPSHOT 10:295:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:220:pom:4.0-SNAPSHOT 10:226:pom:4.0-SNAPSHOT 10:231:pom:4.0-SNAPSHOT 10:232:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:156:pom:4.0-SNAPSHOT 10:235:pom:4.0-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:185:pom:1.0_sap.1-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10:149:pom:4.0-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 10:141:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 10_292_4.1-SNAPSHOT_pom.ini000066400000000000000000000021541167050556700331410ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:182:pom:3.2-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:46:pom:1.0.2-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:65:pom:2.1.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:222:pom:beta8-SNAPSHOT 1:197:pom:5.1.3-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:71:pom:1.1.4.C-SNAPSHOT 1:293:pom:0.2.5-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:62:pom:4.1-SNAPSHOT 10:243:pom:4.1-SNAPSHOT 10:294:pom:4.1-SNAPSHOT 10:295:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:220:pom:4.1-SNAPSHOT 10:226:pom:4.1-SNAPSHOT 10:231:pom:4.1-SNAPSHOT 10:232:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:156:pom:4.1-SNAPSHOT 10:235:pom:4.1-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:185:pom:1.0_sap.2-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10:149:pom:4.1-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 10:141:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 1:32:pom:720-SNAPSHOT 10_294_4.0-SNAPSHOT_pom.ini000066400000000000000000000011361167050556700331410ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:62:pom:4.0-SNAPSHOT 10:243:pom:4.0-SNAPSHOT 10:295:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:235:pom:4.0-SNAPSHOT 10:205:pom:4.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10:149:pom:4.0-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 10:141:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 10_294_4.1-SNAPSHOT_pom.ini000066400000000000000000000011731167050556700331430ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:62:pom:4.1-SNAPSHOT 10:243:pom:4.1-SNAPSHOT 10:295:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:235:pom:4.1-SNAPSHOT 10:205:pom:4.1-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10:149:pom:4.1-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 10:141:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 1:217:pom:1.0_sap.1-SNAPSHOT 10_295_4.0-SNAPSHOT_pom.ini000066400000000000000000000004531167050556700331430ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:65:pom:2.1.0-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10_295_4.1-SNAPSHOT_pom.ini000066400000000000000000000004531167050556700331440ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:65:pom:2.1.0-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10_297_4.0-SNAPSHOT_pom.ini000066400000000000000000000014051167050556700331430ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10:149:pom:4.0-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 10:141:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 10:220:pom:4.0-SNAPSHOT 10:242:pom:4.0-SNAPSHOT 10:298:pom:4.0-SNAPSHOT 10:205:pom:4.0-SNAPSHOT 1:299:pom:7.20-SNAPSHOT 1:300:pom:7.1.8-SNAPSHOT 10:301:pom:4.0-SNAPSHOT 10:205:pom:4.0-SNAPSHOT 10:306:pom:4.0-SNAPSHOT 10:307:pom:4.0-SNAPSHOT 10:203:pom:4.0-SNAPSHOT 10:316:pom:4.0-SNAPSHOT 10_297_4.1-SNAPSHOT_pom.ini000066400000000000000000000013541167050556700331470ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10:149:pom:4.1-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 10:141:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 10:220:pom:4.1-SNAPSHOT 10:242:pom:4.1-SNAPSHOT 10:298:pom:4.1-SNAPSHOT 10:205:pom:4.1-SNAPSHOT 1:299:pom:7.20-SNAPSHOT 10:301:pom:4.1-SNAPSHOT 10:205:pom:4.1-SNAPSHOT 10:306:pom:4.1-SNAPSHOT 10:307:pom:4.1-SNAPSHOT 10:203:pom:4.1-SNAPSHOT 10:316:pom:4.1-SNAPSHOT 10_298_4.0-SNAPSHOT_pom.ini000066400000000000000000000014011167050556700331400ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:64:pom:1.3-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:55:pom:4.4-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:19:pom:6.3-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:154:pom:3.3-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:117:pom:4.0-SNAPSHOT 10:139:pom:3.0-SNAPSHOT 10:205:pom:4.0-SNAPSHOT 10:62:pom:4.0-SNAPSHOT 10:243:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:242:pom:4.0-SNAPSHOT 10:288:pom:4.0-SNAPSHOT 10_298_4.1-SNAPSHOT_pom.ini000066400000000000000000000014031167050556700331430ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:64:pom:1.3-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:55:pom:4.8.2-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:19:pom:6.3-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:154:pom:3.3-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:117:pom:4.1-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 10:205:pom:4.1-SNAPSHOT 10:62:pom:4.1-SNAPSHOT 10:243:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:242:pom:4.1-SNAPSHOT 10:288:pom:4.1-SNAPSHOT 10_301_4.0-SNAPSHOT_pom.ini000066400000000000000000000021121167050556700331210ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:302:pom:1.015-SNAPSHOT 1:73:pom:2.3.1-SNAPSHOT 1:74:pom:3.5.0-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 10:180:pom:3.1-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:139:pom:3.0-SNAPSHOT 10:117:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:156:pom:4.0-SNAPSHOT 10:226:pom:4.0-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:153:pom:1.1.1-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:46:pom:1.0.2-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 1:61:pom:1.2.12-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:154:pom:3.3-SNAPSHOT 1:181:pom:1.0-SNAPSHOT 1:182:pom:3.2-SNAPSHOT 1:50:pom:3.4.1-SNAPSHOT 1:158:pom:3.5-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:5:pom:1.6-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:51:pom:1.6.2-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 10:303:pom:4.0-SNAPSHOT 10:174:pom:4.0-SNAPSHOT 10:121:pom:3.0-SNAPSHOT 10:189:pom:4.0-SNAPSHOT 10:202:pom:4.0-SNAPSHOT 10:205:pom:4.0-SNAPSHOT 10:305:pom:4.0-SNAPSHOT 1:75:pom:26-SNAPSHOT 1:29:pom:3.0.5-SNAPSHOT 1:40:pom:6.1-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:30:pom:0.7.0-SNAPSHOT 10_301_4.1-SNAPSHOT_pom.ini000066400000000000000000000021721167050556700331300ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:302:pom:1.015-SNAPSHOT 1:73:pom:2.3.1-SNAPSHOT 1:73:pom:2.4.1-SNAPSHOT 1:74:pom:3.5.0-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 10:180:pom:3.2-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 10:117:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:156:pom:4.1-SNAPSHOT 10:226:pom:4.1-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:153:pom:1.1.1-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:46:pom:1.0.2-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 1:61:pom:1.2.12-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:154:pom:3.3-SNAPSHOT 1:181:pom:1.0-SNAPSHOT 1:182:pom:3.2-SNAPSHOT 1:50:pom:3.4.1-SNAPSHOT 1:158:pom:3.5-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:5:pom:1.6-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:51:pom:1.6.2-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 10:303:pom:4.1-SNAPSHOT 10:174:pom:4.1-SNAPSHOT 10:121:pom:3.1-SNAPSHOT 10:359:pom:4.1-SNAPSHOT 10:189:pom:4.1-SNAPSHOT 10:202:pom:4.1-SNAPSHOT 10:205:pom:4.1-SNAPSHOT 10:305:pom:4.1-SNAPSHOT 1:75:pom:26-SNAPSHOT 1:29:pom:3.0.5-SNAPSHOT 1:40:pom:6.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:30:pom:0.7.0-SNAPSHOT 10_303_4.0-SNAPSHOT_pom.ini000066400000000000000000000001231167050556700331230ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:304:pom:9.1-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10_303_4.1-SNAPSHOT_pom.ini000066400000000000000000000001231167050556700331240ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:304:pom:9.1-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10_305_4.0-SNAPSHOT_pom.ini000066400000000000000000000017171167050556700331370ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.4-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:8:pom:2.1.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:55:pom:4.4-SNAPSHOT 1:78:pom:2.6-SNAPSHOT 1:36:pom:2.0-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 1:115:pom:4.2.1-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:5:pom:1.6-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 1:287:pom:1.3-SNAPSHOT 1:222:pom:1.1.1-SNAPSHOT 10:121:pom:3.0-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:172:pom:4.0-SNAPSHOT 10:117:pom:4.0-SNAPSHOT 10:139:pom:3.0-SNAPSHOT 10:180:pom:3.1-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:141:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:257:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10_305_4.1-SNAPSHOT_pom.ini000066400000000000000000000017511167050556700331360ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.4-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:8:pom:2.1.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:55:pom:4.8.2-SNAPSHOT 1:78:pom:2.6-SNAPSHOT 1:36:pom:2.0-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 1:115:pom:4.2.1-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:5:pom:1.6-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 1:287:pom:1.3-SNAPSHOT 1:222:pom:1.1.1-SNAPSHOT 10:121:pom:3.1-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:172:pom:4.1-SNAPSHOT 10:117:pom:4.1-SNAPSHOT 10:357:pom:4.1-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 10:180:pom:3.2-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:141:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:257:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10_306_4.0-SNAPSHOT_pom.ini000066400000000000000000000015121167050556700331310ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:46:pom:1.0.2-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:50:pom:3.5-SNAPSHOT 1:185:pom:1.0_sap.1-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:154:pom:3.3-SNAPSHOT 1:219:pom:2.3.4-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:139:pom:3.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:230:pom:4.0-SNAPSHOT 10:226:pom:4.0-SNAPSHOT 10:231:pom:4.0-SNAPSHOT 10:232:pom:4.0-SNAPSHOT 10:285:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:238:pom:4.0-SNAPSHOT 10:242:pom:4.0-SNAPSHOT 10:149:pom:4.0-SNAPSHOT 10_306_4.1-SNAPSHOT_pom.ini000066400000000000000000000015121167050556700331320ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:46:pom:1.0.2-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:50:pom:3.5-SNAPSHOT 1:185:pom:1.0_sap.2-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:154:pom:3.3-SNAPSHOT 1:219:pom:2.3.4-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:230:pom:4.1-SNAPSHOT 10:226:pom:4.1-SNAPSHOT 10:231:pom:4.1-SNAPSHOT 10:232:pom:4.1-SNAPSHOT 10:285:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:238:pom:4.1-SNAPSHOT 10:242:pom:4.1-SNAPSHOT 10:149:pom:4.1-SNAPSHOT 10_307_4.0-SNAPSHOT_pom.ini000066400000000000000000000027151167050556700331400ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:308:pom:1.8-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:309:pom:1.15.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:310:pom:4.2.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:188:pom:1.9-SNAPSHOT 1:311:pom:2.3.0-SNAPSHOT 1:312:pom:4.0-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:5:pom:1.6-SNAPSHOT 1:313:pom:2.2-SNAPSHOT 1:314:pom:6.0-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:117:pom:4.0-SNAPSHOT 10:205:pom:4.0-SNAPSHOT 10:62:pom:4.0-SNAPSHOT 10:243:pom:4.0-SNAPSHOT 10:251:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10:149:pom:4.0-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 10:141:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 10:233:pom:4.0-SNAPSHOT 10:172:pom:4.0-SNAPSHOT 1:289:pom:2.2.0-SNAPSHOT 10:139:pom:3.0-SNAPSHOT 10:180:pom:3.1-SNAPSHOT 10:315:pom:4.0-SNAPSHOT 1:217:pom:1.0_sap.1-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 10:257:pom:4.0-SNAPSHOT 10:174:pom:4.0-SNAPSHOT 1:76:pom:1.0-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:64:pom:1.3-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 10:305:pom:4.0-SNAPSHOT 1:30:pom:0.7.0-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 10_307_4.1-SNAPSHOT_pom.ini000066400000000000000000000027451167050556700331440ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:308:pom:1.8-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:309:pom:1.15.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:310:pom:4.2.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:188:pom:1.9-SNAPSHOT 1:311:pom:2.3.0-SNAPSHOT 1:312:pom:4.0-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:5:pom:1.6-SNAPSHOT 1:313:pom:2.2-SNAPSHOT 1:314:pom:6.0-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:117:pom:4.1-SNAPSHOT 10:205:pom:4.1-SNAPSHOT 10:62:pom:4.1-SNAPSHOT 10:243:pom:4.1-SNAPSHOT 10:251:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10:149:pom:4.1-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 10:141:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 10:233:pom:4.1-SNAPSHOT 10:172:pom:4.1-SNAPSHOT 1:289:pom:2.2.0-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 10:180:pom:3.2-SNAPSHOT 10:315:pom:4.1-SNAPSHOT 1:217:pom:1.0_sap.1-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 10:257:pom:4.1-SNAPSHOT 10:174:pom:4.1-SNAPSHOT 1:76:pom:1.0-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:64:pom:1.3-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 10:305:pom:4.1-SNAPSHOT 1:30:pom:0.7.0-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:29:pom:3.0.5-SNAPSHOT 10_315_4.0-SNAPSHOT_pom.ini000066400000000000000000000014671167050556700331420ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:24:pom:1.2.10-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:211:pom:1.0-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:121:pom:3.0-SNAPSHOT 10:202:pom:4.0-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:141:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10:212:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:235:pom:4.0-SNAPSHOT 10:146:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10:174:pom:4.0-SNAPSHOT 10:203:pom:4.0-SNAPSHOT 10_315_4.1-SNAPSHOT_pom.ini000066400000000000000000000015761167050556700331440ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:24:pom:1.2.10-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:211:pom:1.0-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:121:pom:3.1-SNAPSHOT 10:359:pom:4.1-SNAPSHOT 10:189:pom:4.1-SNAPSHOT 10:202:pom:4.1-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:141:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:212:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:235:pom:4.1-SNAPSHOT 10:146:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10:174:pom:4.1-SNAPSHOT 10:203:pom:4.1-SNAPSHOT 1:367:pom:8.0-SNAPSHOT 10_316_4.0-SNAPSHOT_pom.ini000066400000000000000000000005771167050556700331440ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:232:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10_316_4.1-SNAPSHOT_pom.ini000066400000000000000000000005771167050556700331450ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:232:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10_317_4.0-SNAPSHOT_pom.ini000066400000000000000000000007211167050556700331340ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:318:pom:4.0-SNAPSHOT 10:321:pom:4.0-SNAPSHOT 10:319:pom:4.0-SNAPSHOT 1:55:pom:4.4-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 10:117:pom:4.0-SNAPSHOT 1:51:pom:1.6.2-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:118:pom:10.5.3.0-SNAPSHOT 10_317_4.1-SNAPSHOT_pom.ini000066400000000000000000000007231167050556700331370ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:318:pom:4.1-SNAPSHOT 10:321:pom:4.1-SNAPSHOT 10:319:pom:4.1-SNAPSHOT 1:55:pom:4.8.2-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 10:117:pom:4.1-SNAPSHOT 1:51:pom:1.6.2-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:118:pom:10.5.3.0-SNAPSHOT 10_318_4.0-SNAPSHOT_pom.ini000066400000000000000000000007441167050556700331420ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 10:173:pom:4.0-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:139:pom:3.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:319:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:184:pom:20080807-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:149:pom:4.0-SNAPSHOT 10_318_4.1-SNAPSHOT_pom.ini000066400000000000000000000007721167050556700331440ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 10:173:pom:4.1-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:319:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:184:pom:20080807-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:149:pom:4.1-SNAPSHOT 10_319_4.0-SNAPSHOT_pom.ini000066400000000000000000000006671167050556700331470ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 10:173:pom:4.0-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:121:pom:3.0-SNAPSHOT 10:174:pom:4.0-SNAPSHOT 10:139:pom:3.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:318:pom:4.0-SNAPSHOT 10:320:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:184:pom:20080807-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10_319_4.1-SNAPSHOT_pom.ini000066400000000000000000000006671167050556700331500ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 10:173:pom:4.1-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:121:pom:3.1-SNAPSHOT 10:174:pom:4.1-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:318:pom:4.1-SNAPSHOT 10:320:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:184:pom:20080807-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10_320_4.0-SNAPSHOT_pom.ini000066400000000000000000000006411167050556700331270ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:184:pom:20080807-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:173:pom:4.0-SNAPSHOT 10:139:pom:3.0-SNAPSHOT 10:205:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:318:pom:4.0-SNAPSHOT 10:319:pom:4.0-SNAPSHOT 1:201:pom:3.5.2-SNAPSHOT 1:30:pom:0.7.0-SNAPSHOT 10_320_4.1-SNAPSHOT_pom.ini000066400000000000000000000006411167050556700331300ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:184:pom:20080807-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:173:pom:4.1-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 10:205:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:318:pom:4.1-SNAPSHOT 10:319:pom:4.1-SNAPSHOT 1:201:pom:3.5.2-SNAPSHOT 1:30:pom:0.7.0-SNAPSHOT 10_321_4.0-SNAPSHOT_pom.ini000066400000000000000000000002401167050556700331230ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:15:pom:1.36.0-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:322:pom:4.0-SNAPSHOT 10_321_4.1-SNAPSHOT_pom.ini000066400000000000000000000002401167050556700331240ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:15:pom:1.36.0-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:322:pom:4.1-SNAPSHOT 10_322_4.0-SNAPSHOT_pom.ini000066400000000000000000000013221167050556700331260ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:82:pom:9.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:85:pom:6.4-SNAPSHOT 1:85:pom:9.1-SNAPSHOT 1:15:pom:1.36.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:26:pom:3.8.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:94:pom:4.0-SNAPSHOT 1:323:pom:11.0-SNAPSHOT 1:324:pom:5.1-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:21:pom:3.2.1.2-SNAPSHOT 1:108:pom:4.0-SNAPSHOT 1:32:pom:720-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:81:pom:4.0-SNAPSHOT 10:225:pom:4.0-SNAPSHOT 10:325:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:141:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10:148:pom:4.0-SNAPSHOT 10:149:pom:4.0-SNAPSHOT 10:335:pom:4.0-SNAPSHOT 10:336:pom:4.0-SNAPSHOT 10_322_4.1-SNAPSHOT_pom.ini000066400000000000000000000013221167050556700331270ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:82:pom:9.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:85:pom:6.4-SNAPSHOT 1:85:pom:9.1-SNAPSHOT 1:15:pom:1.36.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:26:pom:3.8.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:94:pom:4.0-SNAPSHOT 1:323:pom:11.0-SNAPSHOT 1:324:pom:5.1-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:21:pom:3.2.1.2-SNAPSHOT 1:108:pom:4.0-SNAPSHOT 1:32:pom:720-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:81:pom:4.1-SNAPSHOT 10:225:pom:4.1-SNAPSHOT 10:325:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:141:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10:148:pom:4.1-SNAPSHOT 10:149:pom:4.1-SNAPSHOT 10:335:pom:4.1-SNAPSHOT 10:336:pom:4.1-SNAPSHOT 10_325_4.0-SNAPSHOT_pom.ini000066400000000000000000000014061167050556700331340ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:326:pom:0.9.7-SNAPSHOT 1:24:pom:1.2.10-SNAPSHOT 1:8:pom:2.1.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:94:pom:4.0-SNAPSHOT 1:323:pom:11.0-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:239:pom:3.0-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:240:pom:720-SNAPSHOT 1:116:pom:4.0-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:81:pom:4.0-SNAPSHOT 10:207:pom:4.0-SNAPSHOT 10:327:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:329:pom:4.0-SNAPSHOT 10:141:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10:212:pom:4.0-SNAPSHOT 10:238:pom:4.0-SNAPSHOT 10:331:pom:4.0-SNAPSHOT 10:146:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10:332:pom:4.0-SNAPSHOT 10:330:pom:4.0-SNAPSHOT 10:333:pom:4.0-SNAPSHOT 10:334:pom:4.0-SNAPSHOT 10_325_4.1-SNAPSHOT_pom.ini000066400000000000000000000014061167050556700331350ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:326:pom:0.9.7-SNAPSHOT 1:24:pom:1.2.10-SNAPSHOT 1:8:pom:2.1.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:94:pom:4.0-SNAPSHOT 1:323:pom:11.0-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:239:pom:3.0-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:240:pom:720-SNAPSHOT 1:116:pom:4.0-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:81:pom:4.1-SNAPSHOT 10:207:pom:4.1-SNAPSHOT 10:327:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:329:pom:4.1-SNAPSHOT 10:141:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:212:pom:4.1-SNAPSHOT 10:238:pom:4.1-SNAPSHOT 10:331:pom:4.1-SNAPSHOT 10:146:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10:332:pom:4.1-SNAPSHOT 10:330:pom:4.1-SNAPSHOT 10:333:pom:4.1-SNAPSHOT 10:334:pom:4.1-SNAPSHOT 10_327_4.0-SNAPSHOT_pom.ini000066400000000000000000000007601167050556700331400ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:239:pom:3.0-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:154:pom:3.3-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:117:pom:4.0-SNAPSHOT 10:139:pom:3.0-SNAPSHOT 10:328:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:238:pom:4.0-SNAPSHOT 10:242:pom:4.0-SNAPSHOT 10_327_4.1-SNAPSHOT_pom.ini000066400000000000000000000007601167050556700331410ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:239:pom:3.0-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:154:pom:3.3-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:117:pom:4.1-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 10:328:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:238:pom:4.1-SNAPSHOT 10:242:pom:4.1-SNAPSHOT 10_328_4.0-SNAPSHOT_pom.ini000066400000000000000000000023361167050556700331420ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:76:pom:1.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:64:pom:1.3-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:50:pom:3.4.1-SNAPSHOT 1:50:pom:3.5-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:217:pom:1.0_sap.1-SNAPSHOT 1:55:pom:4.4-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:19:pom:6.3-SNAPSHOT 1:30:pom:0.7.0-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:154:pom:3.3-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 1:30:pom:0.7.0-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:172:pom:4.0-SNAPSHOT 10:117:pom:4.0-SNAPSHOT 10:139:pom:3.0-SNAPSHOT 10:205:pom:4.0-SNAPSHOT 10:62:pom:4.0-SNAPSHOT 10:246:pom:4.0-SNAPSHOT 10:243:pom:4.0-SNAPSHOT 10:251:pom:4.0-SNAPSHOT 10:180:pom:3.1-SNAPSHOT 10:291:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:315:pom:4.0-SNAPSHOT 10:233:pom:4.0-SNAPSHOT 10:242:pom:4.0-SNAPSHOT 10:288:pom:4.0-SNAPSHOT 10:257:pom:4.0-SNAPSHOT 10:149:pom:4.0-SNAPSHOT 10:286:pom:4.0-SNAPSHOT 10:174:pom:4.0-SNAPSHOT 10_328_4.1-SNAPSHOT_pom.ini000066400000000000000000000023401167050556700331360ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:76:pom:1.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:64:pom:1.3-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:50:pom:3.4.1-SNAPSHOT 1:50:pom:3.5-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:217:pom:1.0_sap.1-SNAPSHOT 1:55:pom:4.8.2-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:19:pom:6.3-SNAPSHOT 1:30:pom:0.7.0-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:154:pom:3.3-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 1:30:pom:0.7.0-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:172:pom:4.1-SNAPSHOT 10:117:pom:4.1-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 10:205:pom:4.1-SNAPSHOT 10:62:pom:4.1-SNAPSHOT 10:246:pom:4.1-SNAPSHOT 10:243:pom:4.1-SNAPSHOT 10:251:pom:4.1-SNAPSHOT 10:180:pom:3.2-SNAPSHOT 10:291:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:315:pom:4.1-SNAPSHOT 10:233:pom:4.1-SNAPSHOT 10:242:pom:4.1-SNAPSHOT 10:288:pom:4.1-SNAPSHOT 10:257:pom:4.1-SNAPSHOT 10:149:pom:4.1-SNAPSHOT 10:286:pom:4.1-SNAPSHOT 10:174:pom:4.1-SNAPSHOT 10_329_4.0-SNAPSHOT_pom.ini000066400000000000000000000003751167050556700331440ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:24:pom:1.2.10-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:212:pom:4.0-SNAPSHOT 10:238:pom:4.0-SNAPSHOT 10:330:pom:4.0-SNAPSHOT 10_329_4.1-SNAPSHOT_pom.ini000066400000000000000000000003751167050556700331450ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:24:pom:1.2.10-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:212:pom:4.1-SNAPSHOT 10:238:pom:4.1-SNAPSHOT 10:330:pom:4.1-SNAPSHOT 10_330_4.0-SNAPSHOT_pom.ini000066400000000000000000000001021167050556700331200ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:27:pom:6.0-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 10_330_4.1-SNAPSHOT_pom.ini000066400000000000000000000001021167050556700331210ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:27:pom:6.0-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 10_331_4.0-SNAPSHOT_pom.ini000066400000000000000000000010651167050556700331320ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:239:pom:3.0-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:154:pom:3.3-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:117:pom:4.0-SNAPSHOT 10:139:pom:3.0-SNAPSHOT 10:205:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:238:pom:4.0-SNAPSHOT 10:242:pom:4.0-SNAPSHOT 10:288:pom:4.0-SNAPSHOT 10_331_4.1-SNAPSHOT_pom.ini000066400000000000000000000010651167050556700331330ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:239:pom:3.0-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:154:pom:3.3-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:117:pom:4.1-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 10:205:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:238:pom:4.1-SNAPSHOT 10:242:pom:4.1-SNAPSHOT 10:288:pom:4.1-SNAPSHOT 10_332_4.0-SNAPSHOT_pom.ini000066400000000000000000000002721167050556700331320ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 10:238:pom:4.0-SNAPSHOT 10:331:pom:4.0-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 10:330:pom:4.0-SNAPSHOT 10:333:pom:4.0-SNAPSHOT 10:334:pom:4.0-SNAPSHOT 10_332_4.1-SNAPSHOT_pom.ini000066400000000000000000000002721167050556700331330ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 10:238:pom:4.1-SNAPSHOT 10:331:pom:4.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 10:330:pom:4.1-SNAPSHOT 10:333:pom:4.1-SNAPSHOT 10:334:pom:4.1-SNAPSHOT 10_333_4.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331300ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 10_333_4.1-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331310ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 10_334_4.0-SNAPSHOT_pom.ini000066400000000000000000000010651167050556700331350ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:239:pom:3.0-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:154:pom:3.3-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:139:pom:3.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:238:pom:4.0-SNAPSHOT 10:242:pom:4.0-SNAPSHOT 10:331:pom:4.0-SNAPSHOT 10:288:pom:4.0-SNAPSHOT 10:286:pom:4.0-SNAPSHOT 10_334_4.1-SNAPSHOT_pom.ini000066400000000000000000000010651167050556700331360ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:118:pom:10.2.2.0-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:239:pom:3.0-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:154:pom:3.3-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:238:pom:4.1-SNAPSHOT 10:242:pom:4.1-SNAPSHOT 10:331:pom:4.1-SNAPSHOT 10:288:pom:4.1-SNAPSHOT 10:286:pom:4.1-SNAPSHOT 10_335_4.0-SNAPSHOT_pom.ini000066400000000000000000000006021167050556700331320ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:83:pom:1.10.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 1:32:pom:720-SNAPSHOT 1:33:pom:711-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:141:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10:146:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 1:16:pom:1.8.0-SNAPSHOT 10_335_4.1-SNAPSHOT_pom.ini000066400000000000000000000006021167050556700331330ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:83:pom:1.10.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 1:32:pom:720-SNAPSHOT 1:33:pom:711-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:141:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:146:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 1:16:pom:1.8.0-SNAPSHOT 10_336_4.0-SNAPSHOT_pom.ini000066400000000000000000000005731167050556700331420ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:326:pom:0.9.7-SNAPSHOT 1:15:pom:1.36.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:26:pom:3.8.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:94:pom:4.0-SNAPSHOT 1:323:pom:11.0-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:102:pom:1.busObj.1-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:322:pom:4.0-SNAPSHOT 10_336_4.1-SNAPSHOT_pom.ini000066400000000000000000000005731167050556700331430ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:326:pom:0.9.7-SNAPSHOT 1:15:pom:1.36.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:26:pom:3.8.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:94:pom:4.0-SNAPSHOT 1:323:pom:11.0-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:102:pom:1.busObj.1-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:322:pom:4.1-SNAPSHOT 10_337_4.0-SNAPSHOT_pom.ini000066400000000000000000000000741167050556700331370ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10_337_4.1-SNAPSHOT_pom.ini000066400000000000000000000000741167050556700331400ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10_343_4.0-SNAPSHOT_pom.ini000066400000000000000000000000761167050556700331360ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 10:212:pom:4.0-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10_343_4.1-SNAPSHOT_pom.ini000066400000000000000000000000761167050556700331370ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 10:212:pom:4.1-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10_345_4.0-SNAPSHOT_pom.ini000066400000000000000000000006671167050556700331460ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:65:pom:2.1.0-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:55:pom:3.8.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:278:pom:1.8.0-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:29:pom:3.0.5-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:75:pom:26-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:176:pom:4.0-SNAPSHOT 10:177:pom:4.0-SNAPSHOT 10:179:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:175:pom:2.0-SNAPSHOT 10_345_4.1-SNAPSHOT_pom.ini000066400000000000000000000006671167050556700331470ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:65:pom:2.1.0-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:55:pom:3.8.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:278:pom:1.8.0-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:29:pom:3.0.5-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:75:pom:26-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:176:pom:4.1-SNAPSHOT 10:177:pom:4.1-SNAPSHOT 10:179:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:175:pom:2.1-SNAPSHOT 10_346_4.0-SNAPSHOT_pom.ini000066400000000000000000000004771167050556700331460ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:75:pom:26-SNAPSHOT 10:177:pom:4.0-SNAPSHOT 10:178:pom:4.0-SNAPSHOT 10:179:pom:4.0-SNAPSHOT 10:347:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10_346_4.1-SNAPSHOT_pom.ini000066400000000000000000000004771167050556700331470ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:75:pom:26-SNAPSHOT 10:177:pom:4.1-SNAPSHOT 10:178:pom:4.1-SNAPSHOT 10:179:pom:4.1-SNAPSHOT 10:347:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10_347_4.0-SNAPSHOT_pom.ini000066400000000000000000000005241167050556700331400ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:75:pom:26-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:177:pom:4.0-SNAPSHOT 10:178:pom:4.0-SNAPSHOT 10:179:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10_347_4.1-SNAPSHOT_pom.ini000066400000000000000000000005241167050556700331410ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:75:pom:26-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:177:pom:4.1-SNAPSHOT 10:178:pom:4.1-SNAPSHOT 10:179:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10_349_4.0-SNAPSHOT_pom.ini000066400000000000000000000017531167050556700331470ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:50:pom:3.4.1-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:338:pom:2.8-SNAPSHOT 1:36:pom:2.0-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 1:115:pom:4.2.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:5:pom:1.6-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 10:121:pom:3.0-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:172:pom:4.0-SNAPSHOT 10:117:pom:4.0-SNAPSHOT 10:139:pom:3.0-SNAPSHOT 10:350:pom:4.0-SNAPSHOT 10:205:pom:4.0-SNAPSHOT 10:243:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:141:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:235:pom:4.0-SNAPSHOT 10:315:pom:4.0-SNAPSHOT 10:261:pom:4.0-SNAPSHOT 10:146:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10_349_4.1-SNAPSHOT_pom.ini000066400000000000000000000020031167050556700331350ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:50:pom:3.4.1-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:338:pom:3.0-SNAPSHOT 1:36:pom:2.0-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 1:115:pom:4.2.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:5:pom:1.6-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 10:121:pom:3.1-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:172:pom:4.1-SNAPSHOT 10:117:pom:4.1-SNAPSHOT 10:357:pom:4.1-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 10:350:pom:4.1-SNAPSHOT 10:205:pom:4.1-SNAPSHOT 10:243:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:141:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:235:pom:4.1-SNAPSHOT 10:315:pom:4.1-SNAPSHOT 10:261:pom:4.1-SNAPSHOT 10:146:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10_350_4.0-SNAPSHOT_pom.ini000066400000000000000000000011401167050556700331250ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:8:pom:2.7.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:36:pom:2.0-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:339:pom:8.0.1p5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:115:pom:4.2.1-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 10:121:pom:3.0-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:172:pom:4.0-SNAPSHOT 10:349:pom:4.0-SNAPSHOT 10:117:pom:4.0-SNAPSHOT 10:139:pom:3.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:141:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10:146:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:115:pom:4.2.1-SNAPSHOT 10_350_4.1-SNAPSHOT_pom.ini000066400000000000000000000012201167050556700331250ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:8:pom:2.7.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:36:pom:2.0-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:339:pom:8.0.1p5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:115:pom:4.2.1-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 10:121:pom:3.1-SNAPSHOT 10:359:pom:4.1-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:172:pom:4.1-SNAPSHOT 10:349:pom:4.1-SNAPSHOT 10:117:pom:4.1-SNAPSHOT 10:357:pom:4.1-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:141:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:146:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:115:pom:4.2.1-SNAPSHOT 10_351_4.0-SNAPSHOT_pom.ini000066400000000000000000000020701167050556700331310ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:352:pom:6.1-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:353:pom:1.2.3-SNAPSHOT 1:63:pom:1.1-SNAPSHOT 1:63:pom:1.3-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:248:pom:5.5-SNAPSHOT 1:50:pom:3.4.1-SNAPSHOT 1:354:pom:1.6.2-SNAPSHOT 1:355:pom:3.0.5-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:93:pom:10.0-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:267:pom:3.0-SNAPSHOT 1:108:pom:4.0-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:5:pom:1.6-SNAPSHOT 1:344:pom:1.6.0-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:75:pom:26-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 1:289:pom:2.2.0-SNAPSHOT 1:250:pom:1.0_sap.1-SNAPSHOT 1:89:pom:2.3-SNAPSHOT 10:173:pom:4.0-SNAPSHOT 10:189:pom:4.0-SNAPSHOT 10:202:pom:4.0-SNAPSHOT 10:174:pom:4.0-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:246:pom:4.0-SNAPSHOT 10:167:pom:4.0-SNAPSHOT 10:247:pom:4.0-SNAPSHOT 10:251:pom:4.0-SNAPSHOT 10:180:pom:3.1-SNAPSHOT 10:121:pom:3.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:331:pom:4.0-SNAPSHOT 10:149:pom:4.0-SNAPSHOT 10:148:pom:4.0-SNAPSHOT 10:161:pom:4.0-SNAPSHOT 10:242:pom:4.0-SNAPSHOT 10_351_4.1-SNAPSHOT_pom.ini000066400000000000000000000022321167050556700331320ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:352:pom:6.1-SNAPSHOT 1:358:pom:1.1.2-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:353:pom:1.2.3-SNAPSHOT 1:63:pom:1.1-SNAPSHOT 1:63:pom:1.3-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:260:pom:2.3.3-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:248:pom:5.5-SNAPSHOT 1:50:pom:3.4.1-SNAPSHOT 1:354:pom:1.6.2-SNAPSHOT 1:355:pom:3.0.5-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:93:pom:10.0-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:267:pom:3.0-SNAPSHOT 1:108:pom:4.0-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:5:pom:1.6-SNAPSHOT 1:344:pom:1.6.0-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:75:pom:26-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 1:289:pom:2.2.0-SNAPSHOT 1:250:pom:1.0_sap.1-SNAPSHOT 1:89:pom:2.3-SNAPSHOT 10:173:pom:4.1-SNAPSHOT 10:189:pom:4.1-SNAPSHOT 10:202:pom:4.1-SNAPSHOT 10:174:pom:4.1-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:246:pom:4.1-SNAPSHOT 10:167:pom:4.1-SNAPSHOT 10:247:pom:4.1-SNAPSHOT 10:251:pom:4.1-SNAPSHOT 10:180:pom:3.2-SNAPSHOT 10:121:pom:3.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:331:pom:4.1-SNAPSHOT 10:149:pom:4.1-SNAPSHOT 10:148:pom:4.1-SNAPSHOT 10:161:pom:4.1-SNAPSHOT 10:242:pom:4.1-SNAPSHOT 10:363:pom:4.1-SNAPSHOT 10:160:pom:4.1-SNAPSHOT 10_356_4.0-SNAPSHOT_pom.ini000066400000000000000000000001301167050556700331310ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:53:pom:2.3.0.677-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10_356_4.1-SNAPSHOT_pom.ini000066400000000000000000000001301167050556700331320ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:53:pom:2.3.0.677-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10_357_4.1-SNAPSHOT_pom.ini000066400000000000000000000014751167050556700331500ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:8:pom:2.1.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:4:pom:2.5.4-SNAPSHOT 1:3:pom:1.28-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:4.2.1-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:36:pom:2.0-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 1:115:pom:4.2.1-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 1:32:pom:720-SNAPSHOT 1:33:pom:711-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:141:pom:4.1-SNAPSHOT 10_359_4.1-SNAPSHOT_pom.ini000066400000000000000000000012351167050556700331440ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 1:115:pom:4.2.1-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:119:pom:1.0-SNAPSHOT 10:121:pom:3.1-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 10:357:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:163:pom:4.1-SNAPSHOT 10:141:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:146:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 1:32:pom:720-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:51:pom:1.6.2-SNAPSHOT 1:151:pom:3.7.1-SNAPSHOT 10_360_1.0-SNAPSHOT_pom.ini000066400000000000000000000003451167050556700331310ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:184:pom:20080807-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:30:pom:0.7.0-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:180:pom:3.2-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10_361_4.1-SNAPSHOT_pom.ini000066400000000000000000000026601167050556700331400ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:63:pom:1.1-SNAPSHOT 1:63:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:64:pom:1.3-SNAPSHOT 1:46:pom:1.0.2-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:65:pom:2.1.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:248:pom:5.5-SNAPSHOT 1:66:pom:0.11-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:185:pom:1.0_sap.2-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:222:pom:beta8-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:59:pom:1.0.1-SNAPSHOT 1:69:pom:10.1.0-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:70:pom:9.0-SNAPSHOT 1:29:pom:3.0.5-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 1:218:pom:2.2.1-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:62:pom:4.1-SNAPSHOT 10:72:pom:4.1-SNAPSHOT 10:81:pom:4.1-SNAPSHOT 10:246:pom:4.1-SNAPSHOT 10:167:pom:4.1-SNAPSHOT 10:247:pom:4.1-SNAPSHOT 10:224:pom:4.1-SNAPSHOT 10:243:pom:4.1-SNAPSHOT 10:362:pom:4.1-SNAPSHOT 10:252:pom:4.1-SNAPSHOT 10:251:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:216:pom:4.1-SNAPSHOT 10:230:pom:4.1-SNAPSHOT 10:220:pom:4.1-SNAPSHOT 10:226:pom:4.1-SNAPSHOT 10:231:pom:4.1-SNAPSHOT 10:232:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:156:pom:4.1-SNAPSHOT 10:149:pom:4.1-SNAPSHOT 10:43:pom:4.1-SNAPSHOT 10:161:pom:4.1-SNAPSHOT 10:228:pom:1.0-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10_362_4.1-SNAPSHOT_pom.ini000066400000000000000000000013101167050556700331300ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:245:pom:1.0.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:250:pom:1.0_sap.1-SNAPSHOT 10:62:pom:4.1-SNAPSHOT 10:246:pom:4.1-SNAPSHOT 10:254:pom:4.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:245:pom:1.0.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:250:pom:1.0_sap.1-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:361:pom:4.1-SNAPSHOT 10:62:pom:4.1-SNAPSHOT 10:243:pom:4.1-SNAPSHOT 10:251:pom:4.1-SNAPSHOT 10:226:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:160:pom:4.1-SNAPSHOT 10:161:pom:4.1-SNAPSHOT 10_363_4.1-SNAPSHOT_pom.ini000066400000000000000000000003421167050556700331350ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:358:pom:1.1.2-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:260:pom:2.3.3-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:40:pom:6.1-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10_364_4.1-SNAPSHOT_pom.ini000066400000000000000000000006021167050556700331350ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 10:152:pom:4.1-SNAPSHOT 1:358:pom:1.1.2-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:260:pom:2.3.3-SNAPSHOT 1:55:pom:4.8.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 10:160:pom:4.1-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:48:pom:1.3-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 10_366_4.1-SNAPSHOT_pom.ini000066400000000000000000000016301167050556700331410ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:46:pom:1.0.2-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:185:pom:1.0_sap.2-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 1:218:pom:2.2.1-SNAPSHOT 1:219:pom:2.3.4-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:316:pom:4.1-SNAPSHOT 10:226:pom:4.1-SNAPSHOT 10:231:pom:4.1-SNAPSHOT 10:232:pom:4.1-SNAPSHOT 10:285:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:233:pom:4.1-SNAPSHOT 10:238:pom:4.1-SNAPSHOT 10:242:pom:4.1-SNAPSHOT 10:149:pom:4.1-SNAPSHOT 10:228:pom:1.0-SNAPSHOT 10_42_4.0-SNAPSHOT_pom.ini000066400000000000000000000004441167050556700330510ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:15:pom:1.36.0-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:149:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10:12:pom:4.0-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 10_42_4.1-SNAPSHOT_pom.ini000066400000000000000000000004441167050556700330520ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:15:pom:1.36.0-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:149:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10:12:pom:4.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 10_43_4.0-SNAPSHOT_pom.ini000066400000000000000000000014731167050556700330550ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:48:pom:1.3-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:49:pom:6.0.5.25-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:52:pom:1.8-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:53:pom:2.3.0.677-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:54:pom:0.1.36-SNAPSHOT 1:55:pom:4.4-SNAPSHOT 1:56:pom:1.2-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:59:pom:1.0.1-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:60:pom:0.2.9-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 10:62:pom:4.0-SNAPSHOT 10:243:pom:4.0-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10:160:pom:4.0-SNAPSHOT 10:162:pom:4.0-SNAPSHOT 10:161:pom:4.0-SNAPSHOT 10:356:pom:4.0-SNAPSHOT 10_43_4.1-SNAPSHOT_pom.ini000066400000000000000000000014771167050556700330620ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:48:pom:1.3-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:49:pom:6.0.5.25-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:53:pom:2.3.0.677-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:54:pom:0.1.36-SNAPSHOT 1:55:pom:4.8.2-SNAPSHOT 1:56:pom:1.2-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:59:pom:1.0.1-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:60:pom:0.2.9-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 10:62:pom:4.1-SNAPSHOT 10:243:pom:4.1-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10:160:pom:4.1-SNAPSHOT 10:162:pom:4.1-SNAPSHOT 10:161:pom:4.1-SNAPSHOT 10:356:pom:4.1-SNAPSHOT 1:29:pom:3.0.5-SNAPSHOT 10_62_4.0-SNAPSHOT_pom.ini000066400000000000000000000020601167050556700330470ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:63:pom:1.1-SNAPSHOT 1:63:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:64:pom:1.3-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:65:pom:2.1.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:66:pom:0.11-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:69:pom:10.1.0-SNAPSHOT 1:69:pom:11.1.0-SNAPSHOT 1:69:pom:8.1.7-SNAPSHOT 1:69:pom:9.0.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:70:pom:9.0-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:72:pom:4.0-SNAPSHOT 10:246:pom:4.0-SNAPSHOT 10:167:pom:4.0-SNAPSHOT 10:247:pom:4.0-SNAPSHOT 10:243:pom:4.0-SNAPSHOT 10:251:pom:4.0-SNAPSHOT 10:180:pom:3.1-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:315:pom:4.0-SNAPSHOT 10:242:pom:4.0-SNAPSHOT 10:149:pom:4.0-SNAPSHOT 10:43:pom:4.0-SNAPSHOT 10:161:pom:4.0-SNAPSHOT 10:155:pom:4.0-SNAPSHOT 10:121:pom:3.0-SNAPSHOT 10_62_4.1-SNAPSHOT_pom.ini000066400000000000000000000022521167050556700330530ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:358:pom:1.1.2-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:63:pom:1.1-SNAPSHOT 1:63:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:260:pom:2.3.3-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:64:pom:1.3-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:65:pom:2.1.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:66:pom:0.11-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:69:pom:10.1.0-SNAPSHOT 1:69:pom:11.1.0-SNAPSHOT 1:69:pom:8.1.7-SNAPSHOT 1:69:pom:9.0.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:70:pom:9.0-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:72:pom:4.1-SNAPSHOT 10:246:pom:4.1-SNAPSHOT 10:167:pom:4.1-SNAPSHOT 10:247:pom:4.1-SNAPSHOT 10:243:pom:4.1-SNAPSHOT 10:251:pom:4.1-SNAPSHOT 10:180:pom:3.2-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:315:pom:4.1-SNAPSHOT 10:242:pom:4.1-SNAPSHOT 10:364:pom:4.1-SNAPSHOT 10:363:pom:4.1-SNAPSHOT 10:149:pom:4.1-SNAPSHOT 10:43:pom:4.1-SNAPSHOT 10:161:pom:4.1-SNAPSHOT 10:155:pom:4.1-SNAPSHOT 10:121:pom:3.1-SNAPSHOT 10:359:pom:4.1-SNAPSHOT 10_72_4.0-SNAPSHOT_pom.ini000066400000000000000000000030611167050556700330520ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:63:pom:1.1-SNAPSHOT 1:63:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:73:pom:2.4.1-SNAPSHOT 1:64:pom:1.3-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:65:pom:2.1.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:76:pom:1.0-SNAPSHOT 1:66:pom:0.11-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:77:pom:1.45-SNAPSHOT 1:55:pom:4.4-SNAPSHOT 1:78:pom:2.6-SNAPSHOT 1:18:pom:5.1.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:69:pom:10.1.0-SNAPSHOT 1:79:pom:0.7.2-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:70:pom:9.0-SNAPSHOT 1:29:pom:3.0.5-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:62:pom:4.0-SNAPSHOT 10:80:pom:4.0-SNAPSHOT 10:81:pom:4.0-SNAPSHOT 10:246:pom:4.0-SNAPSHOT 10:167:pom:4.0-SNAPSHOT 10:247:pom:4.0-SNAPSHOT 10:243:pom:4.0-SNAPSHOT 10:251:pom:4.0-SNAPSHOT 10:180:pom:3.1-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:141:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:156:pom:4.0-SNAPSHOT 10:235:pom:4.0-SNAPSHOT 10:315:pom:4.0-SNAPSHOT 10:233:pom:4.0-SNAPSHOT 10:257:pom:4.0-SNAPSHOT 10:146:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10:149:pom:4.0-SNAPSHOT 10:160:pom:4.0-SNAPSHOT 10:43:pom:4.0-SNAPSHOT 10:161:pom:4.0-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 10:318:pom:4.0-SNAPSHOT 10:320:pom:4.0-SNAPSHOT 10:319:pom:4.0-SNAPSHOT 10_72_4.1-SNAPSHOT_pom.ini000066400000000000000000000032651167050556700330610ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:63:pom:1.1-SNAPSHOT 1:63:pom:1.3-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:73:pom:2.4.1-SNAPSHOT 1:64:pom:1.3-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:65:pom:2.1.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:47:pom:2.6.2-SNAPSHOT 1:76:pom:1.0-SNAPSHOT 1:66:pom:0.11-SNAPSHOT 1:67:pom:1.6.5-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:158:pom:3.5-SNAPSHOT 1:52:pom:2.5-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:68:pom:3.8.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:77:pom:1.45-SNAPSHOT 1:217:pom:1.0_sap.1-SNAPSHOT 1:55:pom:4.8.2-SNAPSHOT 1:78:pom:2.6-SNAPSHOT 1:18:pom:5.1.1.41-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:69:pom:10.1.0-SNAPSHOT 1:79:pom:0.7.2-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:70:pom:9.0-SNAPSHOT 1:29:pom:3.0.5-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:61:pom:1.1-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:62:pom:4.1-SNAPSHOT 10:80:pom:4.1-SNAPSHOT 10:81:pom:4.1-SNAPSHOT 10:246:pom:4.1-SNAPSHOT 10:167:pom:4.1-SNAPSHOT 10:247:pom:4.1-SNAPSHOT 10:243:pom:4.1-SNAPSHOT 10:251:pom:4.1-SNAPSHOT 10:180:pom:3.2-SNAPSHOT 10:174:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:141:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:156:pom:4.1-SNAPSHOT 10:235:pom:4.1-SNAPSHOT 10:315:pom:4.1-SNAPSHOT 10:233:pom:4.1-SNAPSHOT 10:257:pom:4.1-SNAPSHOT 10:146:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10:149:pom:4.1-SNAPSHOT 10:160:pom:4.1-SNAPSHOT 10:43:pom:4.1-SNAPSHOT 10:161:pom:4.1-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 10:318:pom:4.1-SNAPSHOT 10:320:pom:4.1-SNAPSHOT 10:319:pom:4.1-SNAPSHOT 10_80_4.0-SNAPSHOT_pom.ini000066400000000000000000000006641167050556700330570ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:8:pom:2.7.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:18:pom:5.1.1-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:81:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:141:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10:235:pom:4.0-SNAPSHOT 10:315:pom:4.0-SNAPSHOT 10:146:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10_80_4.1-SNAPSHOT_pom.ini000066400000000000000000000006671167050556700330630ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:8:pom:2.7.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:18:pom:5.1.1.41-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:81:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:141:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:235:pom:4.1-SNAPSHOT 10:315:pom:4.1-SNAPSHOT 10:146:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10_81_4.0-SNAPSHOT_pom.ini000066400000000000000000000034741167050556700330620ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:82:pom:9.0-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:83:pom:1.10.0-SNAPSHOT 1:8:pom:2.1.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:85:pom:6.4-SNAPSHOT 1:85:pom:9.53.busObj.CR.1-SNAPSHOT 1:86:pom:7.13.2-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:87:pom:6b-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:18:pom:5.1.1-SNAPSHOT 1:88:pom:3.5-SNAPSHOT 1:91:pom:1.5-SNAPSHOT 1:92:pom:1.0-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:93:pom:10.0-SNAPSHOT 1:94:pom:6.0-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:95:pom:7.0-SNAPSHOT 1:95:pom:7.1-SNAPSHOT 1:95:pom:8.0-SNAPSHOT 1:96:pom:8.0-SNAPSHOT 1:97:pom:3.0-SNAPSHOT 1:98:pom:6.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:99:pom:1.0-SNAPSHOT 1:100:pom:4.1-SNAPSHOT 1:101:pom:1.0_sap.1-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:102:pom:1.busObj.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:103:pom:6403-SNAPSHOT 1:104:pom:70-SNAPSHOT 1:105:pom:70-SNAPSHOT 1:106:pom:3.5.5-SNAPSHOT 1:107:pom:1.0-SNAPSHOT 1:108:pom:4.0-SNAPSHOT 1:110:pom:4.0-SNAPSHOT 1:111:pom:1.0-SNAPSHOT 1:112:pom:1.0.30-SNAPSHOT 1:113:pom:2.0-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:114:pom:2.50.16.busObj.1-SNAPSHOT 1:114:pom:2.50.28_sap.1-SNAPSHOT 1:116:pom:4.0-SNAPSHOT 10:22:pom:4.0-SNAPSHOT 10:117:pom:4.0-SNAPSHOT 10:139:pom:3.0-SNAPSHOT 10:62:pom:4.0-SNAPSHOT 10:163:pom:4.0-SNAPSHOT 10:246:pom:4.0-SNAPSHOT 10:167:pom:4.0-SNAPSHOT 10:351:pom:4.0-SNAPSHOT 10:247:pom:4.0-SNAPSHOT 10:225:pom:4.0-SNAPSHOT 10:207:pom:4.0-SNAPSHOT 10:243:pom:4.0-SNAPSHOT 10:252:pom:4.0-SNAPSHOT 10:266:pom:4.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:141:pom:4.0-SNAPSHOT 10:145:pom:4.0-SNAPSHOT 10:152:pom:4.0-SNAPSHOT 10:315:pom:4.0-SNAPSHOT 10:12:pom:4.0-SNAPSHOT 10:146:pom:4.0-SNAPSHOT 10:147:pom:4.0-SNAPSHOT 10:148:pom:4.0-SNAPSHOT 10:149:pom:4.0-SNAPSHOT 10:162:pom:4.0-SNAPSHOT 10_81_4.1-SNAPSHOT_pom.ini000066400000000000000000000034771167050556700330660ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:82:pom:9.0-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:44:pom:1.3-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:83:pom:1.10.0-SNAPSHOT 1:8:pom:2.1.0-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:85:pom:6.4-SNAPSHOT 1:85:pom:9.53.busObj.CR.1-SNAPSHOT 1:86:pom:7.13.2-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:87:pom:6b-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:18:pom:5.1.1.41-SNAPSHOT 1:88:pom:3.5-SNAPSHOT 1:91:pom:1.5-SNAPSHOT 1:92:pom:1.0-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:93:pom:10.0-SNAPSHOT 1:94:pom:6.0-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:95:pom:7.0-SNAPSHOT 1:95:pom:7.1-SNAPSHOT 1:95:pom:8.0-SNAPSHOT 1:96:pom:8.0-SNAPSHOT 1:97:pom:3.0-SNAPSHOT 1:98:pom:6.0-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:99:pom:1.0-SNAPSHOT 1:100:pom:4.1-SNAPSHOT 1:101:pom:1.0_sap.1-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:102:pom:1.busObj.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:103:pom:6403-SNAPSHOT 1:104:pom:70-SNAPSHOT 1:105:pom:70-SNAPSHOT 1:106:pom:3.5.5-SNAPSHOT 1:107:pom:1.0-SNAPSHOT 1:108:pom:4.0-SNAPSHOT 1:110:pom:4.0-SNAPSHOT 1:111:pom:1.0-SNAPSHOT 1:112:pom:1.0.30-SNAPSHOT 1:113:pom:2.0-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:114:pom:2.50.16.busObj.1-SNAPSHOT 1:114:pom:2.50.28_sap.1-SNAPSHOT 1:116:pom:4.0-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:117:pom:4.1-SNAPSHOT 10:139:pom:3.1-SNAPSHOT 10:62:pom:4.1-SNAPSHOT 10:163:pom:4.1-SNAPSHOT 10:246:pom:4.1-SNAPSHOT 10:167:pom:4.1-SNAPSHOT 10:351:pom:4.1-SNAPSHOT 10:247:pom:4.1-SNAPSHOT 10:225:pom:4.1-SNAPSHOT 10:207:pom:4.1-SNAPSHOT 10:243:pom:4.1-SNAPSHOT 10:252:pom:4.1-SNAPSHOT 10:266:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 10:141:pom:4.1-SNAPSHOT 10:145:pom:4.1-SNAPSHOT 10:152:pom:4.1-SNAPSHOT 10:315:pom:4.1-SNAPSHOT 10:12:pom:4.1-SNAPSHOT 10:146:pom:4.1-SNAPSHOT 10:147:pom:4.1-SNAPSHOT 10:148:pom:4.1-SNAPSHOT 10:149:pom:4.1-SNAPSHOT 10:162:pom:4.1-SNAPSHOT 10_90_1.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330450ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_100_4.1-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330410ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_101_1.0_sap.1-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700340400ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_102_1.busObj.1-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700342630ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_103_6403-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331360ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_104_70-SNAPSHOT_pom.ini000066400000000000000000000001521167050556700327710ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_105_70-SNAPSHOT_pom.ini000066400000000000000000000001241167050556700327710ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_106_3.5.5-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700332150ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_107_1.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330440ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_108_4.0-SNAPSHOT_pom.ini000066400000000000000000000003121167050556700330460ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:8:pom:2.7.0-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:18:pom:5.1.1.41-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:109:pom:6.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_109_6.0.5-SNAPSHOT_pom.ini000066400000000000000000000001771167050556700332250ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_110_4.0-SNAPSHOT_pom.ini000066400000000000000000000002331167050556700330410ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:18:pom:5.1.1.41-SNAPSHOT 1:27:pom:6.0-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_111_1.0-SNAPSHOT_pom.ini000066400000000000000000000001011167050556700330310ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:18:pom:5.1.1.41-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 1_112_1.0.30-SNAPSHOT_pom.ini000066400000000000000000000002621167050556700332630ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:17:pom:1.2.3-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:18:pom:5.1.1.41-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_113_2.0-SNAPSHOT_pom.ini000066400000000000000000000003721167050556700330460ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:17:pom:1.2.3-SNAPSHOT 1:87:pom:6b-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:18:pom:5.1.1.41-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:106:pom:3.5.5-SNAPSHOT 1:112:pom:1.0.30-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_114_2.50.16.busObj.1-SNAPSHOT_pom.ini000066400000000000000000000004211167050556700347360ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:17:pom:1.2.3-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:18:pom:5.1.1.41-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:108:pom:4.0-SNAPSHOT 1:110:pom:4.0-SNAPSHOT 1:112:pom:1.0.30-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_114_2.50.28_sap.1-SNAPSHOT_pom.ini000066400000000000000000000002741167050556700343670ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:115:pom:4.2.1-SNAPSHOT 1:114:pom:2.50.16.busObj.1-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_115_4.2.1-SNAPSHOT_pom.ini000066400000000000000000000001771167050556700332160ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_116_4.0-SNAPSHOT_pom.ini000066400000000000000000000000521167050556700330460ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:18:pom:5.1.1.41-SNAPSHOT 1_118_10.2.2.0-SNAPSHOT_pom.ini000066400000000000000000000002101167050556700334210ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_118_10.5.3.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700334320ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_119_1.0-SNAPSHOT_pom.ini000066400000000000000000000000461167050556700330510ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:7:pom:5.8.8-SNAPSHOT 1_120_1.0-SNAPSHOT_pom.ini000066400000000000000000000003021167050556700330340ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_122_3.1.1-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700332030ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_123_3.1.1-SNAPSHOT_pom.ini000066400000000000000000000001771167050556700332130ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_124_2.2-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330460ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_125_8.1-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330540ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_125_9.1-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330550ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_125_9.5-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330610ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_126_2.81-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331370ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_126_2.90-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331370ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_126_3.50-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331340ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_127_6.20-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331350ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_127_6.30-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331360ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_128_2006-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331400ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_129_10.1-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331310ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_130_10.1-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331210ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_130_10.2-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331220ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_130_11.1-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331220ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_130_9.2-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330520ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_131_5.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330450ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_131_5.3-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330500ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_131_6.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330460ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_132_7.7-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330570ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_133_12.5-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331320ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_133_15.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331300ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_133_15.5-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331350ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_134_12.6-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331340ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_134_12.7-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331350ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_135_10.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331250ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_135_11.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331260ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_136_3.04-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331340ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_136_3.06-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331360ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_137_2.2.12-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700332730ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_138_7.7.06-SNAPSHOT_pom.ini000066400000000000000000000001771167050556700333200ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_13_1.7.0-SNAPSHOT_pom.ini000066400000000000000000000001521167050556700331250ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_140_5.5.28-SNAPSHOT_pom.ini000066400000000000000000000000741167050556700333050ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1_140_6.0.18-SNAPSHOT_pom.ini000066400000000000000000000004721167050556700333020ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:15:pom:1.36.0-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:38:pom:1.3.5-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:42:pom:4.0-SNAPSHOT 10:12:pom:4.0-SNAPSHOT 1_140_6.0.24-SNAPSHOT_pom.ini000066400000000000000000000004721167050556700332770ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:14:pom:2.5.2-SNAPSHOT 1:8:pom:2.7.0-SNAPSHOT 1:15:pom:1.36.0-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:42:pom:4.0-SNAPSHOT 10:12:pom:4.0-SNAPSHOT 1_142_9.1-SNAPSHOT_pom.ini000066400000000000000000000000461167050556700330560ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:77:pom:1.45-SNAPSHOT 1_143_6.0-SNAPSHOT_pom.ini000066400000000000000000000001771167050556700330600ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_144_15.0-SNAPSHOT_pom.ini000066400000000000000000000000471167050556700331350ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:69:pom:8.1.7-SNAPSHOT 1_14_2.5.2-SNAPSHOT_pom.ini000066400000000000000000000001771167050556700331360ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_151_3.7.1-SNAPSHOT_pom.ini000066400000000000000000000001511167050556700332120ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 1_153_1.1.1-SNAPSHOT_pom.ini000066400000000000000000000001771167050556700332140ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_154_3.3-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330530ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_157_0.0.356_sap.1-SNAPSHOT_pom.ini000066400000000000000000000001771167050556700343750ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_158_3.5-SNAPSHOT_pom.ini000066400000000000000000000001771167050556700330700ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_159_2.1_03-SNAPSHOT_pom.ini000066400000000000000000000002241167050556700333570ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.6-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_15_1.36.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700332110ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_165_11.1-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331320ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_165_7.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330560ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_165_7.1-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330570ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_165_9.3-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330630ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_166_720-SNAPSHOT_pom.ini000066400000000000000000000000461167050556700330650ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 10:11:pom:4.0-SNAPSHOT 1_168_6.0-SNAPSHOT_pom.ini000066400000000000000000000001771167050556700330670ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_169_4.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330570ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_16_1.8.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331310ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_170_10.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331240ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_171_8.45-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331450ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_171_8.46-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331460ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_17_1.2.3-SNAPSHOT_pom.ini000066400000000000000000000002601167050556700331270ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:18:pom:5.1.1.41-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:19:pom:6.3-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_181_1.0-SNAPSHOT_pom.ini000066400000000000000000000001511167050556700330450ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:182:pom:3.2-SNAPSHOT 1:13:pom:1.7.0-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1_182_3.2-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330530ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_183_0.9-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330600ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_184_20080807-SNAPSHOT_pom.ini000066400000000000000000000000741167050556700334660ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1_185_1.0_sap.1-SNAPSHOT_pom.ini000066400000000000000000000005261167050556700340610ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:140:pom:5.5.28-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:50:pom:3.5-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_185_1.0_sap.2-SNAPSHOT_pom.ini000066400000000000000000000005261167050556700340620ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:45:pom:3.1-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:140:pom:6.0.24-SNAPSHOT 1:140:pom:5.5.28-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:50:pom:3.5-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 1_186_4.1-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330570ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_187_4.3-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330620ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_188_1.9-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330660ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_18_5.1.1-SNAPSHOT_pom.ini000066400000000000000000000001521167050556700331310ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_18_5.1.1.41-SNAPSHOT_pom.ini000066400000000000000000000001521167050556700333540ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_190_2.0.8-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700332150ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_191_3.2-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330530ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_192_1.8.0.7-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700333630ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_193_0.8.1-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700332170ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_194_2.3.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700332140ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_195_3.2-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330570ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_196_1.2.12-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700332770ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_197_5.1.3-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700332230ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_198_9.1.3-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700332300ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_199_2.2-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330620ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_19_6.3-SNAPSHOT_pom.ini000066400000000000000000000002271167050556700330010ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_200_3.1.12-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700332620ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_200_5.1-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330430ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_201_3.5.2-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700332060ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_204_1.6.1-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700332070ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_208_10.0-SNAPSHOT_pom.ini000066400000000000000000000001241167050556700331250ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_209_3.51-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331370ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_20_3.3.2-SNAPSHOT_pom.ini000066400000000000000000000003131167050556700331220ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:18:pom:5.1.1.41-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:21:pom:3.2.1.2-SNAPSHOT 10:22:pom:4.1-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 1_211_1.0-SNAPSHOT_pom.ini000066400000000000000000000002641167050556700330440ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:9:pom:3.1-SNAPSHOT 1:25:pom:0.86-beta1-SNAPSHOT 1:20:pom:3.3.2-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:19:pom:6.3-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_217_1.0_sap.1-SNAPSHOT_pom.ini000066400000000000000000000003021167050556700340450ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_218_2.2.1-SNAPSHOT_pom.ini000066400000000000000000000000471167050556700332140ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:68:pom:3.8.1-SNAPSHOT 1_219_2.3.4-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700332160ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_21_3.2.1.2-SNAPSHOT_pom.ini000066400000000000000000000001771167050556700332710ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_221_8.9-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330610ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_222_1.1.1-SNAPSHOT_pom.ini000066400000000000000000000000441167050556700332020ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:5:pom:1.6-SNAPSHOT 1_222_beta8-SNAPSHOT_pom.ini000066400000000000000000000000441167050556700335470ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:5:pom:1.6-SNAPSHOT 1_223_7.5-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330560ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_227_7.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330550ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_234_1.0-SNAPSHOT_pom.ini000066400000000000000000000001771167050556700330540ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_239_3.0-SNAPSHOT_pom.ini000066400000000000000000000000441167050556700330540ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:5:pom:1.5-SNAPSHOT 1_23_1.2.6_sap.1-SNAPSHOT_pom.ini000066400000000000000000000002021167050556700341250ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_240_720-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330540ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_244_1.2-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330500ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_245_1.0.2-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700332070ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_248_5.5-SNAPSHOT_pom.ini000066400000000000000000000001771167050556700330720ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_249_9.2.2-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700332250ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_24_1.2.10-SNAPSHOT_pom.ini000066400000000000000000000001611167050556700332030ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:25:pom:0.86-beta1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_250_1.0_sap.1-SNAPSHOT_pom.ini000066400000000000000000000003701167050556700340470ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:23:pom:1.2.6_sap.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:55:pom:4.8.2-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_253_1.3.1-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700332100ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_256_3.2-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330550ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_259_2.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330550ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_25_0.86-beta1-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700340520ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_260_2.2.5-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700332120ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_260_2.3.3-SNAPSHOT_pom.ini000066400000000000000000000002561167050556700332160ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:42:pom:4.1-SNAPSHOT 1_264_6.2-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330570ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_267_3.0-SNAPSHOT_pom.ini000066400000000000000000000001511167050556700330540ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_26_3.0.1-SNAPSHOT_pom.ini000066400000000000000000000002271167050556700331300ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:17:pom:1.2.3-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_26_3.8.1-SNAPSHOT_pom.ini000066400000000000000000000000471167050556700331400ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:26:pom:3.0.1-SNAPSHOT 1_26_4.2.1-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331300ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_270_1.6.5-SNAPSHOT_pom.ini000066400000000000000000000001771167050556700332250ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_273_1.0.3-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700332110ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_274_1.0.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700332070ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_278_1.8.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700332230ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_27_6.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700327720ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_282_2.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330510ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_283_1.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330510ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_287_1.1.2.1-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700333550ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_287_1.3-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330600ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_289_2.2.0-SNAPSHOT_pom.ini000066400000000000000000000002251167050556700332210ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_28_4.1-SNAPSHOT_pom.ini000066400000000000000000000001771167050556700330010ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_290_8.0.2.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700333540ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_293_0.2.5-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700332160ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_296_1.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330550ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_299_7.20-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331500ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_29_3.0.5-SNAPSHOT_pom.ini000066400000000000000000000001771167050556700331430ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_2_5.50-SNAPSHOT_pom.ini000066400000000000000000000001521167050556700327670ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:3:pom:1.28-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_300_7.1.8-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700332140ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_302_1.015-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700332070ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_304_9.1-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330540ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_308_1.8-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330570ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_309_1.15.1-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700332750ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_30_0.7.0-SNAPSHOT_pom.ini000066400000000000000000000001771167050556700331320ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_310_4.2.1-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700332040ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_311_2.3.0-SNAPSHOT_pom.ini000066400000000000000000000001511167050556700332020ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_312_4.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330450ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_313_2.2-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330460ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_314_6.0-SNAPSHOT_pom.ini000066400000000000000000000003021167050556700330460ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_31_2.2-SNAPSHOT_pom.ini000066400000000000000000000000471167050556700327660ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1_323_11.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331250ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_324_5.1-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330520ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_326_0.9.7-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700332240ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_32_720-SNAPSHOT_pom.ini000066400000000000000000000002251167050556700327740ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:33:pom:711-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_338_2.8-SNAPSHOT_pom.ini000066400000000000000000000002541167050556700330660ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_338_3.0-SNAPSHOT_pom.ini000066400000000000000000000002541167050556700330570ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 1_339_8.0.1p5-SNAPSHOT_pom.ini000066400000000000000000000001771167050556700334750ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_33_711-SNAPSHOT_pom.ini000066400000000000000000000001511167050556700327730ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_340_2.11-SNAPSHOT_pom.ini000066400000000000000000000002541167050556700331310ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_340_2.9-SNAPSHOT_pom.ini000066400000000000000000000002541167050556700330600ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_341_0.9-SNAPSHOT_pom.ini000066400000000000000000000002541167050556700330570ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_341_1.3-SNAPSHOT_pom.ini000066400000000000000000000002541167050556700330520ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_342_1.2-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330470ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_344_1.6.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700332130ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_348_3.8.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700332230ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_34_1.13-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330470ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_352_6.1-SNAPSHOT_pom.ini000066400000000000000000000000441167050556700330540ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:5:pom:1.6-SNAPSHOT 1_353_1.2.3-SNAPSHOT_pom.ini000066400000000000000000000002241167050556700332120ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.6-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_354_1.6.2-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700332160ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_355_3.0.5-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700332160ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_358_1.1.2-SNAPSHOT_pom.ini000066400000000000000000000002271167050556700332200ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_35_1.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700327640ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_365_3.4.1-SNAPSHOT_pom.ini000066400000000000000000000000451167050556700332200ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1_367_8.0-SNAPSHOT_pom.ini000066400000000000000000000000461167050556700330650ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 10:11:pom:4.0-SNAPSHOT 1_368_4.7.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700332250ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_369_2.4.5-SNAPSHOT_pom.ini000066400000000000000000000000501167050556700332230ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:368:pom:4.7.0-SNAPSHOT 1_36_2.0-SNAPSHOT_pom.ini000066400000000000000000000001521167050556700327660ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_370_6.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330530ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_371_822-SNAPSHOT_pom.ini000066400000000000000000000001771167050556700330730ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_37_5.5-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700327770ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_38_1.3.5-SNAPSHOT_pom.ini000066400000000000000000000001771167050556700331440ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_38_1.3.6-SNAPSHOT_pom.ini000066400000000000000000000000501167050556700331330ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:39:pom:0.9.8l-SNAPSHOT 1_39_0.9.8l-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700333220ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_3_1.28-SNAPSHOT_pom.ini000066400000000000000000000000461167050556700327730ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:4:pom:2.5.4-SNAPSHOT 1_40_6.1-SNAPSHOT_pom.ini000066400000000000000000000001511167050556700327650ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_41_5.0-SNAPSHOT_pom.ini000066400000000000000000000003651167050556700327730ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:8:pom:2.7.0-SNAPSHOT 1:15:pom:1.36.0-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:38:pom:1.3.6-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 10:42:pom:4.0-SNAPSHOT 10:12:pom:4.0-SNAPSHOT 1_44_1.3-SNAPSHOT_pom.ini000066400000000000000000000002241167050556700327670ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.6-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_44_1.4-SNAPSHOT_pom.ini000066400000000000000000000000441167050556700327700ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:5:pom:1.6-SNAPSHOT 1_45_3.1-SNAPSHOT_pom.ini000066400000000000000000000002541167050556700327730ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:46:pom:1.0.2-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.6-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_46_1.0.2-SNAPSHOT_pom.ini000066400000000000000000000000471167050556700331310ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:47:pom:2.6.2-SNAPSHOT 1_47_2.6.2-SNAPSHOT_pom.ini000066400000000000000000000002241167050556700331360ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.6-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_47_2.9.1-SNAPSHOT_pom.ini000066400000000000000000000002241167050556700331400ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.6-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_48_1.3-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700327730ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_49_6.0.5.25-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700333660ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_4_2.5.4-SNAPSHOT_pom.ini000066400000000000000000000000441167050556700330500ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:5:pom:1.6-SNAPSHOT 1_50_3.3-SNAPSHOT_pom.ini000066400000000000000000000002551167050556700327720ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:51:pom:1.6.2-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_50_3.4-SNAPSHOT_pom.ini000066400000000000000000000000451167050556700327700ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1_50_3.4.1-SNAPSHOT_pom.ini000066400000000000000000000000731167050556700331300ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:50:pom:3.4-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1_50_3.5-SNAPSHOT_pom.ini000066400000000000000000000002251167050556700327710ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:50:pom:3.4-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_51_1.6.2-SNAPSHOT_pom.ini000066400000000000000000000001771167050556700331370ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_52_1.8-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700327730ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_52_2.5-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700327710ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_53_2.3.0.677-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700334500ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_54_0.1.36-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700332140ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_55_3.8.1-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331370ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_55_4.4-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700327750ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_55_4.8.2-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331410ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_56_1.2-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700327710ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_57_4.0.5-SNAPSHOT_pom.ini000066400000000000000000000003601167050556700331370ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:58:pom:2.4.7-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:28:pom:4.1-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:11:pom:4.1-SNAPSHOT 1_58_2.4.7-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331430ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_59_1.0.1-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331310ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_5_1.5-SNAPSHOT_pom.ini000066400000000000000000000001521167050556700327060ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_5_1.6-SNAPSHOT_pom.ini000066400000000000000000000001521167050556700327070ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_60_0.2.9-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331320ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_61_1.1-SNAPSHOT_pom.ini000066400000000000000000000002241167050556700327640ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.6-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_61_1.2.12-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700332060ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_63_1.1-SNAPSHOT_pom.ini000066400000000000000000000000441167050556700327660ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:5:pom:1.6-SNAPSHOT 1_63_1.3-SNAPSHOT_pom.ini000066400000000000000000000001771167050556700327770ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_64_1.3-SNAPSHOT_pom.ini000066400000000000000000000001771167050556700330000ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_65_2.1.0-SNAPSHOT_pom.ini000066400000000000000000000001771167050556700331360ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_66_0.11-SNAPSHOT_pom.ini000066400000000000000000000001771167050556700330600ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_67_1.6.5-SNAPSHOT_pom.ini000066400000000000000000000002541167050556700331450ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_68_3.8.1-SNAPSHOT_pom.ini000066400000000000000000000001771167050556700331520ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_69_10.1.0-SNAPSHOT_pom.ini000066400000000000000000000002001167050556700332040ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:41:pom:5.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_69_11.1.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700332130ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_69_8.1.7-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331500ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_69_9.0.1-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700331420ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_6_1.5.8-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330550ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_70_9.0-SNAPSHOT_pom.ini000066400000000000000000000001771167050556700330020ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_71_1.1.3.8-SNAPSHOT_pom.ini000066400000000000000000000004331167050556700332760ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:5:pom:1.6-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_71_1.1.4.C-SNAPSHOT_pom.ini000066400000000000000000000004331167050556700333120ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:57:pom:4.0.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:5:pom:1.6-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_73_2.3.1-SNAPSHOT_pom.ini000066400000000000000000000004331167050556700331330ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:74:pom:3.2.0-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:5:pom:1.6-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_73_2.4.1-SNAPSHOT_pom.ini000066400000000000000000000004331167050556700331340ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:74:pom:3.5.0-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:31:pom:2.2-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:5:pom:1.6-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_74_3.2.0-SNAPSHOT_pom.ini000066400000000000000000000003011167050556700331250ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:75:pom:25-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_74_3.5.0-SNAPSHOT_pom.ini000066400000000000000000000003011167050556700331300ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:75:pom:26-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_75_25-SNAPSHOT_pom.ini000066400000000000000000000003621167050556700327230ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_75_26-SNAPSHOT_pom.ini000066400000000000000000000003621167050556700327240ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:13:pom:1.7.0-SNAPSHOT 1:50:pom:3.3-SNAPSHOT 1:50:pom:3.4-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:5:pom:1.5-SNAPSHOT 1:71:pom:1.1.3.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_76_1.0-SNAPSHOT_pom.ini000066400000000000000000000001771167050556700330000ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_77_1.45-SNAPSHOT_pom.ini000066400000000000000000000002251167050556700330640ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:45:pom:3.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_78_2.6-SNAPSHOT_pom.ini000066400000000000000000000001771167050556700330110ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_79_0.7.2-SNAPSHOT_pom.ini000066400000000000000000000001771167050556700331510ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_7_5.8.8-SNAPSHOT_pom.ini000066400000000000000000000002561167050556700330720ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:8:pom:2.7.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:36:pom:2.0-SNAPSHOT 1:37:pom:5.5-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_7_5.8.9-SNAPSHOT_pom.ini000066400000000000000000000003051167050556700330660ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:8:pom:2.7.0-SNAPSHOT 1:17:pom:1.2.3-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:36:pom:2.0-SNAPSHOT 1:37:pom:5.5-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_82_9.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700327760ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_83_1.10.0-SNAPSHOT_pom.ini000066400000000000000000000003111167050556700332030ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:8:pom:2.7.0-SNAPSHOT 1:26:pom:3.0.1-SNAPSHOT 1:2:pom:5.50-SNAPSHOT 1:84:pom:2.2.0036-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_84_2.2.0036-SNAPSHOT_pom.ini000066400000000000000000000000461167050556700333640ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:6:pom:1.5.8-SNAPSHOT 1_85_6.4-SNAPSHOT_pom.ini000066400000000000000000000001521167050556700330020ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:45:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_85_9.1-SNAPSHOT_pom.ini000066400000000000000000000000461167050556700330040ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 10:11:pom:4.0-SNAPSHOT 1_85_9.53.busObj.CR.1-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700347560ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_86_7.13.2-SNAPSHOT_pom.ini000066400000000000000000000001771167050556700332330ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_87_6b-SNAPSHOT_pom.ini000066400000000000000000000001771167050556700330130ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_88_3.5-SNAPSHOT_pom.ini000066400000000000000000000002261167050556700330050ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 1:89:pom:2.3-SNAPSHOT 10:90:pom:1.0-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_89_2.3-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330010ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_8_2.1.0-SNAPSHOT_pom.ini000066400000000000000000000001771167050556700330530ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_8_2.7.0-SNAPSHOT_pom.ini000066400000000000000000000001771167050556700330610ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_91_1.5-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700327730ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_92_1.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700327670ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_93_10.0-SNAPSHOT_pom.ini000066400000000000000000000001511167050556700330470ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_94_4.0-SNAPSHOT_pom.ini000066400000000000000000000000451167050556700327750ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:94:pom:6.0-SNAPSHOT 1_94_6.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700327760ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_95_7.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330000ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_95_7.1-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330010ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_95_8.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330010ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_96_8.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330020ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_97_3.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700327760ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_98_6.0-SNAPSHOT_pom.ini000066400000000000000000000000171167050556700330020ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1_99_1.0-SNAPSHOT_pom.ini000066400000000000000000000001771167050556700330050ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:2:pom:5.50-SNAPSHOT 1:9:pom:3.1-SNAPSHOT 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT 1_9_3.1-SNAPSHOT_pom.ini000066400000000000000000000001241167050556700327070ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle-big[dependencies] 1:6:pom:1.5.8-SNAPSHOT 1:7:pom:5.8.8-SNAPSHOT 10:11:pom:4.0-SNAPSHOT aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle.txt000066400000000000000000000003351167050556700272120ustar00rootroot00000000000000cycle:root:jar:1 +- (a)cycle:a:jar:1:compile | \- cycle:b:jar:1:compile | \- cycle:c:jar:1:compile | \- ^a \- (b)cycle:b:jar:1:compile \- cycle:c:jar:1:compile \- cycle:a:jar:1:compile \- ^b aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle_a_1_jar.ini000066400000000000000000000000351167050556700305230ustar00rootroot00000000000000[dependencies] cycle:b:jar:1 aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle_b_1_jar.ini000066400000000000000000000000351167050556700305240ustar00rootroot00000000000000[dependencies] cycle:c:jar:1 aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle_c_1_jar.ini000066400000000000000000000000351167050556700305250ustar00rootroot00000000000000[dependencies] cycle:a:jar:1 aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/cycle_root_1_jar.ini000066400000000000000000000000531167050556700312660ustar00rootroot00000000000000[dependencies] cycle:a:jar:1 cycle:b:jar:1 duplicate_transitive_dependency_ext.ini000066400000000000000000000000571167050556700352750ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions[dependencies] gid:aid:ext:ver gid:aid2:ext:veraether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/expectedPartialSubtreeOnError.txt000066400000000000000000000002531167050556700340710ustar00rootroot00000000000000subtree:comparison:ext:error +- duplicate:transitive:ext:dependency:compile +- gid:aid:ext:ver:compile | \- gid:aid2:ext:ver:compile \- gid:aid2:ext:ver:compile expectedSubtreeComparisonResult.txt000066400000000000000000000003431167050556700344200ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptionssubtree:comparison:ext:ver +- duplicate:transitive:ext:dependency:compile | +- gid:aid:ext:ver:compile | | \- gid:aid2:ext:ver:compile | \- gid:aid2:ext:ver:compile \- gid:aid:ext:ver:compile \- gid:aid2:ext:ver:compile aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/gid_aid2_managedVersion_ext.ini000066400000000000000000000000171167050556700334140ustar00rootroot00000000000000[dependencies] aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/gid_aid2_ver_ext.ini000066400000000000000000000000171167050556700312460ustar00rootroot00000000000000[dependencies] aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/gid_aid_ver_ext.ini000066400000000000000000000000401167050556700311600ustar00rootroot00000000000000[dependencies] gid:aid2:ext:ver aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/managed/000077500000000000000000000000001167050556700267455ustar00rootroot00000000000000duplicate_transitive_managed_ext.ini000066400000000000000000000000571167050556700361470ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/managed[dependencies] gid:aid:ext:ver gid:aid2:ext:veraether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/managed/gid_aid2_managed_ext.ini000066400000000000000000000000171167050556700334420ustar00rootroot00000000000000[dependencies] aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/managed/gid_aid_ver_ext.ini000066400000000000000000000000401167050556700325540ustar00rootroot00000000000000[dependencies] gid:aid2:ext:ver subtree_comparison_ver_ext.ini000066400000000000000000000001031167050556700350200ustar00rootroot00000000000000aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/managed[dependencies] duplicate:transitive:ext:dependency gid:aid:ext:ver aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/managed_aid_ver_ext.ini000066400000000000000000000001361167050556700320170ustar00rootroot00000000000000[dependencies] gid:aid:ext:ver [manageddependencies] gid:aid2:ext:managedVersion:managedScopeaether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/missing_description_ver_ext.ini000066400000000000000000000000611167050556700336570ustar00rootroot00000000000000[dependencies] missing:artifact:file:description aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/subtree_comparison_error_ext.ini000066400000000000000000000001031167050556700340400ustar00rootroot00000000000000[dependencies] duplicate:transitive:ext:dependency git:aid:ext:ver aether-1.13.1/aether-impl/src/test/resources/artifact-descriptions/subtree_comparison_ver_ext.ini000066400000000000000000000001031167050556700335030ustar00rootroot00000000000000[dependencies] duplicate:transitive:ext:dependency gid:aid:ext:ver aether-1.13.1/aether-spi/000077500000000000000000000000001167050556700151225ustar00rootroot00000000000000aether-1.13.1/aether-spi/pom.xml000066400000000000000000000025721167050556700164450ustar00rootroot00000000000000 4.0.0 org.sonatype.aether aether 1.13.1 aether-spi Aether :: SPI The service provider interface for repository system implementations and repository connectors. org.sonatype.aether aether-api org.codehaus.mojo animal-sniffer-maven-plugin org.codehaus.mojo clirr-maven-plugin aether-1.13.1/aether-spi/src/000077500000000000000000000000001167050556700157115ustar00rootroot00000000000000aether-1.13.1/aether-spi/src/main/000077500000000000000000000000001167050556700166355ustar00rootroot00000000000000aether-1.13.1/aether-spi/src/main/java/000077500000000000000000000000001167050556700175565ustar00rootroot00000000000000aether-1.13.1/aether-spi/src/main/java/org/000077500000000000000000000000001167050556700203455ustar00rootroot00000000000000aether-1.13.1/aether-spi/src/main/java/org/sonatype/000077500000000000000000000000001167050556700222075ustar00rootroot00000000000000aether-1.13.1/aether-spi/src/main/java/org/sonatype/aether/000077500000000000000000000000001167050556700234575ustar00rootroot00000000000000aether-1.13.1/aether-spi/src/main/java/org/sonatype/aether/spi/000077500000000000000000000000001167050556700242525ustar00rootroot00000000000000aether-1.13.1/aether-spi/src/main/java/org/sonatype/aether/spi/connector/000077500000000000000000000000001167050556700262445ustar00rootroot00000000000000aether-1.13.1/aether-spi/src/main/java/org/sonatype/aether/spi/connector/ArtifactDownload.java000066400000000000000000000200451167050556700323350ustar00rootroot00000000000000package org.sonatype.aether.spi.connector; /******************************************************************************* * 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.Collection; import java.util.Collections; import java.util.List; import org.sonatype.aether.RequestTrace; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.transfer.ArtifactTransferException; /** * A download of an artifact from a remote repository. A repository connector processing this download has to use * {@link #setState(State)}, {@link #setException(ArtifactTransferException)} and * {@link #setSupportedContexts(Collection)} (if applicable) to report the results of the transfer. * * @author Benjamin Bentmann */ public class ArtifactDownload extends ArtifactTransfer { private boolean existenceCheck; private String checksumPolicy = ""; private String context = ""; private Collection contexts = Collections.emptySet(); private List repositories = Collections.emptyList(); /** * Creates a new uninitialized download. */ public ArtifactDownload() { // enables default constructor } /** * Creates a new download with the specified properties. * * @param artifact The artifact to download, may be {@code null}. * @param context The context in which this download is performed, may be {@code null}. * @param file The local file to download the artifact to, may be {@code null}. * @param checksumPolicy The checksum policy, may be {@code null}. */ public ArtifactDownload( Artifact artifact, String context, File file, String checksumPolicy ) { setArtifact( artifact ); setRequestContext( context ); setFile( file ); setChecksumPolicy( checksumPolicy ); } @Override public ArtifactDownload setArtifact( Artifact artifact ) { super.setArtifact( artifact ); return this; } /** * {@inheritDoc} Note: In case of {@link #isExistenceCheck()}, this method may return {@code null}. */ @Override public File getFile() { return super.getFile(); } @Override public ArtifactDownload setFile( File file ) { super.setFile( file ); return this; } /** * Indicates whether this transfer shall only verify the existence of the artifact in the remote repository rather * than actually downloading the file. Just like with an actual transfer, a connector is expected to signal the * non-existence of the artifact by associating an {@link org.sonatype.aether.transfer.ArtifactNotFoundException * ArtifactNotFoundException} with this download. Note: If an existence check is requested, * {@link #getFile()} may be {@code null}, i.e. the connector must not try to access the local file. * * @return {@code true} if only the artifact existence shall be verified, {@code false} to actually download the * artifact. */ public boolean isExistenceCheck() { return existenceCheck; } /** * Controls whether this transfer shall only verify the existence of the artifact in the remote repository rather * than actually downloading the file. * * @param existenceCheck {@code true} if only the artifact existence shall be verified, {@code false} to actually * download the artifact. * @return This transfer for chaining, never {@code null}. */ public ArtifactDownload setExistenceCheck( boolean existenceCheck ) { this.existenceCheck = existenceCheck; return this; } /** * Gets the checksum policy for this transfer. * * @return The checksum policy, never {@code null}. */ public String getChecksumPolicy() { return checksumPolicy; } /** * Sets the checksum policy for this transfer. * * @param checksumPolicy The checksum policy, may be {@code null}. * @return This transfer for chaining, never {@code null}. */ public ArtifactDownload setChecksumPolicy( String checksumPolicy ) { this.checksumPolicy = ( checksumPolicy != null ) ? checksumPolicy : ""; return this; } /** * Gets the context of this transfer. * * @return The context id, never {@code null}. */ public String getRequestContext() { return context; } /** * Sets the context of this transfer. * * @param context The context id, may be {@code null}. * @return This transfer for chaining, never {@code null}. */ public ArtifactDownload setRequestContext( String context ) { this.context = ( context != null ) ? context : ""; if ( State.NEW.equals( getState() ) ) { contexts = Collections.singleton( context ); } return this; } /** * Gets the set of request contexts in which the artifact is generally available. Repository managers can indicate * that an artifact is available in more than the requested context to avoid future remote trips for the same * artifact in a different context. * * @return The set of requests context in which the artifact is available, never {@code null}. */ public Collection getSupportedContexts() { return contexts; } /** * Sets the set of request contexts in which the artifact is generally available. Repository managers can indicate * that an artifact is available in more than the requested context to avoid future remote trips for the same * artifact in a different context. The set of supported contexts defaults to the original request context if not * overridden by the repository connector. * * @param contexts The set of requests context in which the artifact is available, may be {@code null}. * @return This transfer for chaining, never {@code null}. */ public ArtifactDownload setSupportedContexts( Collection contexts ) { if ( contexts == null || contexts.isEmpty() ) { this.contexts = Collections.singleton( context ); } else { this.contexts = contexts; } return this; } /** * Gets the remote repositories that are being aggregated by the physically contacted remote repository (i.e. a * repository manager). * * @return The remote repositories being aggregated, never {@code null}. */ public List getRepositories() { return repositories; } /** * Sets the remote repositories that are being aggregated by the physically contacted remote repository (i.e. a * repository manager). * * @param repositories The remote repositories being aggregated, may be {@code null}. * @return This transfer for chaining, never {@code null}. */ public ArtifactDownload setRepositories( List repositories ) { if ( repositories == null ) { this.repositories = Collections.emptyList(); } else { this.repositories = repositories; } return this; } @Override public ArtifactDownload setException( ArtifactTransferException exception ) { super.setException( exception ); return this; } @Override public ArtifactDownload setTrace( RequestTrace trace ) { super.setTrace( trace ); return this; } @Override public String toString() { return getState() + " " + getArtifact() + " - " + ( isExistenceCheck() ? "?" : "" ) + getFile(); } } aether-1.13.1/aether-spi/src/main/java/org/sonatype/aether/spi/connector/ArtifactTransfer.java000066400000000000000000000054541167050556700323610ustar00rootroot00000000000000package org.sonatype.aether.spi.connector; /******************************************************************************* * 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 org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.transfer.ArtifactTransferException; /** * A download/upload of an artifact. * * @author Benjamin Bentmann */ public abstract class ArtifactTransfer extends Transfer { private Artifact artifact; private File file; private ArtifactTransferException exception; /** * Gets the artifact being transferred. * * @return The artifact being transferred or {@code null} if not set. */ public Artifact getArtifact() { return artifact; } /** * Sets the artifact to transfer. * * @param artifact The artifact, may be {@code null}. * @return This transfer for chaining, never {@code null}. */ public ArtifactTransfer setArtifact( Artifact artifact ) { this.artifact = artifact; return this; } /** * Gets the local file the artifact is downloaded to or uploaded from. In case of a download, a connector should * first transfer the bytes to a temporary file and only overwrite the target file once the entire download is * completed such that an interrupted/failed download does not corrupt the current file contents. * * @return The local file or {@code null} if not set. */ public File getFile() { return file; } /** * Sets the local file the artifact is downloaded to or uploaded from. * * @param file The local file, may be {@code null}. * @return This transfer for chaining, never {@code null}. */ public ArtifactTransfer setFile( File file ) { this.file = file; return this; } /** * Gets the exception that occurred during the transfer (if any). * * @return The exception or {@code null} if the transfer was successful. */ public ArtifactTransferException getException() { return exception; } /** * Sets the exception that occurred during the transfer. * * @param exception The exception, may be {@code null} to denote a successful transfer. * @return This transfer for chaining, never {@code null}. */ public ArtifactTransfer setException( ArtifactTransferException exception ) { this.exception = exception; return this; } } aether-1.13.1/aether-spi/src/main/java/org/sonatype/aether/spi/connector/ArtifactUpload.java000066400000000000000000000042401167050556700320110ustar00rootroot00000000000000package org.sonatype.aether.spi.connector; /******************************************************************************* * 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 org.sonatype.aether.RequestTrace; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.transfer.ArtifactTransferException; /** * An upload of an artifact to a remote repository. A repository connector processing this upload has to use * {@link #setState(State)} and {@link #setException(ArtifactTransferException)} to report the results of the transfer. * * @author Benjamin Bentmann */ public class ArtifactUpload extends ArtifactTransfer { /** * Creates a new uninitialized upload. */ public ArtifactUpload() { // enables default constructor } /** * Creates a new upload with the specified properties. * * @param artifact The artifact to upload, may be {@code null}. * @param file The local file to upload the artifact from, may be {@code null}. */ public ArtifactUpload( Artifact artifact, File file ) { setArtifact( artifact ); setFile( file ); } @Override public ArtifactUpload setArtifact( Artifact artifact ) { super.setArtifact( artifact ); return this; } @Override public ArtifactUpload setFile( File file ) { super.setFile( file ); return this; } @Override public ArtifactUpload setException( ArtifactTransferException exception ) { super.setException( exception ); return this; } @Override public ArtifactUpload setTrace( RequestTrace trace ) { super.setTrace( trace ); return this; } @Override public String toString() { return getState() + " " + getArtifact() + " - " + getFile(); } } aether-1.13.1/aether-spi/src/main/java/org/sonatype/aether/spi/connector/MetadataDownload.java000066400000000000000000000114401167050556700323170ustar00rootroot00000000000000package org.sonatype.aether.spi.connector; /******************************************************************************* * 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.Collections; import java.util.List; import org.sonatype.aether.RequestTrace; import org.sonatype.aether.metadata.Metadata; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.transfer.MetadataTransferException; /** * A download of metadata from a remote repository. A repository connector processing this download has to use * {@link #setState(State)} and {@link #setException(MetadataTransferException)} to report the results of the transfer. * * @author Benjamin Bentmann */ public class MetadataDownload extends MetadataTransfer { private String checksumPolicy = ""; private String context = ""; private List repositories = Collections.emptyList(); /** * Creates a new uninitialized download. */ public MetadataDownload() { // enables default constructor } /** * Creates a new download with the specified properties. * * @param metadata The metadata to download, may be {@code null}. * @param context The context in which this download is performed, may be {@code null}. * @param file The local file to download the metadata to, may be {@code null}. * @param checksumPolicy The checksum policy, may be {@code null}. */ public MetadataDownload( Metadata metadata, String context, File file, String checksumPolicy ) { setMetadata( metadata ); setFile( file ); setChecksumPolicy( checksumPolicy ); setRequestContext( context ); } @Override public MetadataDownload setMetadata( Metadata metadata ) { super.setMetadata( metadata ); return this; } @Override public MetadataDownload setFile( File file ) { super.setFile( file ); return this; } /** * Gets the checksum policy for this transfer. * * @return The checksum policy, never {@code null}. */ public String getChecksumPolicy() { return checksumPolicy; } /** * Sets the checksum policy for this transfer. * * @param checksumPolicy The checksum policy, may be {@code null}. * @return This transfer for chaining, never {@code null}. */ public MetadataDownload setChecksumPolicy( String checksumPolicy ) { this.checksumPolicy = ( checksumPolicy != null ) ? checksumPolicy : ""; return this; } /** * Gets the context of this transfer. * * @return The context id, never {@code null}. */ public String getRequestContext() { return context; } /** * Sets the request context of this transfer. * * @param context The context id, may be {@code null}. * @return This transfer for chaining, never {@code null}. */ public MetadataDownload setRequestContext( String context ) { this.context = ( context != null ) ? context : ""; return this; } /** * Gets the remote repositories that are being aggregated by the physically contacted remote repository (i.e. a * repository manager). * * @return The remote repositories being aggregated, never {@code null}. */ public List getRepositories() { return repositories; } /** * Sets the remote repositories that are being aggregated by the physically contacted remote repository (i.e. a * repository manager). * * @param repositories The remote repositories being aggregated, may be {@code null}. * @return This transfer for chaining, never {@code null}. */ public MetadataDownload setRepositories( List repositories ) { if ( repositories == null ) { this.repositories = Collections.emptyList(); } else { this.repositories = repositories; } return this; } @Override public MetadataDownload setException( MetadataTransferException exception ) { super.setException( exception ); return this; } @Override public MetadataDownload setTrace( RequestTrace trace ) { super.setTrace( trace ); return this; } @Override public String toString() { return getState() + " " + getMetadata() + " - " + getFile(); } } aether-1.13.1/aether-spi/src/main/java/org/sonatype/aether/spi/connector/MetadataTransfer.java000066400000000000000000000054511167050556700323410ustar00rootroot00000000000000package org.sonatype.aether.spi.connector; /******************************************************************************* * 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 org.sonatype.aether.metadata.Metadata; import org.sonatype.aether.transfer.MetadataTransferException; /** * A download/upload of metadata. * * @author Benjamin Bentmann */ public abstract class MetadataTransfer extends Transfer { private Metadata metadata; private File file; private MetadataTransferException exception; /** * Gets the metadata being transferred. * * @return The metadata being transferred or {@code null} if not set. */ public Metadata getMetadata() { return metadata; } /** * Sets the metadata to transfer. * * @param metadata The metadata, may be {@code null}. * @return This transfer for chaining, never {@code null}. */ public MetadataTransfer setMetadata( Metadata metadata ) { this.metadata = metadata; return this; } /** * Gets the local file the metadata is downloaded to or uploaded from. In case of a download, a connector should * first transfer the bytes to a temporary file and only overwrite the target file once the entire download is * completed such that an interrupted/failed download does not corrupt the current file contents. * * @return The local file or {@code null} if not set. */ public File getFile() { return file; } /** * Sets the local file the metadata is downloaded to or uploaded from. * * @param file The local file, may be {@code null}. * @return This transfer for chaining, never {@code null}. */ public MetadataTransfer setFile( File file ) { this.file = file; return this; } /** * Gets the exception that occurred during the transfer (if any). * * @return The exception or {@code null} if the transfer was successful. */ public MetadataTransferException getException() { return exception; } /** * Sets the exception that occurred during the transfer. * * @param exception The exception, may be {@code null} to denote a successful transfer. * @return This transfer for chaining, never {@code null}. */ public MetadataTransfer setException( MetadataTransferException exception ) { this.exception = exception; return this; } } aether-1.13.1/aether-spi/src/main/java/org/sonatype/aether/spi/connector/MetadataUpload.java000066400000000000000000000042351167050556700320000ustar00rootroot00000000000000package org.sonatype.aether.spi.connector; /******************************************************************************* * 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 org.sonatype.aether.RequestTrace; import org.sonatype.aether.metadata.Metadata; import org.sonatype.aether.transfer.MetadataTransferException; /** * An upload of metadata to a remote repository. A repository connector processing this upload has to use * {@link #setState(State)} and {@link #setException(MetadataTransferException)} to report the results of the transfer. * * @author Benjamin Bentmann */ public class MetadataUpload extends MetadataTransfer { /** * Creates a new uninitialized upload. */ public MetadataUpload() { // enables default constructor } /** * Creates a new upload with the specified properties. * * @param metadata The metadata to upload, may be {@code null}. * @param file The local file to upload the metadata from, may be {@code null}. */ public MetadataUpload( Metadata metadata, File file ) { setMetadata( metadata ); setFile( file ); } @Override public MetadataUpload setMetadata( Metadata metadata ) { super.setMetadata( metadata ); return this; } @Override public MetadataUpload setFile( File file ) { super.setFile( file ); return this; } @Override public MetadataUpload setException( MetadataTransferException exception ) { super.setException( exception ); return this; } @Override public MetadataUpload setTrace( RequestTrace trace ) { super.setTrace( trace ); return this; } @Override public String toString() { return getState() + " " + getMetadata() + " - " + getFile(); } } aether-1.13.1/aether-spi/src/main/java/org/sonatype/aether/spi/connector/RepositoryConnector.java000066400000000000000000000063711167050556700331500ustar00rootroot00000000000000package org.sonatype.aether.spi.connector; /******************************************************************************* * 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; /** * A connector for a remote repository. The connector is responsible for downloading/uploading of artifacts and metadata * from/to a remote repository. Besides performing the actual transfer and recording any exception encountered in the * provided upload/download objects, a connector must also use * {@link Transfer#setState(org.sonatype.aether.spi.connector.Transfer.State)} to update the state of a transfer during * its processing. Furthermore, the connector must notify any {@link org.sonatype.aether.transfer.TransferListener * TransferListener} configured on its associated {@link org.sonatype.aether.RepositorySystemSession * RepositorySystemSession}. If applicable, a connector should obey connect/request timeouts and other relevant settings * from the configuration properties of the repository system session. While a connector itself can use multiple threads * internally to performs the transfers, clients must not call a connector concurrently, i.e. connectors are generally * not thread-safe. * * @author Benjamin Bentmann * @see org.sonatype.aether.RepositorySystemSession#getConfigProperties() */ public interface RepositoryConnector { /** * Performs the specified downloads. Any error encountered during a transfer can later be queried via * {@link ArtifactDownload#getException()} and {@link MetadataDownload#getException()}, respectively. The connector * may perform the transfers concurrently and in any order. * * @param artifactDownloads The artifact downloads to perform, may be {@code null} or empty. * @param metadataDownloads The metadata downloads to perform, may be {@code null} or empty. */ void get( Collection artifactDownloads, Collection metadataDownloads ); /** * Performs the specified uploads. Any error encountered during a transfer can later be queried via * {@link ArtifactDownload#getException()} and {@link MetadataDownload#getException()}, respectively. The connector * may perform the transfers concurrently and in any order. * * @param artifactUploads The artifact uploads to perform, may be {@code null} or empty. * @param metadataUploads The metadata uploads to perform, may be {@code null} or empty. */ void put( Collection artifactUploads, Collection metadataUploads ); /** * Closes this connector and frees any network resources associated with it. Once closed, a connector must not be * used for further transfers, any attempt to do so would yield a {@link IllegalStateException} or similar. Closing * an already closed connector is harmless and has no effect. */ void close(); } RepositoryConnectorFactory.java000066400000000000000000000047541167050556700344240ustar00rootroot00000000000000aether-1.13.1/aether-spi/src/main/java/org/sonatype/aether/spi/connectorpackage org.sonatype.aether.spi.connector; /******************************************************************************* * 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; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.transfer.NoRepositoryConnectorException; /** * A factory to create repository connectors. A repository connector is responsible for uploads/downloads to/from a * certain kind of remote repository. When the repository system needs a repository connector for a given remote * repository, it iterates the registered factories in descending order of their priority and calls * {@link #newInstance(RepositorySystemSession, RemoteRepository)} on them. The first connector returned by a factory * will then be used for the transfer. * * @author Benjamin Bentmann */ public interface RepositoryConnectorFactory { /** * Tries to create a repository connector for the specified remote repository. Typically, a factory will inspect * {@link RemoteRepository#getProtocol()} and {@link RemoteRepository#getContentType()} to determine whether it can * handle a repository. * * @param session The repository system session from which to configure the connector, must not be {@code null}. In * particular, a connector must notify any {@link RepositorySystemSession#getTransferListener()} set for * the session and should obey the timeouts configured for the session. * @param repository The remote repository to create a connector for, must not be {@code null}. * @return The connector for the given repository, never {@code null}. * @throws NoRepositoryConnectorException If the factory cannot create a connector for the specified remote * repository. */ RepositoryConnector newInstance( RepositorySystemSession session, RemoteRepository repository ) throws NoRepositoryConnectorException; /** * The priority of this factory. Factories with higher priority are preferred over those with lower priority. * * @return The priority of this factory. */ int getPriority(); } aether-1.13.1/aether-spi/src/main/java/org/sonatype/aether/spi/connector/Transfer.java000066400000000000000000000045271167050556700307030ustar00rootroot00000000000000package org.sonatype.aether.spi.connector; /******************************************************************************* * 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.RequestTrace; /** * An artifact/metadata transfer. * * @author Benjamin Bentmann */ public abstract class Transfer { /** * The state of a transfer. */ public enum State { /** * Transfer has not started yet. */ NEW, /** * Transfer is in progress. */ ACTIVE, /** * Transfer is over, either successfully or not. */ DONE } private State state = State.NEW; private RequestTrace trace; /** * Gets the state of this transfer. * * @return The state of this transfer, never {@code null}. */ public State getState() { return state; } /** * Sets the state of this transfer. * * @param state The new state, must not be {@code null}. * @return This transfer for chaining, never {@code null}. */ public Transfer setState( State state ) { if ( state == null ) { throw new IllegalArgumentException( "no transfer state specified" ); } this.state = state; return this; } /** * Gets the trace information that describes the higher level request/operation in which this transfer 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 transfer is issued. * * @param trace The trace information about the higher level operation, may be {@code null}. * @return This transfer for chaining, never {@code null}. */ public Transfer setTrace( RequestTrace trace ) { this.trace = trace; return this; } } aether-1.13.1/aether-spi/src/main/java/org/sonatype/aether/spi/io/000077500000000000000000000000001167050556700246615ustar00rootroot00000000000000aether-1.13.1/aether-spi/src/main/java/org/sonatype/aether/spi/io/FileProcessor.java000066400000000000000000000064101167050556700303040ustar00rootroot00000000000000package org.sonatype.aether.spi.io; /******************************************************************************* * 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.io.IOException; import java.nio.ByteBuffer; /** * A utility component to perform file-based operations. * * @author Benjamin Hanzelmann * @author Benjamin Bentmann */ public interface FileProcessor { /** * Creates the directory named by the given abstract pathname, including any necessary but nonexistent parent * directories. Note that if this operation fails it may have succeeded in creating some of the necessary parent * directories. * * @param directory The directory to create, may be {@code null}. * @return {@code true} if and only if the directory was created, along with all necessary parent directories; * {@code false} otherwise */ boolean mkdirs( File directory ); /** * Writes the given data to a file. UTF-8 is assumed as encoding for the data. Creates the necessary directories for * the target file. In case of an error, the created directories will be left on the file system. * * @param file The file to write to, must not be {@code null}. This file will be overwritten. * @param data The data to write, may be {@code null}. * @throws IOException If an I/O error occurs. */ void write( File file, String data ) throws IOException; /** * Copies the specified source file to the given target file. Creates the necessary directories for the target file. * In case of an error, the created directories will be left on the file system. * * @param source The file to copy from, must not be {@code null}. * @param target The file to copy to, must not be {@code null}. * @param listener The listener to notify about the copy progress, may be {@code null}. * @return The number of copied bytes. * @throws IOException If an I/O error occurs. */ long copy( File source, File target, ProgressListener listener ) throws IOException; /** * Moves the specified source file to the given target file. If the target file already exists, it is overwritten. * Creates the necessary directories for the target file. In case of an error, the created directories will be left * on the file system. * * @param source The file to move from, must not be {@code null}. * @param target The file to move to, must not be {@code null}. * @throws IOException If an I/O error occurs. */ void move( File source, File target ) throws IOException; /** * A listener object that is notified for every progress made while copying files. * * @author Benjamin Hanzelmann * @see FileProcessor#copy(File, File, ProgressListener) */ public interface ProgressListener { void progressed( ByteBuffer buffer ) throws IOException; } } aether-1.13.1/aether-spi/src/main/java/org/sonatype/aether/spi/localrepo/000077500000000000000000000000001167050556700262325ustar00rootroot00000000000000LocalRepositoryManagerFactory.java000066400000000000000000000040441167050556700347750ustar00rootroot00000000000000aether-1.13.1/aether-spi/src/main/java/org/sonatype/aether/spi/localrepopackage org.sonatype.aether.spi.localrepo; /******************************************************************************* * 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.repository.LocalRepository; import org.sonatype.aether.repository.LocalRepositoryManager; import org.sonatype.aether.repository.NoLocalRepositoryManagerException; /** * A factory to create managers for the local repository. A local repository manager needs to keep track of artifacts * and metadata and manage access. When the repository system needs a repository manager for a given local repository, * it iterates the registered factories in descending order of their priority and calls * {@link #newInstance(LocalRepository)} on them. The first manager returned by a factory will then be used for the * local repository. */ public interface LocalRepositoryManagerFactory { /** * Tries to create a repository manager for the specified local repository. The distinguishing property of a local * repository is its type, which may for example denote the used directory structure. * * @param repository The local repository to create a manager for, must not be {@code null}. * @return The manager for the given repository, never {@code null}. * @throws NoLocalRepositoryManagerException If the factory cannot create a manager for the specified local * repository. */ LocalRepositoryManager newInstance( LocalRepository repository ) throws NoLocalRepositoryManagerException; /** * The priority of this factory. Factories with higher priority are preferred over those with lower priority. * * @return The priority of this factory. */ int getPriority(); } aether-1.13.1/aether-spi/src/main/java/org/sonatype/aether/spi/locator/000077500000000000000000000000001167050556700257155ustar00rootroot00000000000000aether-1.13.1/aether-spi/src/main/java/org/sonatype/aether/spi/locator/Service.java000066400000000000000000000022171167050556700301620ustar00rootroot00000000000000package org.sonatype.aether.spi.locator; /******************************************************************************* * 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 stateless component of the repository system. The primary purpose of this interface is to provide a convenient * means to programmatically wire the several components of the repository system together when it is used outside of an * IoC container. * * @author Benjamin Bentmann */ public interface Service { /** * Provides the opportunity to initialize this service and to acquire other services for its operation from the * locator. A service must not save the reference to the provided service locator. * * @param locator The service locator, must not be {@code null}. */ void initService( ServiceLocator locator ); } aether-1.13.1/aether-spi/src/main/java/org/sonatype/aether/spi/locator/ServiceLocator.java000066400000000000000000000035151167050556700315100ustar00rootroot00000000000000package org.sonatype.aether.spi.locator; /******************************************************************************* * 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 simple infrastructure to programmatically wire the various components of the repository system together when it is * used outside of an IoC container. Once a concrete implementation of a service locator has been setup, clients could * use * *
 * RepositorySystem repoSystem = serviceLocator.getService( RepositorySystem.class );
 * 
* * to acquire the repository system. Components that implement {@link Service} will be given an opportunity to acquire * further components from the locator, thereby allowing to create the complete object graph of the repository system. * * @author Benjamin Bentmann */ public interface ServiceLocator { /** * Gets an instance of the specified service. * * @param The service type. * @param type The interface describing the service, must not be {@code null}. * @return The service instance or {@code null} if the service could not be located/initialized. */ T getService( Class type ); /** * Gets all available instances of the specified service. * * @param The service type. * @param type The interface describing the service, must not be {@code null}. * @return The (read-only) list of available service instances, never {@code null}. */ List getServices( Class type ); } aether-1.13.1/aether-spi/src/main/java/org/sonatype/aether/spi/log/000077500000000000000000000000001167050556700250335ustar00rootroot00000000000000aether-1.13.1/aether-spi/src/main/java/org/sonatype/aether/spi/log/Logger.java000066400000000000000000000035231167050556700271200ustar00rootroot00000000000000package org.sonatype.aether.spi.log; /******************************************************************************* * 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 simple logger to facilitate emission of diagnostic messages. * * @author Benjamin Bentmann */ public interface Logger { /** * Indicates whether debug logging is enabled. * * @return {@code true} if debug logging is enabled, {@code false} otherwise. */ boolean isDebugEnabled(); /** * Emits the specified message. * * @param msg The message to log, must not be {@code null}. */ void debug( String msg ); /** * Emits the specified message along with a stack trace of the given exception. * * @param msg The message to log, must not be {@code null}. * @param error The exception to log, may be {@code null}. */ void debug( String msg, Throwable error ); /** * Indicates whether warn logging is enabled. * * @return {@code true} if warn logging is enabled, {@code false} otherwise. */ boolean isWarnEnabled(); /** * Emits the specified message. * * @param msg The message to log, must not be {@code null}. */ void warn( String msg ); /** * Emits the specified message along with a stack trace of the given exception. * * @param msg The message to log, must not be {@code null}. * @param error The exception to log, may be {@code null}. */ void warn( String msg, Throwable error ); } aether-1.13.1/aether-spi/src/main/java/org/sonatype/aether/spi/log/NullLogger.java000066400000000000000000000020351167050556700277500ustar00rootroot00000000000000package org.sonatype.aether.spi.log; /******************************************************************************* * 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 logger that disables any logging. * * @author Benjamin Bentmann */ public class NullLogger implements Logger { public static final Logger INSTANCE = new NullLogger(); public boolean isDebugEnabled() { return false; } public void debug( String msg ) { } public void debug( String msg, Throwable error ) { } public boolean isWarnEnabled() { return false; } public void warn( String msg ) { } public void warn( String msg, Throwable error ) { } } aether-1.13.1/aether-test-util/000077500000000000000000000000001167050556700162615ustar00rootroot00000000000000aether-1.13.1/aether-test-util/pom.xml000066400000000000000000000027631167050556700176060ustar00rootroot00000000000000 4.0.0 org.sonatype.aether aether 1.13.1 aether-test-util Aether :: Test Utilities A collection of utility classes to ease testing of the repository system. org.sonatype.aether aether-api org.sonatype.aether aether-spi junit junit compile org.codehaus.mojo animal-sniffer-maven-plugin aether-1.13.1/aether-test-util/src/000077500000000000000000000000001167050556700170505ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/main/000077500000000000000000000000001167050556700177745ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/main/java/000077500000000000000000000000001167050556700207155ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/main/java/org/000077500000000000000000000000001167050556700215045ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/main/java/org/sonatype/000077500000000000000000000000001167050556700233465ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/main/java/org/sonatype/aether/000077500000000000000000000000001167050556700246165ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/main/java/org/sonatype/aether/test/000077500000000000000000000000001167050556700255755ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/main/java/org/sonatype/aether/test/impl/000077500000000000000000000000001167050556700265365ustar00rootroot00000000000000RecordingRepositoryListener.java000066400000000000000000000156041167050556700350520ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/main/java/org/sonatype/aether/test/implpackage org.sonatype.aether.test.impl; /******************************************************************************* * 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.RepositoryEvent; import org.sonatype.aether.RepositoryListener; public class RecordingRepositoryListener implements RepositoryListener { public enum Type { METADATA_DEPLOYED, METADATA_DEPLOYING, ARTIFACT_DEPLOYED, ARTIFACT_DEPLOYING, METADATA_INSTALLED, METADATA_INSTALLING, ARTIFACT_INSTALLED, ARTIFACT_INSTALLING, METADATA_RESOLVED, METADATA_RESOLVING, ARTIFACT_RESOLVED, ARTIFACT_RESOLVING, METADATA_INVALID, ARTIFACT_DESCRIPTOR_MISSING, ARTIFACT_DESCRIPTOR_INVALID } private List events = Collections.synchronizedList( new ArrayList() ); private RepositoryListener realListener; public RecordingRepositoryListener() { this( null ); } public RecordingRepositoryListener( RepositoryListener listener ) { this.realListener = listener; } public List getEvents() { return events; } public void clear() { events.clear(); } public void artifactDescriptorInvalid( RepositoryEvent event ) { Type type = Type.ARTIFACT_DESCRIPTOR_INVALID; this.events.add( new EventWrapper( type, event ) ); if ( realListener != null ) { realListener.artifactDescriptorInvalid( event ); } } public void artifactDescriptorMissing( RepositoryEvent event ) { Type type = Type.ARTIFACT_DESCRIPTOR_MISSING; this.events.add( new EventWrapper( type, event ) ); if ( realListener != null ) { realListener.artifactDescriptorMissing( event ); } } public void metadataInvalid( RepositoryEvent event ) { Type type = Type.METADATA_INVALID; this.events.add( new EventWrapper( type, event ) ); if ( realListener != null ) { realListener.metadataInvalid( event ); } } public void artifactResolving( RepositoryEvent event ) { Type type = Type.ARTIFACT_RESOLVING; this.events.add( new EventWrapper( type, event ) ); if ( realListener != null ) { realListener.artifactResolving( event ); } } public void artifactResolved( RepositoryEvent event ) { Type type = Type.ARTIFACT_RESOLVED; this.events.add( new EventWrapper( type, event ) ); if ( realListener != null ) { realListener.artifactResolved( event ); } } public void artifactDownloading( RepositoryEvent event ) { } public void artifactDownloaded( RepositoryEvent event ) { } public void metadataDownloaded( RepositoryEvent event ) { } public void metadataDownloading( RepositoryEvent event ) { } public void metadataResolving( RepositoryEvent event ) { Type type = Type.METADATA_RESOLVING; this.events.add( new EventWrapper( type, event ) ); if ( realListener != null ) { realListener.metadataResolving( event ); } } public void metadataResolved( RepositoryEvent event ) { Type type = Type.METADATA_RESOLVED; this.events.add( new EventWrapper( type, event ) ); if ( realListener != null ) { realListener.metadataResolved( event ); } } public void artifactInstalling( RepositoryEvent event ) { Type type = Type.ARTIFACT_INSTALLING; this.events.add( new EventWrapper( type, event ) ); if ( realListener != null ) { realListener.artifactInstalling( event ); } } public void artifactInstalled( RepositoryEvent event ) { Type type = Type.ARTIFACT_INSTALLED; this.events.add( new EventWrapper( type, event ) ); if ( realListener != null ) { realListener.artifactInstalled( event ); } } public void metadataInstalling( RepositoryEvent event ) { Type type = Type.METADATA_INSTALLING; this.events.add( new EventWrapper( type, event ) ); if ( realListener != null ) { realListener.metadataInstalling( event ); } } public void metadataInstalled( RepositoryEvent event ) { Type type = Type.METADATA_INSTALLED; this.events.add( new EventWrapper( type, event ) ); if ( realListener != null ) { realListener.metadataInstalled( event ); } } public void artifactDeploying( RepositoryEvent event ) { Type type = Type.ARTIFACT_DEPLOYING; this.events.add( new EventWrapper( type, event ) ); if ( realListener != null ) { realListener.artifactDeploying( event ); } } public void artifactDeployed( RepositoryEvent event ) { Type type = Type.ARTIFACT_DEPLOYED; this.events.add( new EventWrapper( type, event ) ); if ( realListener != null ) { realListener.artifactDeployed( event ); } } public void metadataDeploying( RepositoryEvent event ) { Type type = Type.METADATA_DEPLOYING; this.events.add( new EventWrapper( type, event ) ); if ( realListener != null ) { realListener.metadataDeploying( event ); } } public void metadataDeployed( RepositoryEvent event ) { Type type = Type.METADATA_DEPLOYED; this.events.add( new EventWrapper( type, event ) ); if ( realListener != null ) { realListener.metadataDeployed( event ); } } public class EventWrapper { Type type; RepositoryEvent event; public EventWrapper( Type type, RepositoryEvent event ) { this.type = type; this.event = event; } public Type getType() { return type; } public RepositoryEvent getEvent() { return event; } @Override public String toString() { Object item = event.getException(); item = item == null ? event.getArtifact() : item; item = item == null ? event.getMetadata() : item; return type.toString() + " (" + item + ")"; } } } RecordingTransferListener.java000066400000000000000000000110561167050556700344540ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/main/java/org/sonatype/aether/test/implpackage org.sonatype.aether.test.impl; /******************************************************************************* * 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.nio.ByteBuffer; import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.sonatype.aether.transfer.TransferCancelledException; import org.sonatype.aether.transfer.TransferEvent; import org.sonatype.aether.transfer.TransferListener; import org.sonatype.aether.transfer.TransferResource; public class RecordingTransferListener implements TransferListener { private List events = Collections.synchronizedList( new ArrayList() ); private List progressEvents = Collections.synchronizedList( new ArrayList() ); private TransferListener realListener; public RecordingTransferListener() { this( null ); } public RecordingTransferListener( TransferListener transferListener ) { this.realListener = transferListener; } public List getEvents() { return events; } public List getProgressEvents() { return progressEvents; } public void transferSucceeded( TransferEvent event ) { events.add( event ); if ( realListener != null ) { realListener.transferSucceeded( event ); } } public void transferStarted( TransferEvent event ) throws TransferCancelledException { events.add( event ); if ( realListener != null ) { realListener.transferStarted( event ); } } public void transferProgressed( TransferEvent event ) throws TransferCancelledException { event = new RecordedTransferEvent( event ); events.add( event ); progressEvents.add( event ); if ( realListener != null ) { realListener.transferProgressed( event ); } } public void transferInitiated( TransferEvent event ) throws TransferCancelledException { events.add( event ); if ( realListener != null ) { realListener.transferInitiated( event ); } } public void transferFailed( TransferEvent event ) { events.add( event ); if ( realListener != null ) { realListener.transferFailed( event ); } } public void transferCorrupted( TransferEvent event ) throws TransferCancelledException { events.add( event ); if ( realListener != null ) { realListener.transferCorrupted( event ); } } public void clear() { events.clear(); progressEvents.clear(); } static class RecordedTransferEvent implements TransferEvent { private final TransferEvent event; private final ByteBuffer buffer; public RecordedTransferEvent( TransferEvent event ) { this.event = event; // the buffer may be reused for future events so we need to clone it for later inspection ByteBuffer buffer = event.getDataBuffer(); if ( buffer != null ) { this.buffer = ByteBuffer.allocate( buffer.remaining() ); this.buffer.put( buffer ); this.buffer.flip(); } else { this.buffer = null; } } public EventType getType() { return event.getType(); } public RequestType getRequestType() { return event.getRequestType(); } public TransferResource getResource() { return event.getResource(); } public long getTransferredBytes() { return event.getTransferredBytes(); } public ByteBuffer getDataBuffer() { return ( buffer != null ) ? buffer.asReadOnlyBuffer() : null; } public int getDataLength() { return ( buffer != null ) ? buffer.remaining() : 0; } public Exception getException() { return event.getException(); } } } aether-1.13.1/aether-test-util/src/main/java/org/sonatype/aether/test/impl/SysoutLogger.java000066400000000000000000000023711167050556700320520ustar00rootroot00000000000000package org.sonatype.aether.test.impl; /******************************************************************************* * 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.spi.log.Logger; public final class SysoutLogger implements Logger { public void warn( String msg, Throwable error ) { warn( msg ); if ( error != null ) { error.printStackTrace( System.err ); } } public void warn( String msg ) { System.err.println( msg ); } public boolean isWarnEnabled() { return true; } public boolean isDebugEnabled() { return true; } public void debug( String msg, Throwable error ) { debug( msg ); if ( error != null ) { error.printStackTrace( System.err ); } } public void debug( String msg ) { System.out.println( msg ); } } TestAuthenticationSelector.java000066400000000000000000000016441167050556700346470ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/main/java/org/sonatype/aether/test/implpackage org.sonatype.aether.test.impl; /******************************************************************************* * 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.repository.Authentication; import org.sonatype.aether.repository.AuthenticationSelector; import org.sonatype.aether.repository.RemoteRepository; /** * A simple authentication selector that never provides authentication. */ class TestAuthenticationSelector implements AuthenticationSelector { public Authentication getAuthentication( RemoteRepository repository ) { return null; } } aether-1.13.1/aether-test-util/src/main/java/org/sonatype/aether/test/impl/TestFileProcessor.java000066400000000000000000000074631167050556700330320ustar00rootroot00000000000000package org.sonatype.aether.test.impl; /******************************************************************************* * 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.Closeable; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.nio.ByteBuffer; import org.sonatype.aether.spi.io.FileProcessor; /** * @author Benjamin Bentmann */ public class TestFileProcessor implements FileProcessor { public static final FileProcessor INSTANCE = new TestFileProcessor(); private static void close( Closeable closeable ) { if ( closeable != null ) { try { closeable.close(); } catch ( IOException e ) { // too bad but who cares } } } public boolean mkdirs( File directory ) { if ( directory == null ) { return false; } if ( directory.exists() ) { return false; } if ( directory.mkdir() ) { return true; } File canonDir = null; try { canonDir = directory.getCanonicalFile(); } catch ( IOException e ) { return false; } File parentDir = canonDir.getParentFile(); return ( parentDir != null && ( mkdirs( parentDir ) || parentDir.exists() ) && canonDir.mkdir() ); } public void write( File file, String data ) throws IOException { mkdirs( file.getParentFile() ); FileOutputStream fos = null; try { fos = new FileOutputStream( file ); if ( data != null ) { fos.write( data.getBytes( "UTF-8" ) ); } } finally { close( fos ); } } public long copy( File source, File target, ProgressListener listener ) throws IOException { long total = 0; FileInputStream fis = null; FileOutputStream fos = null; try { fis = new FileInputStream( source ); mkdirs( target.getParentFile() ); fos = new FileOutputStream( target ); ByteBuffer buffer = ByteBuffer.allocate( 1024 * 32 ); byte[] array = buffer.array(); while ( true ) { int bytes = fis.read( array ); if ( bytes < 0 ) { break; } fos.write( array, 0, bytes ); total += bytes; if ( listener != null && bytes > 0 ) { try { buffer.rewind(); buffer.limit( bytes ); listener.progressed( buffer ); } catch ( Exception e ) { // too bad } } } } finally { close( fis ); close( fos ); } return total; } public void move( File source, File target ) throws IOException { target.delete(); if ( !source.renameTo( target ) ) { copy( source, target, null ); target.setLastModified( source.lastModified() ); source.delete(); } } } TestLocalRepositoryManager.java000066400000000000000000000114711167050556700346130ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/main/java/org/sonatype/aether/test/implpackage org.sonatype.aether.test.impl; /******************************************************************************* * 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.io.IOException; import java.util.HashSet; import java.util.Set; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.metadata.Metadata; import org.sonatype.aether.repository.LocalArtifactRegistration; import org.sonatype.aether.repository.LocalArtifactRequest; import org.sonatype.aether.repository.LocalArtifactResult; import org.sonatype.aether.repository.LocalMetadataRegistration; import org.sonatype.aether.repository.LocalMetadataRequest; import org.sonatype.aether.repository.LocalMetadataResult; import org.sonatype.aether.repository.LocalRepository; import org.sonatype.aether.repository.LocalRepositoryManager; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.test.util.TestFileUtils; public class TestLocalRepositoryManager implements LocalRepositoryManager { private LocalRepository localRepository; private Set unavailableArtifacts = new HashSet(); private Set artifactRegistrations = new HashSet(); private Set metadataRegistrations = new HashSet(); public TestLocalRepositoryManager() throws IOException { localRepository = new LocalRepository( TestFileUtils.createTempDir( "test-local-repository" ) ); } public LocalRepository getRepository() { return localRepository; } public String getPathForLocalArtifact( Artifact artifact ) { String artifactId = artifact.getArtifactId(); String groupId = artifact.getGroupId(); String extension = artifact.getExtension(); String version = artifact.getVersion(); String classifier = artifact.getClassifier(); String path = String.format( "%s/%s/%s/%s-%s-%s%s.%s", groupId, artifactId, version, groupId, artifactId, version, classifier, extension ); return path; } public String getPathForRemoteArtifact( Artifact artifact, RemoteRepository repository, String context ) { return getPathForLocalArtifact( artifact ); } public String getPathForLocalMetadata( Metadata metadata ) { String artifactId = metadata.getArtifactId(); String groupId = metadata.getGroupId(); String version = metadata.getVersion(); return String.format( "%s/%s/%s/%s-%s-%s.xml", groupId, artifactId, version, groupId, artifactId, version ); } public String getPathForRemoteMetadata( Metadata metadata, RemoteRepository repository, String context ) { return getPathForLocalMetadata( metadata ); } public LocalArtifactResult find( RepositorySystemSession session, LocalArtifactRequest request ) { Artifact artifact = request.getArtifact(); LocalArtifactResult result = new LocalArtifactResult( request ); File file = new File( localRepository.getBasedir(), getPathForLocalArtifact( artifact ) ); result.setFile( file.isFile() ? file : null ); result.setAvailable( file.isFile() && !unavailableArtifacts.contains( artifact ) ); return result; } public void add( RepositorySystemSession session, LocalArtifactRegistration request ) { artifactRegistrations.add( request.getArtifact() ); } public LocalMetadataResult find( RepositorySystemSession session, LocalMetadataRequest request ) { Metadata metadata = request.getMetadata(); LocalMetadataResult result = new LocalMetadataResult( request ); File file = new File( localRepository.getBasedir(), getPathForLocalMetadata( metadata ) ); result.setFile( file.isFile() ? file : null ); return result; } public void add( RepositorySystemSession session, LocalMetadataRegistration request ) { metadataRegistrations.add( request.getMetadata() ); } public Set getArtifactRegistration() { return artifactRegistrations; } public Set getMetadataRegistration() { return metadataRegistrations; } public void setArtifactAvailability( Artifact artifact, boolean available ) { if ( available ) { unavailableArtifacts.remove( artifact ); } else { unavailableArtifacts.add( artifact ); } } } aether-1.13.1/aether-test-util/src/main/java/org/sonatype/aether/test/impl/TestProxySelector.java000066400000000000000000000015341167050556700330660ustar00rootroot00000000000000package org.sonatype.aether.test.impl; /******************************************************************************* * 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.repository.Proxy; import org.sonatype.aether.repository.ProxySelector; import org.sonatype.aether.repository.RemoteRepository; /** * A proxy selector which never returns any proxy. */ class TestProxySelector implements ProxySelector { public Proxy getProxy( RemoteRepository repository ) { return null; } } TestRepositorySystemSession.java000066400000000000000000000204171167050556700351160ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/main/java/org/sonatype/aether/test/implpackage org.sonatype.aether.test.impl; /******************************************************************************* * 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.IOException; import java.util.Collections; import java.util.HashMap; import java.util.Map; import org.sonatype.aether.RepositoryCache; import org.sonatype.aether.RepositoryException; import org.sonatype.aether.RepositoryListener; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.SessionData; import org.sonatype.aether.artifact.ArtifactTypeRegistry; import org.sonatype.aether.collection.DependencyCollectionContext; import org.sonatype.aether.collection.DependencyGraphTransformationContext; import org.sonatype.aether.collection.DependencyGraphTransformer; import org.sonatype.aether.collection.DependencyManagement; import org.sonatype.aether.collection.DependencyManager; import org.sonatype.aether.collection.DependencySelector; import org.sonatype.aether.collection.DependencyTraverser; import org.sonatype.aether.graph.Dependency; import org.sonatype.aether.graph.DependencyNode; 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; public class TestRepositorySystemSession implements RepositorySystemSession { private SessionData data = new TestSessionData(); private TransferListener listener; private RepositoryListener repositoryListener; private AuthenticationSelector authenticator = new TestAuthenticationSelector(); private ProxySelector proxySelector = new TestProxySelector(); private LocalRepositoryManager localRepositoryManager; private boolean transferErrorCaching; private boolean notFoundCaching; private DependencyManager dependencyManager; private Map configProperties = new HashMap(); private boolean offline; private String updatePolicy = RepositoryPolicy.UPDATE_POLICY_ALWAYS; private String checksumPolicy = RepositoryPolicy.CHECKSUM_POLICY_FAIL; private MirrorSelector mirrorSelector; public TestRepositorySystemSession() throws IOException { localRepositoryManager = new TestLocalRepositoryManager(); } public TransferListener getTransferListener() { return listener; } public Map getConfigProperties() { return Collections.unmodifiableMap( configProperties ); } public void setConfigProperties( Map configProperties ) { if ( configProperties == null ) { this.configProperties = Collections.emptyMap(); } else { this.configProperties = configProperties; } } public boolean isOffline() { return offline; } public boolean isTransferErrorCachingEnabled() { return transferErrorCaching; } public boolean isNotFoundCachingEnabled() { return notFoundCaching; } public boolean isIgnoreMissingArtifactDescriptor() { return false; } public boolean isIgnoreInvalidArtifactDescriptor() { return false; } public String getChecksumPolicy() { return checksumPolicy; } public void setChecksumPolicy( String checksumPolicy ) { this.checksumPolicy = checksumPolicy; } public String getUpdatePolicy() { return updatePolicy; } public void setUpdatePolicy( String updatePolicy ) { this.updatePolicy = updatePolicy; } public LocalRepository getLocalRepository() { return this.localRepositoryManager.getRepository(); } public LocalRepositoryManager getLocalRepositoryManager() { return localRepositoryManager; } public WorkspaceReader getWorkspaceReader() { // throw new UnsupportedOperationException( "getWorkspaceReader()" ); return null; } public RepositoryListener getRepositoryListener() { return repositoryListener; } public Map getSystemProperties() { return Collections.emptyMap(); } public Map getUserProperties() { return Collections.emptyMap(); } public MirrorSelector getMirrorSelector() { return mirrorSelector; } public void setMirrorSelector( MirrorSelector mirrorSelector ) { this.mirrorSelector = mirrorSelector; } public ProxySelector getProxySelector() { return proxySelector; } public void setProxySelector( ProxySelector proxySelector ) { this.proxySelector = proxySelector; } public AuthenticationSelector getAuthenticationSelector() { return authenticator; } public ArtifactTypeRegistry getArtifactTypeRegistry() { return null; } public DependencyTraverser getDependencyTraverser() { return new DependencyTraverser() { public boolean traverseDependency( Dependency dependency ) { return true; } public DependencyTraverser deriveChildTraverser( DependencyCollectionContext context ) { return this; } }; } public DependencyManager getDependencyManager() { if ( dependencyManager == null ) { return new DependencyManager() { public DependencyManagement manageDependency( Dependency dependency ) { return null; } public DependencyManager deriveChildManager( DependencyCollectionContext context ) { return this; } }; } else { return dependencyManager; } } public DependencySelector getDependencySelector() { return new DependencySelector() { public boolean selectDependency( Dependency dependency ) { return true; } public DependencySelector deriveChildSelector( DependencyCollectionContext context ) { return this; } }; } public DependencyGraphTransformer getDependencyGraphTransformer() { return new DependencyGraphTransformer() { public DependencyNode transformGraph( DependencyNode node, DependencyGraphTransformationContext context ) throws RepositoryException { return node; } }; } public SessionData getData() { return data; } public RepositoryCache getCache() { return null; } public void setRepositoryListener( RepositoryListener repositoryListener ) { this.repositoryListener = repositoryListener; } public void setTransferListener( TransferListener listener ) { this.listener = listener; } /** * @param b */ public void setTransferErrorCachingEnabled( boolean b ) { this.transferErrorCaching = b; } /** * @param b */ public void setNotFoundCachingEnabled( boolean b ) { this.notFoundCaching = b; } public void setLocalRepositoryManager( LocalRepositoryManager localRepositoryManager ) { this.localRepositoryManager = localRepositoryManager; } /** * @param manager */ public void setDependencyManager( DependencyManager manager ) { this.dependencyManager = manager; } public void setOffline( boolean offline ) { this.offline = offline; } } aether-1.13.1/aether-test-util/src/main/java/org/sonatype/aether/test/impl/TestSessionData.java000066400000000000000000000033421167050556700324600ustar00rootroot00000000000000package org.sonatype.aether.test.impl; /******************************************************************************* * 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.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import org.sonatype.aether.SessionData; /** * A simple session data storage backed by a {@link ConcurrentHashMap}. * * @author Benjamin Bentmann */ class TestSessionData implements SessionData { private ConcurrentMap data; public TestSessionData() { data = new ConcurrentHashMap(); } public void set( Object key, Object value ) { if ( value != null ) { data.put( key, value ); } else { data.remove( key ); } } public boolean set( Object key, Object oldValue, Object newValue ) { if ( key == null ) { throw new IllegalArgumentException( "key must not be null" ); } if ( newValue != null ) { if ( oldValue == null ) { return data.putIfAbsent( key, newValue ) == null; } return data.replace( key, oldValue, newValue ); } else { return data.remove( key, oldValue ); } } public Object get( Object key ) { return data.get( key ); } } aether-1.13.1/aether-test-util/src/main/java/org/sonatype/aether/test/util/000077500000000000000000000000001167050556700265525ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/main/java/org/sonatype/aether/test/util/ArtifactDefinition.java000066400000000000000000000051031167050556700331620ustar00rootroot00000000000000package org.sonatype.aether.test.util; /******************************************************************************* * 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 *******************************************************************************/ class ArtifactDefinition { private String groupId; private String artifactId; private String extension; private String version; private String scope = ""; private String definition; private String id = null; private String reference = null; private boolean optional = false; public ArtifactDefinition( String def ) { this.definition = def.trim(); if ( definition.startsWith( "(" ) ) { int idx = definition.indexOf( ')' ); this.id = definition.substring( 1, idx ); this.definition = definition.substring( idx + 1 ); } else if ( definition.startsWith( "^" ) ) { this.reference = definition.substring( 1 ); return; } String[] split = definition.split( ":" ); if ( split.length < 4 ) { throw new IllegalArgumentException( "Need definition like 'gid:aid:ext:ver[:scope]', but was: " + definition ); } groupId = split[0]; artifactId = split[1]; extension = split[2]; version = split[3]; if ( split.length > 4 ) { scope = split[4]; } if ( split.length > 5 && "optional".equalsIgnoreCase( split[5] ) ) { optional = true; } } public String getGroupId() { return groupId; } public String getArtifactId() { return artifactId; } public String getExtension() { return extension; } public String getVersion() { return version; } public String getScope() { return scope; } @Override public String toString() { return definition; } public String getId() { return id; } public String getReference() { return reference; } public boolean isReference() { return reference != null; } public boolean hasId() { return id != null; } public boolean isOptional() { return optional; } }aether-1.13.1/aether-test-util/src/main/java/org/sonatype/aether/test/util/ArtifactDescription.java000066400000000000000000000032251167050556700333600ustar00rootroot00000000000000package org.sonatype.aether.test.util; /******************************************************************************* * 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.artifact.Artifact; import org.sonatype.aether.graph.Dependency; import org.sonatype.aether.repository.RemoteRepository; /** * @author Benjamin Hanzelmann * */ public class ArtifactDescription { private List repositories; private List managedDependencies; private List dependencies; private List relocations; ArtifactDescription( List relocations, List dependencies, List managedDependencies, List repositories ) { this.relocations = relocations; this.dependencies = dependencies; this.managedDependencies = managedDependencies; this.repositories = repositories; } public List getRelocations() { return relocations; } public List getRepositories() { return repositories; } public List getManagedDependencies() { return managedDependencies; } public List getDependencies() { return dependencies; } } DependencyGraphParser.java000066400000000000000000000363741167050556700335700ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/main/java/org/sonatype/aether/test/utilpackage org.sonatype.aether.test.util; /******************************************************************************* * 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.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.StringReader; import java.net.URL; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.graph.Dependency; import org.sonatype.aether.graph.DependencyNode; /** * Creates a dependency tree from a text description.

Definition

The description format is based on 'mvn * dependency:tree'. Line format: * *
 * [level]dependencyDefinition[;key=value;key=value;...]
 * 
* * A dependencyDefinition is of the form: * *
 * (id|[(id)]gid:aid:ext:ver[:scope])
 * 
* * It may also be (null) to indicate an "empty" node with no dependency. *

*

Levels

*

* If level is empty, the line defines the root node. Only one root node may be defined. The level is * calculated by the distance from the beginning of the line. One level is three characters. A level definition has to * follow this format: * *

 * '[| ]*[+\\]- '
 * 
* *

ID

An ID may be used to reference a previously built node. An ID is of the form: * *
 * '[0-9a-zA-Z]+'
 * 
* * To define a node with an ID, prefix the definition with an id in parens: * *
 * (id)gid:aid:ext:ver
 * 
* * To insert a previously defined node into the graph, use a caret followed by the ID: * *
 * ^id
 * 
* *

Comments

*

* A hash starts a comment. A comment ends with the end of the line. Empty lines are ignored. *

Example

* *
 * gid:aid:ext:ver
 * +- gid:aid2:ext:ver:scope
 * |  \- (id1)gid:aid3:ext:ver
 * +- gid:aid4:ext:ver:scope
 * \- ^id1
 * 
* *

Multiple definitions in one resource

*

* By using {@link #parseMultiple(String)}, definitions divided by a line beginning with "---" can be read from the same * resource. The rest of the line is ignored. *

Substitutions

*

* You may define substitutions (see {@link #setSubstitutions(String...)}, * {@link #DependencyGraphParser(String, Collection)}). Every '%s' in the definition will be substituted by the next * String in the defined substitutions. *

Example

* *
 * parser.setSubstitutions( "foo", "bar" );
 * String def = "gid:%s:ext:ver\n" + "+- gid:%s:ext:ver";
 * 
* * The first node will have "foo" as its artifact id, the second node (child to the first) will have "bar" as its * artifact id. * * @author Benjamin Hanzelmann */ public class DependencyGraphParser { private Map nodes = new HashMap(); private String prefix = ""; private Collection substitutions; private Iterator substitutionIterator; /** * Parse the given graph definition. */ public DependencyNode parseLiteral( String dependencyGraph ) throws IOException { BufferedReader reader = new BufferedReader( new StringReader( dependencyGraph ) ); DependencyNode node = parse( reader ); reader.close(); return node; } /** * Create a parser with the given prefix and the given substitution strings. * * @see DependencyGraphParser#parse(String) */ public DependencyGraphParser( String prefix, Collection substitutions ) { this.prefix = prefix; this.substitutions = substitutions; } /** * Create a parser with the given prefix. * * @see DependencyGraphParser#parse(String) */ public DependencyGraphParser( String prefix ) { this( prefix, null ); } /** * Create a parser with an empty prefix. */ public DependencyGraphParser() { this( "" ); } /** * Parse the graph definition read from the given resource. If a prefix is set, this method will load the resource * from 'prefix + resource'. */ public DependencyNode parse( String resource ) throws IOException { URL res = this.getClass().getClassLoader().getResource( prefix + resource ); if ( res == null ) { throw new IOException( "Could not find classpath resource " + prefix + resource ); } return parse( res ); } /** * Parse multiple graphs in one resource, divided by "---". */ public List parseMultiple( String resource ) throws IOException { URL res = this.getClass().getClassLoader().getResource( prefix + resource ); if ( res == null ) { throw new IOException( "Could not find classpath resource " + prefix + resource ); } BufferedReader reader = new BufferedReader( new InputStreamReader( res.openStream(), "UTF-8" ) ); List ret = new ArrayList(); DependencyNode root = null; while ( ( root = parse( reader ) ) != null ) { ret.add( root ); } return ret; } /** * Parse the graph definition read from the given URL. */ public DependencyNode parse( URL resource ) throws IOException { InputStream stream = null; try { stream = resource.openStream(); return parse( new BufferedReader( new InputStreamReader( stream, "UTF-8" ) ) ); } finally { if ( stream != null ) { stream.close(); } } } private DependencyNode parse( BufferedReader in ) throws IOException { if ( substitutions != null ) { substitutionIterator = substitutions.iterator(); } String line = null; DependencyNode root = null; DependencyNode node = null; int prevLevel = 0; LinkedList stack = new LinkedList(); boolean isRootNode = true; while ( ( line = in.readLine() ) != null ) { line = cutComment( line ); if ( isEmpty( line ) ) { // skip empty line continue; } if ( isEOFMarker( line ) ) { // stop parsing break; } while ( line.contains( "%s" ) ) { if ( !substitutionIterator.hasNext() ) { throw new IllegalArgumentException( "not enough substitutions to fill placeholders" ); } line = line.replaceFirst( "%s", substitutionIterator.next() ); } LineContext ctx = createContext( line ); if ( prevLevel < ctx.getLevel() ) { // previous node is new parent stack.add( node ); } // get to real parent while ( prevLevel > ctx.getLevel() ) { stack.removeLast(); prevLevel -= 1; } prevLevel = ctx.getLevel(); if ( ctx.getDefinition() != null && ctx.getDefinition().isReference() ) { DependencyNode child = reference( ctx.getDefinition().getReference() ); node.getChildren().add( child ); node = child; } else { node = build( isRootNode ? null : stack.getLast(), ctx, isRootNode ); if ( isRootNode ) { root = node; isRootNode = false; } if ( ctx.getDefinition() != null && ctx.getDefinition().hasId() ) { this.nodes.put( ctx.getDefinition().getId(), node ); } } } this.nodes.clear(); return root; } private boolean isEOFMarker( String line ) { return line.startsWith( "---" ); } private DependencyNode reference( String reference ) { if ( !nodes.containsKey( reference ) ) { throw new IllegalArgumentException( "undefined reference " + reference ); } return this.nodes.get( reference ); } private static boolean isEmpty( String line ) { return line == null || line.length() == 0; } private static String cutComment( String line ) { int idx = line.indexOf( '#' ); if ( idx != -1 ) { line = line.substring( 0, idx ); } return line; } private DependencyNode build( DependencyNode parent, LineContext ctx, boolean isRoot ) { ArtifactDefinition def = ctx.getDefinition(); if ( !isRoot && parent == null ) { throw new IllegalArgumentException( "dangling node: " + def ); } else if ( ctx.getLevel() == 0 && parent != null ) { throw new IllegalArgumentException( "inconsistent leveling (parent for level 0?): " + def ); } NodeBuilder builder = new NodeBuilder(); if ( def != null ) { builder.artifactId( def.getArtifactId() ).groupId( def.getGroupId() ); builder.ext( def.getExtension() ).version( def.getVersion() ).scope( def.getScope() ); builder.properties( ctx.getProperties() ); } DependencyNode node = builder.build(); if ( parent != null ) { parent.getChildren().add( node ); } return node; } public String dump( DependencyNode root ) { StringBuilder ret = new StringBuilder(); List entries = new ArrayList(); addNode( root, 0, entries ); for ( NodeEntry nodeEntry : entries ) { char[] level = new char[( nodeEntry.getLevel() * 3 )]; Arrays.fill( level, ' ' ); if ( level.length != 0 ) { level[level.length - 3] = '+'; level[level.length - 2] = '-'; } String definition = nodeEntry.getDefinition(); ret.append( level ).append( definition ).append( "\n" ); } return ret.toString(); } private void addNode( DependencyNode root, int level, List entries ) { NodeEntry entry = new NodeEntry(); Dependency dependency = root.getDependency(); StringBuilder defBuilder = new StringBuilder(); if ( dependency == null ) { defBuilder.append( "(null)" ); } else { Artifact artifact = dependency.getArtifact(); defBuilder.append( artifact.getGroupId() ).append( ":" ).append( artifact.getArtifactId() ).append( ":" ).append( artifact.getExtension() ).append( ":" ).append( artifact.getVersion() ); if ( dependency.getScope() != null && ( !"".equals( dependency.getScope() ) ) ) { defBuilder.append( ":" ).append( dependency.getScope() ); } Map properties = artifact.getProperties(); if ( !( properties == null || properties.isEmpty() ) ) { for ( Map.Entry prop : properties.entrySet() ) { defBuilder.append( ";" ).append( prop.getKey() ).append( "=" ).append( prop.getValue() ); } } } entry.setDefinition( defBuilder.toString() ); entry.setLevel( level++ ); entries.add( entry ); for ( DependencyNode node : root.getChildren() ) { addNode( node, level, entries ); } } class NodeEntry { int level; String definition; Map properties; public int getLevel() { return level; } public void setLevel( int level ) { this.level = level; } public String getDefinition() { return definition; } public void setDefinition( String definition ) { this.definition = definition; } public Map getProperties() { return properties; } public void setProperties( Map properties ) { this.properties = properties; } } private static LineContext createContext( String line ) { LineContext ctx = new LineContext(); String definition; String[] split = line.split( "- " ); if ( split.length == 1 ) // root { ctx.setLevel( 0 ); definition = split[0]; } else { ctx.setLevel( (int) Math.ceil( (double) split[0].length() / (double) 3 ) ); definition = split[1]; } if ( "(null)".equalsIgnoreCase( definition ) ) { return ctx; } split = definition.split( ";" ); ctx.setDefinition( new ArtifactDefinition( split[0] ) ); if ( split.length > 1 ) // properties { Map props = new HashMap(); for ( int i = 1; i < split.length; i++ ) { String[] keyValue = split[i].split( "=" ); String key = keyValue[0]; String value = keyValue[1]; props.put( key, value ); } ctx.setProperties( props ); } return ctx; } static class LineContext { ArtifactDefinition definition; private Map properties; int level; public ArtifactDefinition getDefinition() { return definition; } public void setDefinition( ArtifactDefinition definition ) { this.definition = definition; } public Map getProperties() { return properties; } public void setProperties( Map properties ) { this.properties = properties; } public int getLevel() { return level; } public void setLevel( int level ) { this.level = level; } } public Collection getSubstitutions() { return substitutions; } public void setSubstitutions( Collection substitutions ) { this.substitutions = substitutions; } public void setSubstitutions( String... substitutions ) { this.setSubstitutions( Arrays.asList( substitutions ) ); } } IniArtifactDataReader.java000066400000000000000000000253741167050556700334630ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/main/java/org/sonatype/aether/test/utilpackage org.sonatype.aether.test.util; /******************************************************************************* * 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.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.Reader; import java.io.StringReader; import java.net.URL; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.graph.Dependency; import org.sonatype.aether.graph.Exclusion; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.test.util.impl.StubArtifact; /** * A parser for an artifact description in an INI-like format. *

* Possible sections are: *

    *
  • relocations
  • *
  • dependencies
  • *
  • managedDependencies
  • *
  • repositories
  • *
* The relocation- and dependency-sections contain artifact coordinates of the form: * *
 * gid:aid:ver:ext[:scope][:optional]
 * 
* * The dependency-sections may specify exclusions: * *
 * -gid:aid
 * 
* * A repository definition is of the form: * *
 * id:type:url
 * 
* *

Example

* *
 * [relocation]
 * gid:aid:ver:ext
 * 
 * [dependencies]
 * gid:aid:ver:ext:scope
 * -exclusion:aid
 * gid:aid2:ver:ext:scope:optional
 * 
 * [managed-dependencies]
 * gid:aid2:ver2:ext:scope
 * -gid:aid
 * -gid:aid
 * 
 * [repositories]
 * id:type:file:///test-repo
 * 
* * @see IniArtifactDescriptorReader * @author Benjamin Hanzelmann */ public class IniArtifactDataReader { private String prefix = ""; /** * Constructs a data reader with the prefix "". */ public IniArtifactDataReader() { this( "" ); } /** * Constructs a data reader with the given prefix. * * @param prefix the prefix to use for loading resources from the classpath. */ public IniArtifactDataReader( String prefix ) { this.prefix = prefix; } /** * Load an artifact description from the classpath and parse it. */ public ArtifactDescription parse( String resource ) throws IOException { URL res = this.getClass().getClassLoader().getResource( prefix + resource ); if ( res == null ) { throw new IOException( "cannot find resource: " + resource ); } return parse( res ); } /** * Open the given URL and parse ist. */ public ArtifactDescription parse( URL res ) throws IOException { return parse( new InputStreamReader( res.openStream(), "UTF-8" ) ); } /** * Parse the given String. */ public ArtifactDescription parseLiteral( String description ) throws IOException { StringReader reader = new StringReader( description ); return parse( reader ); } private enum State { NONE, RELOCATIONS, DEPENDENCIES, MANAGEDDEPENDENCIES, REPOSITORIES } private ArtifactDescription parse( Reader reader ) throws IOException { String line = null; State state = State.NONE; Map> sections = new HashMap>(); BufferedReader in = new BufferedReader( reader ); try { while ( ( line = in.readLine() ) != null ) { line = cutComment( line ); if ( isEmpty( line ) ) { continue; } if ( line.startsWith( "[" ) ) { try { state = State.valueOf( line.substring( 1, line.length() - 1 ).toUpperCase( Locale.ENGLISH ) ); sections.put( state, new ArrayList() ); } catch ( IllegalArgumentException e ) { throw new IOException( "unknown section: " + line ); } } else { List lines = sections.get( state ); if ( lines == null ) { throw new IOException( "missing section: " + line ); } lines.add( line.trim() ); } } } finally { in.close(); } List relocations = relocations( sections.get( State.RELOCATIONS ) ); List dependencies = dependencies( sections.get( State.DEPENDENCIES ) ); List managedDependencies = dependencies( sections.get( State.MANAGEDDEPENDENCIES ) ); List repositories = repositories( sections.get( State.REPOSITORIES ) ); ArtifactDescription description = new ArtifactDescription( relocations, dependencies, managedDependencies, repositories ); return description; } private List repositories( List list ) { ArrayList ret = new ArrayList(); if ( list == null ) { return ret; } for ( String coords : list ) { String[] split = coords.split( ":", 3 ); String id = split[0]; String type = split[1]; String url = split[2]; ret.add( new RemoteRepository( id, type, url ) ); } return ret; } private List dependencies( List list ) { List ret = new ArrayList(); if ( list == null ) { return ret; } Collection exclusions = new ArrayList(); boolean optional = false; Artifact artifact = null; String scope = null; for ( String coords : list ) { if ( coords.startsWith( "-" ) ) { coords = coords.substring( 1 ); String[] split = coords.split( ":" ); exclusions.add( new Exclusion( split[0], split[1], "", "" ) ); } else { if ( artifact != null ) { // commit dependency Dependency dep = new Dependency( artifact, scope, optional, exclusions ); ret.add( dep ); exclusions = new ArrayList(); } ArtifactDefinition def = new ArtifactDefinition( coords ); optional = def.isOptional(); scope = "".equals( def.getScope() ) ? "compile" : def.getScope(); artifact = new StubArtifact( def.getGroupId(), def.getArtifactId(), "", def.getExtension(), def.getVersion() ); } } if ( artifact != null ) { // commit dependency Dependency dep = new Dependency( artifact, scope, optional, exclusions ); ret.add( dep ); exclusions = new ArrayList(); } return ret; } private List relocations( List list ) { List ret = new ArrayList(); if ( list == null ) { return ret; } for ( String coords : list ) { ArtifactDefinition def = new ArtifactDefinition( coords ); ret.add( new StubArtifact( def.getGroupId(), def.getArtifactId(), "", def.getExtension(), def.getVersion() ) ); } return ret; } private static boolean isEmpty( String line ) { return line == null || line.length() == 0; } private static String cutComment( String line ) { int idx = line.indexOf( '#' ); if ( idx != -1 ) { line = line.substring( 0, idx ); } return line; } static class Definition { private String groupId; private String artifactId; private String extension; private String version; private String scope = ""; private String definition; private String id = null; private String reference = null; private boolean optional = false; public Definition( String def ) { this.definition = def.trim(); if ( definition.startsWith( "(" ) ) { int idx = definition.indexOf( ')' ); this.id = definition.substring( 1, idx ); this.definition = definition.substring( idx + 1 ); } else if ( definition.startsWith( "^" ) ) { this.reference = definition.substring( 1 ); return; } String[] split = definition.split( ":" ); if ( split.length < 4 ) { throw new IllegalArgumentException( "Need definition like 'gid:aid:ext:ver[:scope]', but was: " + definition ); } groupId = split[0]; artifactId = split[1]; extension = split[2]; version = split[3]; if ( split.length > 4 ) { scope = split[4]; } if ( split.length > 5 && "true".equalsIgnoreCase( split[5] ) ) { optional = true; } } public String getGroupId() { return groupId; } public String getArtifactId() { return artifactId; } public String getType() { return extension; } public String getVersion() { return version; } public String getScope() { return scope; } @Override public String toString() { return definition; } public String getId() { return id; } public String getReference() { return reference; } public boolean isReference() { return reference != null; } public boolean hasId() { return id != null; } public boolean isOptional() { return optional; } } } IniArtifactDescriptorReader.java000066400000000000000000000052061167050556700347200ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/main/java/org/sonatype/aether/test/utilpackage org.sonatype.aether.test.util; /******************************************************************************* * 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; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.resolution.ArtifactDescriptorException; import org.sonatype.aether.resolution.ArtifactDescriptorRequest; import org.sonatype.aether.resolution.ArtifactDescriptorResult; /** * Uses a {@link IniArtifactDataReader} to parse an artifact description. *

* Note: May not directly implement ArtifactDescriptorReader from aether-impl because of circular dependencies, and has * to be wrapped for use in test classes. * * @author Benjamin Hanzelmann */ public class IniArtifactDescriptorReader { private IniArtifactDataReader reader; /** * Use the given prefix to load the artifact descriptions. */ public IniArtifactDescriptorReader( String prefix ) { reader = new IniArtifactDataReader( prefix ); } /** * Parses the resource $prefix/gid_aid_ext_ver.ini from the request artifact as an artifact description * and wraps it into an ArtifactDescriptorResult. */ public ArtifactDescriptorResult readArtifactDescriptor( RepositorySystemSession session, ArtifactDescriptorRequest request ) throws ArtifactDescriptorException { Artifact artifact = request.getArtifact(); String resourceName = String.format( "%s_%s_%s_%s.ini", artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(), artifact.getExtension() ); ArtifactDescriptorResult result = new ArtifactDescriptorResult( request ); result.setArtifact( artifact ); try { ArtifactDescription data = reader.parse( resourceName ); result.setDependencies( data.getDependencies() ); result.setManagedDependencies( data.getManagedDependencies() ); result.setRepositories( data.getRepositories() ); result.setRelocations( data.getRelocations() ); return result; } catch ( Exception e ) { throw new ArtifactDescriptorException( result, e.getMessage() ); } } } aether-1.13.1/aether-test-util/src/main/java/org/sonatype/aether/test/util/NodeBuilder.java000066400000000000000000000100451167050556700316110ustar00rootroot00000000000000package org.sonatype.aether.test.util; /******************************************************************************* * 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.HashMap; import java.util.List; import java.util.Map; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.graph.Dependency; import org.sonatype.aether.graph.DependencyNode; import org.sonatype.aether.test.util.impl.StubArtifact; import org.sonatype.aether.test.util.impl.TestDependencyNode; import org.sonatype.aether.test.util.impl.TestVersionScheme; import org.sonatype.aether.version.InvalidVersionSpecificationException; import org.sonatype.aether.version.VersionScheme; /** * @author Benjamin Bentmann */ public class NodeBuilder { private String groupId = "test"; private String artifactId = ""; private String version = "0.1"; private String range; private String ext = "jar"; private String classifier = ""; private String scope = "compile"; private boolean optional = false; private String context; private List relocations = new ArrayList(); private VersionScheme versionScheme = new TestVersionScheme(); private Map properties = new HashMap(0); public NodeBuilder artifactId( String artifactId ) { this.artifactId = artifactId; return this; } public NodeBuilder groupId( String groupId ) { this.groupId = groupId; return this; } public NodeBuilder ext( String ext ) { this.ext = ext; return this; } public NodeBuilder version( String version ) { this.version = version; this.range = null; return this; } public NodeBuilder range( String range ) { this.range = range; return this; } public NodeBuilder scope( String scope ) { this.scope = scope; return this; } public NodeBuilder context( String context ) { this.context = context; return this; } public NodeBuilder reloc( String artifactId ) { Artifact relocation = new StubArtifact( groupId, artifactId, classifier, ext, version ); relocations.add( relocation ); return this; } public NodeBuilder reloc( String groupId, String artifactId, String version ) { Artifact relocation = new StubArtifact( groupId, artifactId, classifier, ext, version ); relocations.add( relocation ); return this; } public NodeBuilder properties( Map properties ) { this.properties = properties != null ? properties : Collections.emptyMap(); return this; } public DependencyNode build() { Dependency dependency = null; TestDependencyNode node = new TestDependencyNode(); if ( artifactId != null && artifactId.length() > 0 ) { Artifact artifact = new StubArtifact( groupId, artifactId, classifier, ext, version, properties ); dependency = new Dependency( artifact, scope, optional ); node.setDependency( dependency ); try { node.setVersion( versionScheme.parseVersion( version ) ); node.setVersionConstraint( versionScheme.parseVersionConstraint( range != null ? range : version ) ); } catch ( InvalidVersionSpecificationException e ) { throw new IllegalArgumentException( "bad version: " + e.getMessage(), e ); } } node.setRequestContext( context ); node.setRelocations( relocations ); return node; } } aether-1.13.1/aether-test-util/src/main/java/org/sonatype/aether/test/util/TestFileUtils.java000066400000000000000000000161471167050556700321660ustar00rootroot00000000000000package org.sonatype.aether.test.util; /******************************************************************************* * 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.BufferedOutputStream; import java.io.Closeable; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.io.RandomAccessFile; import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.Collection; import java.util.Properties; import java.util.UUID; import org.junit.Assert; public class TestFileUtils { private static final File TMP = new File( System.getProperty( "java.io.tmpdir" ), "aether-" + UUID.randomUUID().toString().substring( 0, 8 ) ); static { Runtime.getRuntime().addShutdownHook( new Thread() { @Override public void run() { try { delete( TMP ); } catch ( IOException e ) { e.printStackTrace(); } } } ); } public static void deleteTempFiles() throws IOException { delete( TMP ); } public static File createTempFile( String contents ) throws IOException { return createTempFile( contents.getBytes( "UTF-8" ), 1 ); } public static File createTempFile( byte[] pattern, int repeat ) throws IOException { mkdirs( TMP ); File tmpFile = File.createTempFile( "tmpfile-", ".data", TMP ); write( pattern, repeat, tmpFile ); return tmpFile; } public static void write( String content, File file ) throws IOException { try { write( content.getBytes( "UTF-8" ), 1, file ); } catch ( UnsupportedEncodingException e ) { // broken VM throw new IOException( e.getMessage() ); } } public static void write( byte[] pattern, int repeat, File file ) throws IOException { file.deleteOnExit(); file.getParentFile().mkdirs(); OutputStream out = null; try { out = new BufferedOutputStream( new FileOutputStream( file ) ); for ( int i = 0; i < repeat; i++ ) { out.write( pattern ); } } finally { close( out ); } } public static long copy( File source, File target ) throws IOException { long total = 0; FileInputStream fis = null; OutputStream fos = null; try { fis = new FileInputStream( source ); mkdirs( target.getParentFile() ); fos = new BufferedOutputStream( new FileOutputStream( target ) ); for ( byte[] buffer = new byte[1024 * 32];; ) { int bytes = fis.read( buffer ); if ( bytes < 0 ) { break; } fos.write( buffer, 0, bytes ); total += bytes; } } finally { close( fis ); close( fos ); } return total; } private static void close( Closeable c ) throws IOException { if ( c != null ) { c.close(); } } public static void delete( File file ) throws IOException { if ( file == null ) { return; } Collection undeletables = new ArrayList(); delete( file, undeletables ); if ( !undeletables.isEmpty() ) { throw new IOException( "Failed to delete " + undeletables ); } } private static void delete( File file, Collection undeletables ) { if ( file.isDirectory() ) { for ( String child : file.list() ) { delete( new File( file, child ), undeletables ); } } if ( !file.delete() && file.exists() ) { undeletables.add( file.getAbsoluteFile() ); } } public static byte[] getContent( File file ) throws IOException { RandomAccessFile in = null; try { in = new RandomAccessFile( file, "r" ); byte[] actual = new byte[(int) in.length()]; in.readFully( actual ); return actual; } finally { close( in ); } } public static void assertContent( byte[] expected, File file ) throws IOException { Assert.assertArrayEquals( expected, getContent( file ) ); } public static void assertContent( String expected, File file ) throws IOException { byte[] content = getContent( file ); String msg = new String( content, "UTF-8" ); if ( msg.length() > 10 ) { msg = msg.substring( 0, 10 ) + "..."; } Assert.assertArrayEquals( "content was '" + msg + "'\n", expected.getBytes( "UTF-8" ), content ); } public static boolean mkdirs( File directory ) { if ( directory == null ) { return false; } if ( directory.exists() ) { return false; } if ( directory.mkdir() ) { return true; } File canonDir = null; try { canonDir = directory.getCanonicalFile(); } catch ( IOException e ) { return false; } File parentDir = canonDir.getParentFile(); return ( parentDir != null && ( mkdirs( parentDir ) || parentDir.exists() ) && canonDir.mkdir() ); } public static File createTempDir() throws IOException { return createTempDir( "" ); } public static File createTempDir( String suffix ) throws IOException { mkdirs( TMP ); File tmpFile = File.createTempFile( "tmpdir-", suffix, TMP ); delete( tmpFile ); mkdirs( tmpFile ); return tmpFile; } public static void read( Properties props, File file ) throws IOException { FileInputStream fis = new FileInputStream( file ); try { props.load( fis ); } finally { close( fis ); } } public static void write( Properties props, File file ) throws IOException { file.getParentFile().mkdirs(); FileOutputStream fos = new FileOutputStream( file ); try { props.store( fos, "aether-test" ); } finally { close( fos ); } } } aether-1.13.1/aether-test-util/src/main/java/org/sonatype/aether/test/util/connector/000077500000000000000000000000001167050556700305445ustar00rootroot00000000000000ConnectorTestContext.java000066400000000000000000000034021167050556700354660ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/main/java/org/sonatype/aether/test/util/connectorpackage org.sonatype.aether.test.util.connector; /******************************************************************************* * 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; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.test.impl.RecordingTransferListener; public class ConnectorTestContext { private RemoteRepository repository; private RepositorySystemSession session; public ConnectorTestContext( RemoteRepository repository, RepositorySystemSession session ) { this.repository = repository; this.session = session; } public ConnectorTestContext() { } public RemoteRepository getRepository() { return repository; } public RepositorySystemSession getSession() { return session; } public void setRepository( RemoteRepository repository ) { this.repository = repository; } public void setSession( RepositorySystemSession session ) { this.session = session; } public RecordingTransferListener getRecordingTransferListener() { if ( session.getTransferListener() instanceof RecordingTransferListener ) { return (RecordingTransferListener) session.getTransferListener(); } else { return new RecordingTransferListener( session.getTransferListener() ); } } }TestConnectorPathUtils.java000066400000000000000000000164021167050556700357630ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/main/java/org/sonatype/aether/test/util/connectorpackage org.sonatype.aether.test.util.connector; /******************************************************************************* * 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.StringTokenizer; /** * URL handling for file URLs. Based on org.apache.maven.wagon.PathUtils. * * @author Benjamin Hanzelmann */ public final class TestConnectorPathUtils { private TestConnectorPathUtils() { } /** * Returns the directory path portion of a file specification string. Matches the equally named unix command. * * @return The directory portion excluding the ending file separator. */ public static String dirname( final String path ) { final int i = path.lastIndexOf( "/" ); return ( ( i >= 0 ) ? path.substring( 0, i ) : "" ); } /** * Returns the filename portion of a file specification string. * * @return The filename string with extension. */ public static String filename( final String path ) { final int i = path.lastIndexOf( "/" ); return ( ( i >= 0 ) ? path.substring( i + 1 ) : path ); } public static String[] dirnames( final String path ) { final String dirname = TestConnectorPathUtils.dirname( path ); return split( dirname, "/", -1 ); } private static String[] split( final String str, final String separator, final int max ) { final StringTokenizer tok; if ( separator == null ) { // Null separator means we're using StringTokenizer's default // delimiter, which comprises all whitespace characters. tok = new StringTokenizer( str ); } else { tok = new StringTokenizer( str, separator ); } int listSize = tok.countTokens(); if ( max > 0 && listSize > max ) { listSize = max; } final String[] list = new String[listSize]; int i = 0; int lastTokenBegin; int lastTokenEnd = 0; while ( tok.hasMoreTokens() ) { if ( max > 0 && i == listSize - 1 ) { // In the situation where we hit the max yet have // tokens left over in our input, the last list // element gets all remaining text. final String endToken = tok.nextToken(); lastTokenBegin = str.indexOf( endToken, lastTokenEnd ); list[i] = str.substring( lastTokenBegin ); break; } else { list[i] = tok.nextToken(); lastTokenBegin = str.indexOf( list[i], lastTokenEnd ); lastTokenEnd = lastTokenBegin + list[i].length(); } i++; } return list; } /** * Return the protocol name.
* E.g: for input http://www.codehause.org this method will return http * * @param url the url * @return the host name */ public static String protocol( final String url ) { final int pos = url.indexOf( ":" ); if ( pos == -1 ) { return ""; } return url.substring( 0, pos ).trim(); } /** * Derive the path portion of the given URL. * * @param url the file-repository URL * @return the basedir of the repository */ public static String basedir( String url ) { String protocol = TestConnectorPathUtils.protocol( url ); String retValue = null; if ( protocol.length() > 0 ) { retValue = url.substring( protocol.length() + 1 ); } else { retValue = url; } retValue = decode( retValue ); // special case: if omitted // on protocol, keep path as is if ( retValue.startsWith( "//" ) ) { retValue = retValue.substring( 2 ); if ( retValue.length() >= 2 && ( retValue.charAt( 1 ) == '|' || retValue.charAt( 1 ) == ':' ) ) { // special case: if there is a windows drive letter, then keep the original return value retValue = retValue.charAt( 0 ) + ":" + retValue.substring( 2 ); } else { // Now we expect the host int index = retValue.indexOf( "/" ); if ( index >= 0 ) { retValue = retValue.substring( index + 1 ); } // special case: if there is a windows drive letter, then keep the original return value if ( retValue.length() >= 2 && ( retValue.charAt( 1 ) == '|' || retValue.charAt( 1 ) == ':' ) ) { retValue = retValue.charAt( 0 ) + ":" + retValue.substring( 2 ); } else if ( index >= 0 ) { // leading / was previously stripped retValue = "/" + retValue; } } } // special case: if there is a windows drive letter using |, switch to : if ( retValue.length() >= 2 && retValue.charAt( 1 ) == '|' ) { retValue = retValue.charAt( 0 ) + ":" + retValue.substring( 2 ); } return retValue.trim(); } /** * Decodes the specified (portion of a) URL. Note: This decoder assumes that ISO-8859-1 is used to * convert URL-encoded octets to characters. * * @param url The URL to decode, may be null. * @return The decoded URL or null if the input was null. */ static String decode( String url ) { String decoded = url; if ( url != null ) { int pos = -1; while ( ( pos = decoded.indexOf( '%', pos + 1 ) ) >= 0 ) { if ( pos + 2 < decoded.length() ) { String hexStr = decoded.substring( pos + 1, pos + 3 ); char ch = (char) Integer.parseInt( hexStr, 16 ); decoded = decoded.substring( 0, pos ) + ch + decoded.substring( pos + 3 ); } } } return decoded; } public static String toRelative( File basedir, String absolutePath ) { String relative; absolutePath = absolutePath.replace( '\\', '/' ); String basedirPath = basedir.getAbsolutePath().replace( '\\', '/' ); if ( absolutePath.startsWith( basedirPath ) ) { relative = absolutePath.substring( basedirPath.length() ); if ( relative.startsWith( "/" ) ) { relative = relative.substring( 1 ); } if ( relative.length() <= 0 ) { relative = "."; } } else { relative = absolutePath; } return relative; } } aether-1.13.1/aether-test-util/src/main/java/org/sonatype/aether/test/util/connector/suite/000077500000000000000000000000001167050556700316755ustar00rootroot00000000000000ConnectorTestSetup.java000066400000000000000000000063651167050556700363060ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/main/java/org/sonatype/aether/test/util/connector/suitepackage org.sonatype.aether.test.util.connector.suite; /******************************************************************************* * 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.RepositorySystemSession; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.spi.connector.RepositoryConnectorFactory; /** * The callback handler used to configure {@link ConnectorTestSuite}. *

* The specified methods have the same meaning as the corresponding JUnit4-annotations. * * @see org.sonatype.aether.test.util.connector.suite.ConnectorTestSetup.AbstractConnectorTestSetup * @author Benjamin Hanzelmann */ public interface ConnectorTestSetup { /** * This method is called before each test run. * * @param session The session used for the test bundle. * @param context The context provided by {@link #beforeClass(RepositorySystemSession)}. * @return The repository to use in the next test. */ public RemoteRepository before( RepositorySystemSession session, Map context ) throws Exception; /** * This method is called before the first test of the bundle is executed. * * @param session The session used for the test bundle. * @return A map acting as a context for the current test bundle run. This context will not be used by the test * cases in the suite, and is only used to provide context for the before/after/afterClass-method calls. * This might be used to save setup-specific values (port numbers, directories to clean up after tests, ...) */ public Map beforeClass( RepositorySystemSession session ) throws Exception; /** * This method is called after each test of the bundle is executed. Repositories should be cleaned after each test, * as previous uploads may influence test results. * * @param session The session used for the test bundle. * @param context The context provided by {@link #beforeClass(RepositorySystemSession)}. * @param repository the repository used in the test run. */ public void after( RepositorySystemSession session, RemoteRepository repository, Map context ) throws Exception; /** * @return the factory to use for the tests. */ public RepositoryConnectorFactory factory(); /** * Empty implementation of {@link ConnectorTestSetup}. * * @author Benjamin Hanzelmann */ public static abstract class AbstractConnectorTestSetup implements ConnectorTestSetup { public Map beforeClass( RepositorySystemSession session ) throws Exception { return null; } public void after( RepositorySystemSession session, RemoteRepository repository, Map context ) throws Exception { } } } ConnectorTestSuite.java000066400000000000000000000360201167050556700362660ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/main/java/org/sonatype/aether/test/util/connector/suitepackage org.sonatype.aether.test.util.connector.suite; /******************************************************************************* * 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 static org.junit.Assert.*; import java.io.File; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.Arrays; import java.util.List; import org.junit.Test; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.metadata.Metadata; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.repository.RepositoryPolicy; import org.sonatype.aether.spi.connector.ArtifactDownload; import org.sonatype.aether.spi.connector.ArtifactUpload; import org.sonatype.aether.spi.connector.MetadataDownload; import org.sonatype.aether.spi.connector.MetadataUpload; import org.sonatype.aether.spi.connector.RepositoryConnector; import org.sonatype.aether.spi.connector.RepositoryConnectorFactory; import org.sonatype.aether.spi.connector.Transfer; import org.sonatype.aether.spi.connector.Transfer.State; import org.sonatype.aether.test.impl.TestRepositorySystemSession; import org.sonatype.aether.test.util.TestFileUtils; import org.sonatype.aether.test.util.impl.StubArtifact; import org.sonatype.aether.test.util.impl.StubMetadata; import org.sonatype.aether.transfer.NoRepositoryConnectorException; import org.sonatype.aether.transfer.TransferCancelledException; import org.sonatype.aether.transfer.TransferEvent; import org.sonatype.aether.transfer.TransferListener; /** * The ConnectorTestSuite bundles standard tests for {@link RepositoryConnector}s. *

* To use these tests, provide a (Junit4-)class extending this class, and provide a default constructor calling * {@link ConnectorTestSuite#ConnectorTestSuite(ConnectorTestSetup)} with a self-implemented {@link ConnectorTestSetup}. * * @author Benjamin Hanzelmann */ public abstract class ConnectorTestSuite extends ConnectorTestSuiteSetup { public ConnectorTestSuite( ConnectorTestSetup setup ) { super( setup ); } /** * Test successful event order. * * @see TransferEventTester#testSuccessfulTransferEvents(RepositoryConnectorFactory, TestRepositorySystemSession, * RemoteRepository) */ @Test public void testSuccessfulEvents() throws NoRepositoryConnectorException, IOException { TransferEventTester.testSuccessfulTransferEvents( factory(), session, repository ); } @Test public void testFailedEvents() throws NoRepositoryConnectorException, IOException { TransferEventTester.testFailedTransferEvents( factory(), session, repository ); } @Test public void testFileHandleLeakage() throws IOException, NoRepositoryConnectorException { StubArtifact artifact = new StubArtifact( "testGroup", "testArtifact", "", "jar", "1-test" ); StubMetadata metadata = new StubMetadata( "testGroup", "testArtifact", "1-test", "maven-metadata.xml", Metadata.Nature.RELEASE_OR_SNAPSHOT ); RepositoryConnector connector = factory().newInstance( session, repository ); File tmpFile = TestFileUtils.createTempFile( "testFileHandleLeakage" ); ArtifactUpload artUp = new ArtifactUpload( artifact, tmpFile ); connector.put( Arrays.asList( artUp ), null ); assertTrue( "Leaking file handle in artifact upload", tmpFile.delete() ); tmpFile = TestFileUtils.createTempFile( "testFileHandleLeakage" ); MetadataUpload metaUp = new MetadataUpload( metadata, tmpFile ); connector.put( null, Arrays.asList( metaUp ) ); assertTrue( "Leaking file handle in metadata upload", tmpFile.delete() ); tmpFile = TestFileUtils.createTempFile( "testFileHandleLeakage" ); ArtifactDownload artDown = new ArtifactDownload( artifact, null, tmpFile, null ); connector.get( Arrays.asList( artDown ), null ); new File( tmpFile.getAbsolutePath() + ".sha1" ).deleteOnExit(); assertTrue( "Leaking file handle in artifact download", tmpFile.delete() ); tmpFile = TestFileUtils.createTempFile( "testFileHandleLeakage" ); MetadataDownload metaDown = new MetadataDownload( metadata, null, tmpFile, null ); connector.get( null, Arrays.asList( metaDown ) ); new File( tmpFile.getAbsolutePath() + ".sha1" ).deleteOnExit(); assertTrue( "Leaking file handle in metadata download", tmpFile.delete() ); connector.close(); } @Test public void testBlocking() throws NoRepositoryConnectorException, IOException { RepositoryConnector connector = factory().newInstance( session, repository ); int count = 10; byte[] pattern = "tmpFile".getBytes( "UTF-8" ); File tmpFile = TestFileUtils.createTempFile( pattern, 100000 ); List artUps = ConnectorTestUtils.createTransfers( ArtifactUpload.class, count, tmpFile ); List metaUps = ConnectorTestUtils.createTransfers( MetadataUpload.class, count, tmpFile ); List artDowns = ConnectorTestUtils.createTransfers( ArtifactDownload.class, count, null ); List metaDowns = ConnectorTestUtils.createTransfers( MetadataDownload.class, count, null ); // this should block until all transfers are done - racing condition, better way to test this? connector.put( artUps, metaUps ); connector.get( artDowns, metaDowns ); for ( int i = 0; i < count; i++ ) { ArtifactUpload artUp = artUps.get( i ); MetadataUpload metaUp = metaUps.get( i ); ArtifactDownload artDown = artDowns.get( i ); MetadataDownload metaDown = metaDowns.get( i ); assertTrue( Transfer.State.DONE.equals( artUp.getState() ) ); assertTrue( Transfer.State.DONE.equals( artDown.getState() ) ); assertTrue( Transfer.State.DONE.equals( metaUp.getState() ) ); assertTrue( Transfer.State.DONE.equals( metaDown.getState() ) ); } connector.close(); } @Test public void testMkdirConcurrencyBug() throws IOException, NoRepositoryConnectorException { RepositoryConnector connector = factory().newInstance( session, repository ); File artifactFile = TestFileUtils.createTempFile( "mkdirsBug0" ); File metadataFile = TestFileUtils.createTempFile( "mkdirsBug1" ); int numTransfers = 2; ArtifactUpload[] artUps = new ArtifactUpload[numTransfers]; MetadataUpload[] metaUps = new MetadataUpload[numTransfers]; for ( int i = 0; i < numTransfers; i++ ) { StubArtifact art = new StubArtifact( "testGroup", "testArtifact", "", "jar", i + "-test" ); StubMetadata meta = new StubMetadata( "testGroup", "testArtifact", i + "-test", "maven-metadata.xml", Metadata.Nature.RELEASE_OR_SNAPSHOT ); ArtifactUpload artUp = new ArtifactUpload( art, artifactFile ); MetadataUpload metaUp = new MetadataUpload( meta, metadataFile ); artUps[i] = artUp; metaUps[i] = metaUp; } connector.put( Arrays.asList( artUps ), null ); connector.put( null, Arrays.asList( metaUps ) ); File localRepo = session.getLocalRepository().getBasedir(); StringBuilder localPath = new StringBuilder( localRepo.getAbsolutePath() ); for ( int i = 0; i < 50; i++ ) { localPath.append( "/d" ); } ArtifactDownload[] artDowns = new ArtifactDownload[numTransfers]; MetadataDownload[] metaDowns = new MetadataDownload[numTransfers]; for ( int m = 0; m < 20; m++ ) { for ( int i = 0; i < numTransfers; i++ ) { File artFile = new File( localPath.toString() + "/a" + i ); File metaFile = new File( localPath.toString() + "/m" + i ); StubArtifact art = new StubArtifact( "testGroup", "testArtifact", "", "jar", i + "-test" ); StubMetadata meta = new StubMetadata( "testGroup", "testArtifact", i + "-test", "maven-metadata.xml", Metadata.Nature.RELEASE_OR_SNAPSHOT ); ArtifactDownload artDown = new ArtifactDownload( art, null, artFile, RepositoryPolicy.CHECKSUM_POLICY_FAIL ); MetadataDownload metaDown = new MetadataDownload( meta, null, metaFile, RepositoryPolicy.CHECKSUM_POLICY_FAIL ); artDowns[i] = artDown; metaDowns[i] = metaDown; } connector.get( Arrays.asList( artDowns ), Arrays.asList( metaDowns ) ); for ( int j = 0; j < numTransfers; j++ ) { ArtifactDownload artDown = artDowns[j]; MetadataDownload metaDown = metaDowns[j]; assertNull( "artifact download had exception: " + artDown.getException(), artDown.getException() ); assertNull( "metadata download had exception: " + metaDown.getException(), metaDown.getException() ); assertEquals( State.DONE, artDown.getState() ); assertEquals( State.DONE, metaDown.getState() ); } TestFileUtils.delete( localRepo ); } connector.close(); } /** * See https://issues.sonatype.org/browse/AETHER-8 */ @Test public void testTransferZeroBytesFile() throws IOException, NoRepositoryConnectorException { File emptyFile = TestFileUtils.createTempFile( "" ); Artifact artifact = new StubArtifact( "gid:aid:ext:ver" ); ArtifactUpload upA = new ArtifactUpload( artifact, emptyFile ); File dir = TestFileUtils.createTempDir( "con-test" ); File downAFile = new File( dir, "downA.file" ); downAFile.deleteOnExit(); ArtifactDownload downA = new ArtifactDownload( artifact, "", downAFile, RepositoryPolicy.CHECKSUM_POLICY_FAIL ); Metadata metadata = new StubMetadata( "gid", "aid", "ver", "maven-metadata.xml", Metadata.Nature.RELEASE_OR_SNAPSHOT ); MetadataUpload upM = new MetadataUpload( metadata, emptyFile ); File downMFile = new File( dir, "downM.file" ); downMFile.deleteOnExit(); MetadataDownload downM = new MetadataDownload( metadata, "", downMFile, RepositoryPolicy.CHECKSUM_POLICY_FAIL ); RepositoryConnector connector = factory().newInstance( session, repository ); connector.put( Arrays.asList( upA ), Arrays.asList( upM ) ); connector.get( Arrays.asList( downA ), Arrays.asList( downM ) ); assertNull( String.valueOf( upA.getException() ), upA.getException() ); assertNull( String.valueOf( upM.getException() ), upM.getException() ); assertNull( String.valueOf( downA.getException() ), downA.getException() ); assertNull( String.valueOf( downM.getException() ), downM.getException() ); assertEquals( 0, downAFile.length() ); assertEquals( 0, downMFile.length() ); connector.close(); } @Test public void testProgressEventsDataBuffer() throws UnsupportedEncodingException, IOException, NoSuchAlgorithmException, NoRepositoryConnectorException { byte[] bytes = "These are the test contents.\n".getBytes( "UTF-8" ); int count = 120000; MessageDigest digest = MessageDigest.getInstance( "SHA-1" ); for (int i = 0; i < count; i++) { digest.update( bytes ); } byte[] hash = digest.digest(); File file = TestFileUtils.createTempFile( bytes, count ); Artifact artifact = new StubArtifact( "gid:aid:ext:ver" ); ArtifactUpload upA = new ArtifactUpload( artifact, file ); File dir = TestFileUtils.createTempDir( "con-test" ); File downAFile = new File( dir, "downA.file" ); downAFile.deleteOnExit(); ArtifactDownload downA = new ArtifactDownload( artifact, "", downAFile, RepositoryPolicy.CHECKSUM_POLICY_FAIL ); Metadata metadata = new StubMetadata( "gid", "aid", "ver", "maven-metadata.xml", Metadata.Nature.RELEASE_OR_SNAPSHOT ); MetadataUpload upM = new MetadataUpload( metadata, file ); File downMFile = new File( dir, "downM.file" ); downMFile.deleteOnExit(); MetadataDownload downM = new MetadataDownload( metadata, "", downMFile, RepositoryPolicy.CHECKSUM_POLICY_FAIL ); DigestingTransferListener listener = new DigestingTransferListener(); session.setTransferListener( listener ); RepositoryConnector connector = factory().newInstance( session, repository ); connector.put( Arrays.asList( upA ), null ); assertArrayEquals( hash, listener.getHash() ); listener.rewind(); connector.put( null, Arrays.asList( upM ) ); assertArrayEquals( hash, listener.getHash() ); listener.rewind(); connector.get( Arrays.asList( downA ), null ); assertArrayEquals( hash, listener.getHash() ); listener.rewind(); connector.get( null, Arrays.asList( downM ) ); assertArrayEquals( hash, listener.getHash() ); listener.rewind(); connector.close(); } /** * @author Benjamin Hanzelmann * */ private final class DigestingTransferListener implements TransferListener { private MessageDigest digest; private synchronized void initDigest() throws NoSuchAlgorithmException { digest = MessageDigest.getInstance( "SHA-1" ); } public DigestingTransferListener() throws NoSuchAlgorithmException { initDigest(); } public void rewind() throws NoSuchAlgorithmException { initDigest(); } public void transferSucceeded( TransferEvent event ) { } public void transferStarted( TransferEvent event ) throws TransferCancelledException { } public synchronized void transferProgressed( TransferEvent event ) throws TransferCancelledException { digest.update( event.getDataBuffer() ); } public void transferInitiated( TransferEvent event ) throws TransferCancelledException { } public void transferFailed( TransferEvent event ) { } public void transferCorrupted( TransferEvent event ) throws TransferCancelledException { } public synchronized byte[] getHash() { return digest.digest(); } } } ConnectorTestSuiteSetup.java000066400000000000000000000050361167050556700373120ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/main/java/org/sonatype/aether/test/util/connector/suitepackage org.sonatype.aether.test.util.connector.suite; /******************************************************************************* * 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.junit.After; import org.junit.Before; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.spi.connector.RepositoryConnectorFactory; import org.sonatype.aether.test.impl.TestRepositorySystemSession; /** * Provides the Junit-callback methods to configure the {@link ConnectorTestSuite} per connector. * * @author Benjamin Hanzelmann */ public abstract class ConnectorTestSuiteSetup { private ConnectorTestSetup connectorSetup = null; protected RemoteRepository repository; protected TestRepositorySystemSession session; private Map context = null; private RepositoryConnectorFactory factory; /** * @param setup The connector-specific callback handler to use. */ public ConnectorTestSuiteSetup( ConnectorTestSetup setup ) { connectorSetup = setup; factory = setup.factory(); try { context = connectorSetup.beforeClass( session ); } catch ( Exception e ) { throw new IllegalStateException( "Error while running ConnectorTestSetup#beforeClass.", e ); } } /** * If called for the first time, calls * {@link ConnectorTestSetup#beforeClass(org.sonatype.aether.RepositorySystemSession)}. Always calls * {@link ConnectorTestSetup#before(org.sonatype.aether.RepositorySystemSession, Map)}. */ @Before public void before() throws Exception { session = new TestRepositorySystemSession(); repository = connectorSetup.before( session, context ); } /** * Calls {@link ConnectorTestSetup#after(org.sonatype.aether.RepositorySystemSession, RemoteRepository, Map)}. */ @After public void after() throws Exception { connectorSetup.after( session, repository, context ); } /** * @return the factory as determined by {@link ConnectorTestSetup#factory()}. */ protected RepositoryConnectorFactory factory() { return factory; } } ConnectorTestUtils.java000066400000000000000000000077561167050556700363130ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/main/java/org/sonatype/aether/test/util/connector/suitepackage org.sonatype.aether.test.util.connector.suite; /******************************************************************************* * 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.io.IOException; import java.util.ArrayList; import java.util.List; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.metadata.Metadata; import org.sonatype.aether.repository.RepositoryPolicy; import org.sonatype.aether.spi.connector.ArtifactDownload; import org.sonatype.aether.spi.connector.ArtifactTransfer; import org.sonatype.aether.spi.connector.ArtifactUpload; import org.sonatype.aether.spi.connector.MetadataDownload; import org.sonatype.aether.spi.connector.MetadataUpload; import org.sonatype.aether.spi.connector.Transfer; import org.sonatype.aether.test.util.TestFileUtils; import org.sonatype.aether.test.util.impl.StubArtifact; import org.sonatype.aether.test.util.impl.StubMetadata; /** * @author Benjamin Hanzelmann */ public class ConnectorTestUtils { /** * Creates transfer objects according to the given class. If the file parameter is {@code null}, a new temporary * file will be created for downloads. Uploads will just use the parameter as it is. */ public static List createTransfers( Class cls, int count, File file ) { ArrayList ret = new ArrayList(); Object item; if ( ArtifactTransfer.class.isAssignableFrom( cls ) ) { item = new StubArtifact( "testGroup", "testArtifact", "sources", "jar", "will be replaced" ); } else { item = new StubMetadata( "testGroup", "testArtifact", "will be replaced", "jar", Metadata.Nature.RELEASE_OR_SNAPSHOT, file ); } for ( int i = 0; i < count; i++ ) { String context = null; String checksumPolicy = RepositoryPolicy.CHECKSUM_POLICY_IGNORE; Object obj = null; if ( cls.isAssignableFrom( ArtifactUpload.class ) ) { Artifact artifact = ( (Artifact) item ).setVersion( ( i + 1 ) + "-test" ); obj = new ArtifactUpload( artifact, file ); } else if ( cls.isAssignableFrom( ArtifactDownload.class ) ) { try { Artifact artifact = ( (Artifact) item ).setVersion( ( i + 1 ) + "-test" ); obj = new ArtifactDownload( artifact, context, safeFile( file ), checksumPolicy ); } catch ( IOException e ) { throw new RuntimeException( e.getMessage(), e ); } } else if ( cls.isAssignableFrom( MetadataUpload.class ) ) { Metadata metadata = ( (StubMetadata) item ).setVersion( ( i + 1 ) + "-test" ); obj = new MetadataUpload( metadata, file ); } else if ( cls.isAssignableFrom( MetadataDownload.class ) ) { try { Metadata metadata = ( (StubMetadata) item ).setVersion( ( i + 1 ) + "-test" ); obj = new MetadataDownload( metadata, context, safeFile( file ), checksumPolicy ); } catch ( IOException e ) { throw new RuntimeException( e.getMessage(), e ); } } ret.add( cls.cast( obj ) ); } return ret; } private static File safeFile( File file ) throws IOException { return file == null ? TestFileUtils.createTempFile( "" ) : file; } } TransferEventTester.java000066400000000000000000000270141167050556700364420ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/main/java/org/sonatype/aether/test/util/connector/suitepackage org.sonatype.aether.test.util.connector.suite; /******************************************************************************* * 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 static org.junit.Assert.*; import static org.sonatype.aether.transfer.TransferEvent.EventType.*; import java.io.File; import java.io.IOException; import java.util.Collection; import java.util.LinkedList; import java.util.Queue; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.spi.connector.ArtifactDownload; import org.sonatype.aether.spi.connector.ArtifactUpload; import org.sonatype.aether.spi.connector.MetadataDownload; import org.sonatype.aether.spi.connector.MetadataUpload; import org.sonatype.aether.spi.connector.RepositoryConnector; import org.sonatype.aether.spi.connector.RepositoryConnectorFactory; import org.sonatype.aether.test.impl.RecordingTransferListener; import org.sonatype.aether.test.impl.TestRepositorySystemSession; import org.sonatype.aether.test.util.TestFileUtils; import org.sonatype.aether.transfer.NoRepositoryConnectorException; import org.sonatype.aether.transfer.TransferEvent; import org.sonatype.aether.transfer.TransferEvent.EventType; import org.sonatype.aether.transfer.TransferResource; /** * Utility class for connector tests. Provides methods to check the emitted transfer events for artifact and metadata * up- and downloads. * * @author Benjamin Hanzelmann */ public class TransferEventTester { /** * Test the order of events and their properties for the successful up- and download of artifact and metadata. */ public static void testSuccessfulTransferEvents( RepositoryConnectorFactory factory, TestRepositorySystemSession session, RemoteRepository repository ) throws NoRepositoryConnectorException, IOException { RecordingTransferListener listener = new RecordingTransferListener( session.getTransferListener() ); session.setTransferListener( listener ); RepositoryConnector connector = factory.newInstance( session, repository ); byte[] pattern = "tmpFile".getBytes(); File tmpFile = TestFileUtils.createTempFile( pattern, 10000 ); long expectedBytes = tmpFile.length(); Collection artUps = ConnectorTestUtils.createTransfers( ArtifactUpload.class, 1, tmpFile ); Collection artDowns = ConnectorTestUtils.createTransfers( ArtifactDownload.class, 1, tmpFile ); Collection metaUps = ConnectorTestUtils.createTransfers( MetadataUpload.class, 1, tmpFile ); Collection metaDowns = ConnectorTestUtils.createTransfers( MetadataDownload.class, 1, tmpFile ); connector.put( artUps, null ); LinkedList events = new LinkedList( listener.getEvents() ); checkEvents( events, expectedBytes ); listener.clear(); connector.get( artDowns, null ); events = new LinkedList( listener.getEvents() ); checkEvents( events, expectedBytes ); listener.clear(); connector.put( null, metaUps ); events = new LinkedList( listener.getEvents() ); checkEvents( events, expectedBytes ); listener.clear(); connector.get( null, metaDowns ); events = new LinkedList( listener.getEvents() ); checkEvents( events, expectedBytes ); connector.close(); session.setTransferListener( null ); } private static void checkEvents( Queue events, long expectedBytes ) { TransferEvent currentEvent = events.poll(); String msg = "initiate event is missing"; assertNotNull( msg, currentEvent ); assertEquals( msg, INITIATED, currentEvent.getType() ); checkProperties( currentEvent ); TransferResource expectedResource = currentEvent.getResource(); currentEvent = events.poll(); msg = "start event is missing"; assertNotNull( msg, currentEvent ); assertEquals( msg, TransferEvent.EventType.STARTED, currentEvent.getType() ); assertEquals( "bad content length", expectedBytes, currentEvent.getResource().getContentLength() ); checkProperties( currentEvent ); assertResourceEquals( expectedResource, currentEvent.getResource() ); EventType progressed = TransferEvent.EventType.PROGRESSED; EventType succeeded = TransferEvent.EventType.SUCCEEDED; TransferEvent succeedEvent = null; int dataLength = 0; long transferredBytes = 0; while ( ( currentEvent = events.poll() ) != null ) { EventType currentType = currentEvent.getType(); assertResourceEquals( expectedResource, currentEvent.getResource() ); if ( succeeded.equals( currentType ) ) { succeedEvent = currentEvent; checkProperties( currentEvent ); break; } else { assertTrue( "event is not 'succeeded' and not 'progressed'", progressed.equals( currentType ) ); assertTrue( "wrong order of progressed events, transferredSize got smaller, last = " + transferredBytes + ", current = " + currentEvent.getTransferredBytes(), currentEvent.getTransferredBytes() >= transferredBytes ); assertEquals( "bad content length", expectedBytes, currentEvent.getResource().getContentLength() ); transferredBytes = currentEvent.getTransferredBytes(); dataLength += currentEvent.getDataBuffer().remaining(); checkProperties( currentEvent ); } } // all events consumed assertEquals( "too many events left: " + events.toString(), 0, events.size() ); // test transferred size assertEquals( "progress events transferred bytes don't match: data length does not add up", expectedBytes, dataLength ); assertEquals( "succeed event transferred bytes don't match", expectedBytes, succeedEvent.getTransferredBytes() ); } private static void assertResourceEquals( TransferResource expected, TransferResource actual ) { assertEquals( "TransferResource: content length does not match.", expected.getContentLength(), actual.getContentLength() ); assertEquals( "TransferResource: file does not match.", expected.getFile(), actual.getFile() ); assertEquals( "TransferResource: repo url does not match.", expected.getRepositoryUrl(), actual.getRepositoryUrl() ); assertEquals( "TransferResource: transfer start time does not match.", expected.getTransferStartTime(), actual.getTransferStartTime() ); assertEquals( "TransferResource: name does not match.", expected.getResourceName(), actual.getResourceName() ); } private static void checkProperties( TransferEvent event ) { assertNotNull( "resource is null for type: " + event.getType(), event.getResource() ); assertNotNull( "request type is null for type: " + event.getType(), event.getRequestType() ); assertNotNull( "type is null for type: " + event.getType(), event.getType() ); if ( PROGRESSED.equals( event.getType() ) ) { assertNotNull( "data buffer is null for type: " + event.getType(), event.getDataBuffer() ); assertTrue( "transferred byte is not set/not positive for type: " + event.getType(), event.getTransferredBytes() > -1 ); } else if ( SUCCEEDED.equals( event.getType() ) ) { assertTrue( "transferred byte is not set/not positive for type: " + event.getType(), event.getTransferredBytes() > -1 ); } } /** * Test the order of events and their properties for the unsuccessful up- and download of artifact and metadata. * Failure is triggered by setting the file to transfer to {@code null} for uploads, and asking for a non-existent * item for downloads. */ public static void testFailedTransferEvents( RepositoryConnectorFactory factory, TestRepositorySystemSession session, RemoteRepository repository ) throws NoRepositoryConnectorException, IOException { RecordingTransferListener listener = new RecordingTransferListener( session.getTransferListener() ); session.setTransferListener( listener ); RepositoryConnector connector = factory.newInstance( session, repository ); byte[] pattern = "tmpFile".getBytes( "us-ascii" ); File tmpFile = TestFileUtils.createTempFile( pattern, 10000 ); Collection artUps = ConnectorTestUtils.createTransfers( ArtifactUpload.class, 1, null ); Collection artDowns = ConnectorTestUtils.createTransfers( ArtifactDownload.class, 1, tmpFile ); Collection metaUps = ConnectorTestUtils.createTransfers( MetadataUpload.class, 1, null ); Collection metaDowns = ConnectorTestUtils.createTransfers( MetadataDownload.class, 1, tmpFile ); connector.put( artUps, null ); LinkedList events = new LinkedList( listener.getEvents() ); checkFailedEvents( events, null ); listener.clear(); connector.get( artDowns, null ); events = new LinkedList( listener.getEvents() ); checkFailedEvents( events, null ); listener.clear(); connector.put( null, metaUps ); events = new LinkedList( listener.getEvents() ); checkFailedEvents( events, null ); listener.clear(); connector.get( null, metaDowns ); events = new LinkedList( listener.getEvents() ); checkFailedEvents( events, null ); connector.close(); session.setTransferListener( null ); } private static void checkFailedEvents( Queue events, Class expectedError ) { if ( expectedError == null ) { expectedError = Throwable.class; } TransferEvent currentEvent = events.poll(); String msg = "initiate event is missing"; assertNotNull( msg, currentEvent ); assertEquals( msg, INITIATED, currentEvent.getType() ); checkProperties( currentEvent ); currentEvent = events.poll(); msg = "fail event is missing"; assertNotNull( msg, currentEvent ); assertEquals( msg, TransferEvent.EventType.FAILED, currentEvent.getType() ); checkProperties( currentEvent ); assertNotNull("exception is missing for fail event", currentEvent.getException() ); Exception exception = currentEvent.getException(); assertTrue( "exception is of wrong type, should be instance of " + expectedError + " but was " + exception.getClass(), expectedError.isAssignableFrom( exception.getClass() ) ); // all events consumed assertEquals( "too many events left: " + events.toString(), 0, events.size() ); } } aether-1.13.1/aether-test-util/src/main/java/org/sonatype/aether/test/util/impl/000077500000000000000000000000001167050556700275135ustar00rootroot00000000000000RepositoryTestContext.java000066400000000000000000000030071167050556700346630ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/main/java/org/sonatype/aether/test/util/implpackage org.sonatype.aether.test.util.impl; /******************************************************************************* * 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.artifact.Artifact; import org.sonatype.aether.test.impl.RecordingRepositoryListener; import org.sonatype.aether.test.impl.TestRepositorySystemSession; public class RepositoryTestContext { TestRepositorySystemSession session; Artifact artifact; public TestRepositorySystemSession getSession() { return session; } public void setSession( TestRepositorySystemSession session ) { this.session = session; } public Artifact getArtifact() { return artifact; } public void setArtifact( Artifact artifact ) { this.artifact = artifact; } public RecordingRepositoryListener getRecordingRepositoryListener() { if ( session.getRepositoryListener() instanceof RecordingRepositoryListener ) { return (RecordingRepositoryListener) session.getRepositoryListener(); } else { return new RecordingRepositoryListener( session.getRepositoryListener() ); } } } aether-1.13.1/aether-test-util/src/main/java/org/sonatype/aether/test/util/impl/StubArtifact.java000066400000000000000000000140641167050556700327560ustar00rootroot00000000000000package org.sonatype.aether.test.util.impl; /******************************************************************************* * 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.Collections; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.sonatype.aether.artifact.Artifact; /** * @author Benjamin Bentmann */ public class StubArtifact implements Artifact { private final String groupId; private final String artifactId; private final String version; private final String extension; private final String classifier; private File file; private final Map properties; public StubArtifact( String coords, Map properties ) { Pattern p = Pattern.compile( "([^: ]+):([^: ]+)(:([^: ]*)(:([^: ]+))?)?:([^: ]+)" ); Matcher m = p.matcher( coords ); if ( !m.matches() ) { throw new IllegalArgumentException( "Bad artifact coordinates" + ", expected format is :[:[:]]:" ); } groupId = m.group( 1 ); artifactId = m.group( 2 ); extension = get( m.group( 4 ), "jar" ); classifier = get( m.group( 6 ), "" ); version = m.group( 7 ); file = null; this.properties = properties; } public StubArtifact( String coords ) { this( coords, Collections.emptyMap()); } private static String get( String value, String defaultValue ) { return ( value == null || value.length() <= 0 ) ? defaultValue : value; } public StubArtifact( String groupId, String artifactId, String classifier, String extension, String version, Map properties ) { this.groupId = emptify( groupId ); this.artifactId = emptify( artifactId ); this.classifier = emptify( classifier ); this.extension = emptify( extension ); this.version = emptify( version ); this.file = null; this.properties = properties != null ? properties : Collections.emptyMap(); } public StubArtifact( String groupId, String artifactId, String classifier, String extension, String version ) { this( groupId, artifactId, classifier, extension, version, Collections.emptyMap()); } private static String emptify( String str ) { return ( str == null ) ? "" : str; } public String getGroupId() { return groupId; } public String getArtifactId() { return artifactId; } public String getVersion() { return version; } public Artifact setVersion( String version ) { if ( getVersion().equals( version ) ) { return this; } return new StubArtifact( getGroupId(), getArtifactId(), getClassifier(), getExtension(), version ); } public String getBaseVersion() { return version; } public boolean isSnapshot() { return getVersion().endsWith( "SNAPSHOT" ); } public String getClassifier() { return classifier; } public String getExtension() { return extension; } public File getFile() { return file; } public StubArtifact setFile( File file ) { if ( this.file != null && this.file.equals( file )) { return this; } return new StubArtifact( groupId, artifactId, classifier, extension, version, properties ).internalSetFile( file ); } protected StubArtifact internalSetFile( File file ) { this.file = file; return this; } public String getProperty( String key, String defaultValue ) { String value = properties.get( key ); return ( value != null ) ? value : defaultValue; } public Map getProperties() { return Collections.unmodifiableMap( properties ); } public Artifact setProperties( Map properties ) { if ( properties.equals( getProperties() ) ) { return this; } else { return new StubArtifact( groupId, artifactId, classifier, extension, version, properties ); } } @Override public boolean equals( Object obj ) { if ( obj == this ) { return true; } else if ( !( obj instanceof Artifact ) ) { return false; } Artifact that = (Artifact) obj; return getArtifactId().equals( that.getArtifactId() ) && getGroupId().equals( that.getGroupId() ) && getVersion().equals( that.getVersion() ) && getExtension().equals( that.getExtension() ) && getClassifier().equals( that.getClassifier() ) && eq( getFile(), that.getFile() ) && getProperties().equals( that.getProperties() ); } private static boolean eq( T s1, T s2 ) { return s1 != null ? s1.equals( s2 ) : s2 == null; } @Override public int hashCode() { int hash = 17; hash = hash * 31 + getGroupId().hashCode(); hash = hash * 31 + getArtifactId().hashCode(); hash = hash * 31 + getExtension().hashCode(); hash = hash * 31 + getClassifier().hashCode(); hash = hash * 31 + getVersion().hashCode(); hash = hash * 31 + hash( getFile() ); return hash; } private static int hash( Object obj ) { return ( obj != null ) ? obj.hashCode() : 0; } @Override public String toString() { return String.format( "%s:%s:%s:%s", getGroupId(), getArtifactId(), getExtension(), getVersion() ); } } aether-1.13.1/aether-test-util/src/main/java/org/sonatype/aether/test/util/impl/StubMetadata.java000066400000000000000000000152061167050556700327400ustar00rootroot00000000000000package org.sonatype.aether.test.util.impl; /******************************************************************************* * 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 org.sonatype.aether.metadata.Metadata; /** * @author Benjamin Bentmann */ public final class StubMetadata implements Metadata { private final String groupId; private final String artifactId; private final String version; private final String type; private final Nature nature; private final File file; public StubMetadata( String type, Nature nature ) { groupId = artifactId = version = ""; this.type = ( type != null ) ? type : ""; if ( nature == null ) { throw new IllegalArgumentException( "metadata nature was not specified" ); } this.nature = nature; this.file = null; } public StubMetadata( String groupId, String type, Nature nature ) { this.groupId = ( groupId != null ) ? groupId : ""; artifactId = version = ""; this.type = ( type != null ) ? type : ""; if ( nature == null ) { throw new IllegalArgumentException( "metadata nature was not specified" ); } this.nature = nature; this.file = null; } public StubMetadata( String groupId, String artifactId, String type, Nature nature ) { this.groupId = ( groupId != null ) ? groupId : ""; this.artifactId = ( artifactId != null ) ? artifactId : ""; version = ""; this.type = ( type != null ) ? type : ""; if ( nature == null ) { throw new IllegalArgumentException( "metadata nature was not specified" ); } this.nature = nature; this.file = null; } public StubMetadata( String groupId, String artifactId, String version, String type, Nature nature ) { this.groupId = ( groupId != null ) ? groupId : ""; this.artifactId = ( artifactId != null ) ? artifactId : ""; this.version = ( version != null ) ? version : ""; this.type = ( type != null ) ? type : ""; if ( nature == null ) { throw new IllegalArgumentException( "metadata nature was not specified" ); } this.nature = nature; this.file = null; } public StubMetadata( String groupId, String artifactId, String version, String type, Nature nature, File file ) { this.groupId = ( groupId != null ) ? groupId : ""; this.artifactId = ( artifactId != null ) ? artifactId : ""; this.version = ( version != null ) ? version : ""; this.type = ( type != null ) ? type : ""; if ( nature == null ) { throw new IllegalArgumentException( "metadata nature was not specified" ); } this.nature = nature; this.file = file; } public String getGroupId() { return groupId; } public String getArtifactId() { return artifactId; } public String getVersion() { return version; } public String getType() { return type; } public Nature getNature() { return nature; } public File getFile() { return file; } public Metadata setFile( File file ) { return new StubMetadata( groupId, artifactId, version, type, nature, file ); } @Override public String toString() { StringBuilder buffer = new StringBuilder( 128 ); if ( getGroupId().length() > 0 ) { buffer.append( getGroupId() ); } if ( getArtifactId().length() > 0 ) { buffer.append( ':' ).append( getArtifactId() ); } if ( getVersion().length() > 0 ) { buffer.append( ':' ).append( getVersion() ); } buffer.append( '/' ).append( getType() ); return buffer.toString(); } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ( ( artifactId == null ) ? 0 : artifactId.hashCode() ); result = prime * result + ( ( file == null ) ? 0 : file.hashCode() ); result = prime * result + ( ( groupId == null ) ? 0 : groupId.hashCode() ); result = prime * result + ( ( nature == null ) ? 0 : nature.hashCode() ); result = prime * result + ( ( type == null ) ? 0 : type.hashCode() ); result = prime * result + ( ( version == null ) ? 0 : version.hashCode() ); return result; } @Override public boolean equals( Object obj ) { if ( this == obj ) { return true; } if ( obj == null ) { return false; } if ( getClass() != obj.getClass() ) { return false; } StubMetadata other = (StubMetadata) obj; if ( artifactId == null ) { if ( other.artifactId != null ) { return false; } } else if ( !artifactId.equals( other.artifactId ) ) { return false; } if ( file == null ) { if ( other.file != null ) { return false; } } else if ( !file.equals( other.file ) ) { return false; } if ( groupId == null ) { if ( other.groupId != null ) { return false; } } else if ( !groupId.equals( other.groupId ) ) { return false; } if ( nature != other.nature ) { return false; } if ( type == null ) { if ( other.type != null ) { return false; } } else if ( !type.equals( other.type ) ) { return false; } if ( version == null ) { if ( other.version != null ) { return false; } } else if ( !version.equals( other.version ) ) { return false; } return true; } public StubMetadata setVersion( String version ) { return new StubMetadata( groupId, artifactId, version, type, nature, file ); } } aether-1.13.1/aether-test-util/src/main/java/org/sonatype/aether/test/util/impl/StubVersion.java000066400000000000000000000033341167050556700326440ustar00rootroot00000000000000package org.sonatype.aether.test.util.impl; /******************************************************************************* * 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.version.Version; /** * Version ordering by {@link String#compareToIgnoreCase(String)}. * * @author Benjamin Hanzelmann */ public final class StubVersion implements Version { private String version; public StubVersion( String version ) { this.version = version == null ? "" : version; } public int compareTo( Version o ) { return version.compareTo( o.toString()); } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ( ( version == null ) ? 0 : version.hashCode() ); return result; } @Override public boolean equals( Object obj ) { if ( this == obj ) return true; if ( obj == null ) return false; if ( getClass() != obj.getClass() ) return false; StubVersion other = (StubVersion) obj; if ( version == null ) { if ( other.version != null ) return false; } else if ( !version.equals( other.version ) ) return false; return true; } @Override public String toString() { return version; } } TestDependencyNode.java000066400000000000000000000162001167050556700340220ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/main/java/org/sonatype/aether/test/util/implpackage org.sonatype.aether.test.util.impl; /******************************************************************************* * 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 java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.graph.Dependency; import org.sonatype.aether.graph.DependencyNode; import org.sonatype.aether.graph.DependencyVisitor; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.version.Version; import org.sonatype.aether.version.VersionConstraint; /** * A node within a dependency graph. * * @author Benjamin Bentmann */ public class TestDependencyNode implements DependencyNode { private List children = new ArrayList( 0 ); private Dependency dependency; private List relocations = Collections.emptyList(); private Collection aliases = Collections.emptyList(); private VersionConstraint versionConstraint; private Version version; private String premanagedVersion; private String premanagedScope; private List repositories = Collections.emptyList(); private String context = ""; private Map data = new HashMap(); /** * Creates an empty dependency node. */ public TestDependencyNode() { // enables no-arg constructor } /** * Creates a new root node with the specified dependency. * * @param dependency The dependency associated with this node, may be {@code null}. */ public TestDependencyNode( Dependency dependency ) { this.dependency = dependency; } /** * Creates a shallow clone of the specified node. * * @param node The node to copy, must not be {@code null}. */ public TestDependencyNode( DependencyNode node ) { setDependency( node.getDependency() ); setAliases( node.getAliases() ); setRequestContext( node.getRequestContext() ); setPremanagedScope( node.getPremanagedScope() ); setPremanagedVersion( node.getPremanagedVersion() ); setRelocations( node.getRelocations() ); setRepositories( node.getRepositories() ); setVersion( node.getVersion() ); setVersionConstraint( node.getVersionConstraint() ); } public List getChildren() { return children; } public Dependency getDependency() { return dependency; } public void setDependency( Dependency dependency ) { this.dependency = dependency; } public void setArtifact( Artifact artifact ) { dependency = dependency.setArtifact( artifact ); } public List getRelocations() { return relocations; } /** * Sets the sequence of relocations that was followed to resolve this dependency's artifact. * * @param relocations The sequence of relocations, may be {@code null}. */ public void setRelocations( List relocations ) { if ( relocations == null || relocations.isEmpty() ) { this.relocations = Collections.emptyList(); } else { this.relocations = relocations; } } public Collection getAliases() { return aliases; } /** * Sets the known aliases for this dependency's artifact. * * @param aliases The known aliases, may be {@code null}. */ public void setAliases( Collection aliases ) { if ( aliases == null || aliases.isEmpty() ) { this.aliases = Collections.emptyList(); } else { this.aliases = aliases; } } public VersionConstraint getVersionConstraint() { return versionConstraint; } public void setVersionConstraint( VersionConstraint versionConstraint ) { this.versionConstraint = versionConstraint; } public Version getVersion() { return version; } public void setVersion( Version version ) { this.version = version; } public void setScope( String scope ) { dependency = dependency.setScope( scope ); } public String getPremanagedVersion() { return premanagedVersion; } /** * Sets the version or version range for this dependency before dependency management was applied (if any). * * @param premanagedVersion The originally declared dependency version or {@code null} if the version was not * managed. */ public void setPremanagedVersion( String premanagedVersion ) { this.premanagedVersion = premanagedVersion; } public String getPremanagedScope() { return premanagedScope; } /** * Sets the scope for this dependency before dependency management was applied (if any). * * @param premanagedScope The originally declared dependency scope or {@code null} if the scope was not managed. */ public void setPremanagedScope( String premanagedScope ) { this.premanagedScope = premanagedScope; } public List getRepositories() { return repositories; } /** * Sets the remote repositories from which this node's artifact shall be resolved. * * @param repositories The remote repositories to use for artifact resolution, may be {@code null}. */ public void setRepositories( List repositories ) { if ( repositories == null || repositories.isEmpty() ) { this.repositories = Collections.emptyList(); } else { this.repositories = repositories; } } public String getRequestContext() { return context; } public void setRequestContext( String context ) { this.context = ( context != null ) ? context : ""; } public Map getData() { return data; } public void setData( Object key, Object value ) { if ( value == null ) { data.remove( key ); } else { data.put( key, value ); } } public boolean accept( DependencyVisitor visitor ) { if ( visitor.visitEnter( this ) ) { for ( DependencyNode child : getChildren() ) { if ( !child.accept( visitor ) ) { break; } } } return visitor.visitLeave( this ); } @Override public String toString() { return String.valueOf( getDependency() ); } } TestVersionConstraint.java000066400000000000000000000071371167050556700346410ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/main/java/org/sonatype/aether/test/util/implpackage org.sonatype.aether.test.util.impl; /******************************************************************************* * 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.HashSet; import org.sonatype.aether.version.Version; import org.sonatype.aether.version.VersionConstraint; import org.sonatype.aether.version.VersionRange; /** * A constraint on versions for a dependency. * * @author Benjamin Bentmann */ final class TestVersionConstraint implements VersionConstraint { private Collection ranges = new HashSet(); private Version version; /** * Adds the specified version range to this constraint. All versions matched by the given range satisfy this * constraint. * * @param range The version range to add, may be {@code null}. * @return This constraint for chaining, never {@code null}. */ public TestVersionConstraint addRange( VersionRange range ) { if ( range != null ) { ranges.add( range ); } return this; } public Collection getRanges() { return ranges; } /** * Sets the recommended version to satisfy this constraint. * * @param version The recommended version for this constraint, may be {@code null} if none. * @return This constraint for chaining, never {@code null}. */ public TestVersionConstraint setVersion( Version version ) { this.version = version; return this; } public Version getVersion() { return version; } public boolean containsVersion( Version version ) { if ( ranges.isEmpty() ) { return version.equals( this.version ); } else { for ( VersionRange range : ranges ) { if ( range.containsVersion( version ) ) { return true; } } return false; } } @Override public String toString() { StringBuilder buffer = new StringBuilder( 128 ); for ( VersionRange range : getRanges() ) { if ( buffer.length() > 0 ) { buffer.append( "," ); } buffer.append( range ); } if ( buffer.length() <= 0 ) { buffer.append( getVersion() ); } return buffer.toString(); } @Override public boolean equals( Object obj ) { if ( this == obj ) { return true; } if ( obj == null || !getClass().equals( obj.getClass() ) ) { return false; } TestVersionConstraint that = (TestVersionConstraint) obj; return ranges.equals( that.getRanges() ) && eq( version, that.getVersion() ); } private static boolean eq( T s1, T s2 ) { return s1 != null ? s1.equals( s2 ) : s2 == null; } @Override public int hashCode() { int hash = 17; hash = hash * 31 + hash( getRanges() ); hash = hash * 31 + hash( getVersion() ); return hash; } private static int hash( Object obj ) { return obj != null ? obj.hashCode() : 0; } } TestVersionRange.java000066400000000000000000000164071167050556700335510ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/main/java/org/sonatype/aether/test/util/implpackage org.sonatype.aether.test.util.impl; /******************************************************************************* * 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.version.InvalidVersionSpecificationException; import org.sonatype.aether.version.Version; import org.sonatype.aether.version.VersionRange; /** * A version range inspired by mathematical range syntax. For example, "[1.0,2.0)", "[1.0,)" or "[1.0]". * * @author Benjamin Bentmann * @author Alin Dreghiciu */ final class TestVersionRange implements VersionRange { private final Version lowerBound; private final boolean lowerBoundInclusive; private final Version upperBound; private final boolean upperBoundInclusive; /** * Creates a version range from the specified range specification. * * @param range The range specification to parse, must not be {@code null}. * @throws InvalidVersionSpecificationException If the range could not be parsed. */ public TestVersionRange( String range ) throws InvalidVersionSpecificationException { String process = range; if ( range.startsWith( "[" ) ) { lowerBoundInclusive = true; } else if ( range.startsWith( "(" ) ) { lowerBoundInclusive = false; } else { throw new InvalidVersionSpecificationException( range, "Invalid version range " + range + ", a range must start with either [ or (" ); } if ( range.endsWith( "]" ) ) { upperBoundInclusive = true; } else if ( range.endsWith( ")" ) ) { upperBoundInclusive = false; } else { throw new InvalidVersionSpecificationException( range, "Invalid version range " + range + ", a range must end with either [ or (" ); } process = process.substring( 1, process.length() - 1 ); int index = process.indexOf( "," ); if ( index < 0 ) { if ( !lowerBoundInclusive || !upperBoundInclusive ) { throw new InvalidVersionSpecificationException( range, "Invalid version range " + range + ", single version must be surrounded by []" ); } lowerBound = upperBound = new StubVersion( process.trim() ); } else { String parsedLowerBound = process.substring( 0, index ).trim(); String parsedUpperBound = process.substring( index + 1 ).trim(); // more than two bounds, e.g. (1,2,3) if ( parsedUpperBound.contains( "," ) ) { throw new InvalidVersionSpecificationException( range, "Invalid version range " + range + ", bounds may not contain additional ','" ); } lowerBound = parsedLowerBound.length() > 0 ? new StubVersion( parsedLowerBound ) : null; upperBound = parsedUpperBound.length() > 0 ? new StubVersion( parsedUpperBound ) : null; if ( upperBound != null && lowerBound != null ) { if ( upperBound.compareTo( lowerBound ) < 0 ) { throw new InvalidVersionSpecificationException( range, "Invalid version range " + range + ", lower bound must not be greater than upper bound" ); } } } } public TestVersionRange( Version lowerBound, boolean lowerBoundInclusive, Version upperBound, boolean upperBoundInclusive ) { this.lowerBound = lowerBound; this.lowerBoundInclusive = lowerBoundInclusive; this.upperBound = upperBound; this.upperBoundInclusive = upperBoundInclusive; } public Version getLowerBound() { return lowerBound; } public boolean isLowerBoundInclusive() { return lowerBoundInclusive; } public Version getUpperBound() { return upperBound; } public boolean isUpperBoundInclusive() { return upperBoundInclusive; } public boolean acceptsSnapshots() { return isSnapshot( lowerBound ) || isSnapshot( upperBound ); } public boolean containsVersion( Version version ) { boolean snapshot = isSnapshot( version ); if ( lowerBound != null ) { int comparison = lowerBound.compareTo( version ); if ( snapshot && comparison == 0 ) { return true; } if ( comparison == 0 && !lowerBoundInclusive ) { return false; } if ( comparison > 0 ) { return false; } } if ( upperBound != null ) { int comparison = upperBound.compareTo( version ); if ( snapshot && comparison == 0 ) { return true; } if ( comparison == 0 && !upperBoundInclusive ) { return false; } if ( comparison < 0 ) { return false; } } if ( lowerBound != null || upperBound != null ) { return !snapshot; } return true; } private boolean isSnapshot( Version version ) { return version != null && version.toString().endsWith( "SNAPSHOT" ); } @Override public boolean equals( Object obj ) { if ( obj == this ) { return true; } else if ( obj == null || !getClass().equals( obj.getClass() ) ) { return false; } TestVersionRange that = (TestVersionRange) obj; return upperBoundInclusive == that.upperBoundInclusive && lowerBoundInclusive == that.lowerBoundInclusive && eq( upperBound, that.upperBound ) && eq( lowerBound, that.lowerBound ); } private static boolean eq( T s1, T s2 ) { return s1 != null ? s1.equals( s2 ) : s2 == null; } @Override public int hashCode() { int hash = 17; hash = hash * 31 + hash( upperBound ); hash = hash * 31 + ( upperBoundInclusive ? 1 : 0 ); hash = hash * 31 + hash( lowerBound ); hash = hash * 31 + ( lowerBoundInclusive ? 1 : 0 ); return hash; } private static int hash( Object obj ) { return obj != null ? obj.hashCode() : 0; } @Override public String toString() { StringBuilder buffer = new StringBuilder( 64 ); buffer.append( lowerBoundInclusive ? '[' : '(' ); if ( lowerBound != null ) { buffer.append( lowerBound ); } buffer.append( ',' ); if ( upperBound != null ) { buffer.append( upperBound ); } buffer.append( upperBoundInclusive ? ']' : ')' ); return buffer.toString(); } } TestVersionScheme.java000066400000000000000000000060741167050556700337200ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/main/java/org/sonatype/aether/test/util/implpackage org.sonatype.aether.test.util.impl; /******************************************************************************* * 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.version.InvalidVersionSpecificationException; import org.sonatype.aether.version.Version; import org.sonatype.aether.version.VersionConstraint; import org.sonatype.aether.version.VersionRange; import org.sonatype.aether.version.VersionScheme; /** * A version scheme using a generic version syntax. * * @author Benjamin Bentmann * @author Alin Dreghiciu */ public class TestVersionScheme implements VersionScheme { public Version parseVersion( final String version ) throws InvalidVersionSpecificationException { return new StubVersion( version ); } public VersionRange parseVersionRange( final String range ) throws InvalidVersionSpecificationException { return new TestVersionRange( range ); } public VersionConstraint parseVersionConstraint( final String constraint ) throws InvalidVersionSpecificationException { TestVersionConstraint result = new TestVersionConstraint(); String process = constraint; while ( process.startsWith( "[" ) || process.startsWith( "(" ) ) { int index1 = process.indexOf( ")" ); int index2 = process.indexOf( "]" ); int index = index2; if ( index2 < 0 || ( index1 >= 0 && index1 < index2 ) ) { index = index1; } if ( index < 0 ) { throw new InvalidVersionSpecificationException( constraint, "Unbounded version range " + constraint ); } VersionRange range = parseVersionRange( process.substring( 0, index + 1 ) ); result.addRange( range ); process = process.substring( index + 1 ).trim(); if ( process.length() > 0 && process.startsWith( "," ) ) { process = process.substring( 1 ).trim(); } } if ( process.length() > 0 && !result.getRanges().isEmpty() ) { throw new InvalidVersionSpecificationException( constraint, "Invalid version range " + constraint + ", expected [ or ( but got " + process ); } if ( result.getRanges().isEmpty() ) { result.setVersion( parseVersion( constraint ) ); } return result; } @Override public boolean equals( final Object obj ) { if ( this == obj ) { return true; } return obj != null && getClass().equals( obj.getClass() ); } @Override public int hashCode() { return getClass().hashCode(); } } aether-1.13.1/aether-test-util/src/test/000077500000000000000000000000001167050556700200275ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/test/java/000077500000000000000000000000001167050556700207505ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/test/java/org/000077500000000000000000000000001167050556700215375ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/test/java/org/sonatype/000077500000000000000000000000001167050556700234015ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/test/java/org/sonatype/aether/000077500000000000000000000000001167050556700246515ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/test/java/org/sonatype/aether/test/000077500000000000000000000000001167050556700256305ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/test/java/org/sonatype/aether/test/util/000077500000000000000000000000001167050556700266055ustar00rootroot00000000000000DependencyGraphParserTest.java000066400000000000000000000204031167050556700344450ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/test/java/org/sonatype/aether/test/utilpackage org.sonatype.aether.test.util; /******************************************************************************* * 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 static org.junit.Assert.*; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.util.Arrays; import java.util.List; import java.util.Map; import org.junit.Before; import org.junit.Test; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.graph.Dependency; import org.sonatype.aether.graph.DependencyNode; /** * @author Benjamin Hanzelmann */ public class DependencyGraphParserTest { private DependencyGraphParser parser; @Before public void setup() { this.parser = new DependencyGraphParser(); } @Test public void testOnlyRoot() throws IOException { String def = "gid:aid:jar:1:scope"; DependencyNode node = parser.parseLiteral( def ); assertNotNull( node ); assertEquals( 0, node.getChildren().size() ); Dependency dependency = node.getDependency(); assertNotNull( dependency ); assertEquals( "scope", dependency.getScope() ); Artifact artifact = dependency.getArtifact(); assertNotNull( artifact ); assertEquals( "gid", artifact.getGroupId() ); assertEquals( "aid", artifact.getArtifactId() ); assertEquals( "jar", artifact.getExtension() ); assertEquals( "1", artifact.getVersion() ); } @Test public void testOptionalScope() throws IOException { String def = "gid:aid:jar:1"; DependencyNode node = parser.parseLiteral( def ); assertNotNull( node ); assertEquals( 0, node.getChildren().size() ); Dependency dependency = node.getDependency(); assertNotNull( dependency ); assertEquals( "", dependency.getScope() ); } @Test public void testWithChildren() throws IOException { String def = "gid1:aid1:ext1:ver1:scope1\n" + "+- gid2:aid2:ext2:ver2:scope2\n" + "\\- gid3:aid3:ext3:ver3:scope3\n"; DependencyNode node = parser.parseLiteral( def ); assertNotNull( node ); int idx = 1; assertNodeProperties( node, idx++ ); List children = node.getChildren(); assertEquals( 2, children.size() ); for ( DependencyNode child : children ) { assertNodeProperties( child, idx++ ); } } @Test public void testDeepChildren() throws IOException { String def = "gid1:aid1:ext1:ver1\n" + "+- gid2:aid2:ext2:ver2:scope2\n" + "| \\- gid3:aid3:ext3:ver3\n" + "\\- gid4:aid4:ext4:ver4:scope4"; DependencyNode node = parser.parseLiteral( def ); assertNodeProperties( node, 1 ); assertEquals( 2, node.getChildren().size() ); assertNodeProperties( node.getChildren().get( 1 ), 4 ); DependencyNode lvl1Node = node.getChildren().get( 0 ); assertNodeProperties( lvl1Node, 2 ); assertEquals( 1, lvl1Node.getChildren().size() ); assertNodeProperties( lvl1Node.getChildren().get( 0 ), 3 ); } private void assertNodeProperties( DependencyNode node, int idx ) { assertNodeProperties( node, String.valueOf( idx ) ); } private void assertNodeProperties( DependencyNode node, String suffix ) { assertNotNull( node ); Dependency dependency = node.getDependency(); assertNotNull( dependency ); if ( !"".equals( dependency.getScope() ) ) { assertEquals( "scope" + suffix, dependency.getScope() ); } Artifact artifact = dependency.getArtifact(); assertNotNull( artifact ); assertEquals( "gid" + suffix, artifact.getGroupId() ); assertEquals( "aid" + suffix, artifact.getArtifactId() ); assertEquals( "ext" + suffix, artifact.getExtension() ); assertEquals( "ver" + suffix, artifact.getVersion() ); } @Test public void testComments() throws IOException { String def = "# first line\n#second line\ngid:aid:ext:ver # root artifact asdf:qwer:zcxv:uip"; DependencyNode node = parser.parseLiteral( def ); assertNodeProperties( node, "" ); } @Test public void testId() throws IOException { String def = "(id)gid:aid:ext:ver\n\\- ^id"; DependencyNode node = parser.parseLiteral( def ); assertNodeProperties( node, "" ); assertNotNull( node.getChildren() ); assertEquals( 1, node.getChildren().size() ); assertSame( node, node.getChildren().get( 0 ) ); } @Test public void testResourceLoading() throws UnsupportedEncodingException, IOException { String prefix = "org/sonatype/aether/test/util/"; String name = "testResourceLoading.txt"; DependencyNode node = parser.parse( prefix + name ); assertEquals( 0, node.getChildren().size() ); assertNodeProperties( node, "" ); } @Test public void testResourceLoadingWithPrefix() throws UnsupportedEncodingException, IOException { String prefix = "org/sonatype/aether/test/util/"; parser = new DependencyGraphParser( prefix ); String name = "testResourceLoading.txt"; DependencyNode node = parser.parse( name ); assertEquals( 0, node.getChildren().size() ); assertNodeProperties( node, "" ); } @Test public void testProperties() throws IOException { String def = "gid:aid:ext:ver;test=foo;test2=fizzle"; DependencyNode node = parser.parseLiteral( def ); assertNodeProperties( node, "" ); Map properties = node.getDependency().getArtifact().getProperties(); assertNotNull( properties ); assertEquals( 2, properties.size() ); assertTrue( properties.containsKey( "test" ) ); assertEquals( "foo", properties.get( "test" ) ); assertTrue( properties.containsKey( "test2" ) ); assertEquals( "fizzle", properties.get( "test2" ) ); } @Test public void testSubstitutions() throws IOException { parser.setSubstitutions( Arrays.asList( "subst1", "subst2" ) ); String def = "%s:%s:ext:ver"; DependencyNode root = parser.parseLiteral( def ); Artifact artifact = root.getDependency().getArtifact(); assertEquals( "subst2", artifact.getArtifactId() ); assertEquals( "subst1", artifact.getGroupId() ); def = "%s:aid:ext:ver\n\\- %s:aid:ext:ver"; root = parser.parseLiteral( def ); assertEquals( "subst1", root.getDependency().getArtifact().getGroupId() ); assertEquals( "subst2", root.getChildren().get( 0 ).getDependency().getArtifact().getGroupId() ); } @Test public void testMultiple() throws IOException { String prefix = "org/sonatype/aether/test/util/"; String name = "testResourceLoading.txt"; List nodes = parser.parseMultiple( prefix + name ); assertEquals( 2, nodes.size() ); assertEquals( "aid", nodes.get( 0 ).getDependency().getArtifact().getArtifactId() ); assertEquals( "aid2", nodes.get( 1 ).getDependency().getArtifact().getArtifactId() ); } @Test public void testRootNullDependency() throws IOException { String literal = "(null)\n+- gid:aid:ext:ver"; DependencyNode root = parser.parseLiteral( literal ); assertNull( root.getDependency() ); assertEquals( 1, root.getChildren().size() ); } @Test public void testChildNullDependency() throws IOException { String literal = "gid:aid:ext:ver\n+- (null)"; DependencyNode root = parser.parseLiteral( literal ); assertNotNull( root.getDependency() ); assertEquals( 1, root.getChildren().size() ); assertNull( root.getChildren().get( 0 ).getDependency() ); } } IniArtifactDataReaderTest.java000066400000000000000000000150441167050556700343470ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/test/java/org/sonatype/aether/test/utilpackage org.sonatype.aether.test.util; /******************************************************************************* * 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 static org.junit.Assert.*; import java.io.IOException; import java.util.Collection; import java.util.Iterator; import java.util.List; import org.junit.Before; import org.junit.Test; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.graph.Dependency; import org.sonatype.aether.graph.Exclusion; import org.sonatype.aether.repository.RemoteRepository; /** * @author Benjamin Hanzelmann */ public class IniArtifactDataReaderTest { private IniArtifactDataReader parser; @Before public void setup() throws Exception { this.parser = new IniArtifactDataReader( "org/sonatype/aether/test/util/" ); } @Test public void testRelocations() throws IOException { String def = "[relocations]\ngid:aid:ext:ver\ngid2:aid2:ext2:ver2"; ArtifactDescription description = parser.parseLiteral( def ); List relocations = description.getRelocations(); assertNotNull( relocations ); assertEquals( 2, relocations.size() ); Artifact artifact = relocations.get( 0 ); assertEquals( "aid", artifact.getArtifactId() ); assertEquals( "gid", artifact.getGroupId() ); assertEquals( "ver", artifact.getVersion() ); assertEquals( "ext", artifact.getExtension() ); artifact = relocations.get( 1 ); assertEquals( "aid2", artifact.getArtifactId() ); assertEquals( "gid2", artifact.getGroupId() ); assertEquals( "ver2", artifact.getVersion() ); assertEquals( "ext2", artifact.getExtension() ); } @Test public void testDependencies() throws IOException { String def = "[dependencies]\ngid:aid:ext:ver\n-exclusion:aid\ngid2:aid2:ext2:ver2"; ArtifactDescription description = parser.parseLiteral( def ); List dependencies = description.getDependencies(); assertNotNull( dependencies ); assertEquals( 2, dependencies.size() ); Dependency dependency = dependencies.get( 0 ); assertNotNull( dependency.getArtifact() ); Artifact artifact = dependency.getArtifact(); assertEquals( "aid", artifact.getArtifactId() ); assertEquals( "gid", artifact.getGroupId() ); assertEquals( "ver", artifact.getVersion() ); assertEquals( "ext", artifact.getExtension() ); Collection exclusions = dependency.getExclusions(); assertNotNull( exclusions ); assertEquals( 1, exclusions.size() ); Exclusion exclusion = exclusions.iterator().next(); assertEquals( "exclusion", exclusion.getGroupId() ); assertEquals( "aid", exclusion.getArtifactId() ); dependency = dependencies.get( 1 ); assertNotNull( dependency.getArtifact() ); artifact = dependency.getArtifact(); assertEquals( "aid2", artifact.getArtifactId() ); assertEquals( "gid2", artifact.getGroupId() ); assertEquals( "ver2", artifact.getVersion() ); assertEquals( "ext2", artifact.getExtension() ); } @Test public void testResource() throws IOException { ArtifactDescription description = parser.parse( "ArtifactDataReaderTest.ini" ); assertEquals( 1, description.getRelocations().size() ); Artifact artifact = description.getRelocations().get( 0 ); assertEquals( "gid", artifact.getGroupId() ); assertEquals( "aid", artifact.getArtifactId() ); assertEquals( "ver", artifact.getVersion() ); assertEquals( "ext", artifact.getExtension() ); assertEquals( 1, description.getRepositories().size() ); RemoteRepository repo = description.getRepositories().get( 0 ); assertEquals( "id", repo.getId() ); assertEquals( "type", repo.getContentType() ); assertEquals( "protocol://some/url?for=testing", repo.getUrl() ); assertDependencies( description.getDependencies() ); assertDependencies( description.getManagedDependencies() ); } private void assertDependencies( List deps ) { assertEquals( 4, deps.size() ); Dependency dep = deps.get( 0 ); assertEquals( "scope", dep.getScope() ); assertEquals( false, dep.isOptional() ); assertEquals( 2, dep.getExclusions().size() ); Iterator it = dep.getExclusions().iterator(); Exclusion excl = it.next(); assertEquals( "gid3", excl.getGroupId() ); assertEquals( "aid", excl.getArtifactId() ); excl = it.next(); assertEquals( "gid2", excl.getGroupId() ); assertEquals( "aid2", excl.getArtifactId() ); Artifact art = dep.getArtifact(); assertEquals( "gid", art.getGroupId() ); assertEquals( "aid", art.getArtifactId() ); assertEquals( "ver", art.getVersion() ); assertEquals( "ext", art.getExtension() ); dep = deps.get( 1 ); assertEquals( "scope", dep.getScope() ); assertEquals( true, dep.isOptional() ); assertEquals( 0, dep.getExclusions().size() ); art = dep.getArtifact(); assertEquals( "gid", art.getGroupId() ); assertEquals( "aid2", art.getArtifactId() ); assertEquals( "ver", art.getVersion() ); assertEquals( "ext", art.getExtension() ); dep = deps.get( 2 ); assertEquals( "scope", dep.getScope() ); assertEquals( true, dep.isOptional() ); assertEquals( 0, dep.getExclusions().size() ); art = dep.getArtifact(); assertEquals( "gid", art.getGroupId() ); assertEquals( "aid", art.getArtifactId() ); assertEquals( "ver3", art.getVersion() ); assertEquals( "ext", art.getExtension() ); dep = deps.get( 3 ); assertEquals( "scope5", dep.getScope() ); assertEquals( true, dep.isOptional() ); assertEquals( 0, dep.getExclusions().size() ); art = dep.getArtifact(); assertEquals( "gid1", art.getGroupId() ); assertEquals( "aid", art.getArtifactId() ); assertEquals( "ver", art.getVersion() ); assertEquals( "ext", art.getExtension() ); } } IniArtifactDescriptorReaderTest.java000066400000000000000000000124561167050556700356200ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/test/java/org/sonatype/aether/test/utilpackage org.sonatype.aether.test.util; /******************************************************************************* * 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 static org.junit.Assert.*; import java.io.IOException; import java.util.Iterator; import java.util.List; import org.junit.Before; import org.junit.Test; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.graph.Dependency; import org.sonatype.aether.graph.Exclusion; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.resolution.ArtifactDescriptorException; import org.sonatype.aether.resolution.ArtifactDescriptorRequest; import org.sonatype.aether.resolution.ArtifactDescriptorResult; import org.sonatype.aether.test.impl.TestRepositorySystemSession; import org.sonatype.aether.test.util.impl.StubArtifact; /** * @author Benjamin Hanzelmann * */ public class IniArtifactDescriptorReaderTest { private IniArtifactDescriptorReader reader; private RepositorySystemSession session; @Before public void setup() throws IOException { reader = new IniArtifactDescriptorReader( "org/sonatype/aether/test/util/" ); session = new TestRepositorySystemSession(); } @Test( expected = ArtifactDescriptorException.class ) public void testMissingDescriptor() throws ArtifactDescriptorException { StubArtifact art = new StubArtifact( "missing:aid:ver:ext" ); ArtifactDescriptorRequest request = new ArtifactDescriptorRequest( art, null, "" ); reader.readArtifactDescriptor( session, request ); } @Test public void testLookup() throws ArtifactDescriptorException { StubArtifact art = new StubArtifact( "gid:aid:ext:ver" ); ArtifactDescriptorRequest request = new ArtifactDescriptorRequest( art, null, "" ); ArtifactDescriptorResult description = reader.readArtifactDescriptor( session, request ); assertEquals(request, description.getRequest()); assertEquals( art, description.getArtifact() ); assertEquals( 1, description.getRelocations().size() ); Artifact artifact = description.getRelocations().get( 0 ); assertEquals( "gid", artifact.getGroupId() ); assertEquals( "aid", artifact.getArtifactId() ); assertEquals( "ver", artifact.getVersion() ); assertEquals( "ext", artifact.getExtension() ); assertEquals( 1, description.getRepositories().size() ); RemoteRepository repo = description.getRepositories().get( 0 ); assertEquals( "id", repo.getId() ); assertEquals( "type", repo.getContentType() ); assertEquals( "protocol://some/url?for=testing", repo.getUrl() ); assertDependencies( description.getDependencies() ); assertDependencies( description.getManagedDependencies() ); } private void assertDependencies( List deps ) { assertEquals( 4, deps.size() ); Dependency dep = deps.get( 0 ); assertEquals( "scope", dep.getScope() ); assertEquals( false, dep.isOptional() ); assertEquals( 2, dep.getExclusions().size() ); Iterator it = dep.getExclusions().iterator(); Exclusion excl = it.next(); assertEquals( "gid3", excl.getGroupId() ); assertEquals( "aid", excl.getArtifactId() ); excl = it.next(); assertEquals( "gid2", excl.getGroupId() ); assertEquals( "aid2", excl.getArtifactId() ); Artifact art = dep.getArtifact(); assertEquals( "gid", art.getGroupId() ); assertEquals( "aid", art.getArtifactId() ); assertEquals( "ver", art.getVersion() ); assertEquals( "ext", art.getExtension() ); dep = deps.get( 1 ); assertEquals( "scope", dep.getScope() ); assertEquals( true, dep.isOptional() ); assertEquals( 0, dep.getExclusions().size() ); art = dep.getArtifact(); assertEquals( "gid", art.getGroupId() ); assertEquals( "aid2", art.getArtifactId() ); assertEquals( "ver", art.getVersion() ); assertEquals( "ext", art.getExtension() ); dep = deps.get( 2 ); assertEquals( "scope", dep.getScope() ); assertEquals( true, dep.isOptional() ); assertEquals( 0, dep.getExclusions().size() ); art = dep.getArtifact(); assertEquals( "gid", art.getGroupId() ); assertEquals( "aid", art.getArtifactId() ); assertEquals( "ver3", art.getVersion() ); assertEquals( "ext", art.getExtension() ); dep = deps.get( 3 ); assertEquals( "scope5", dep.getScope() ); assertEquals( true, dep.isOptional() ); assertEquals( 0, dep.getExclusions().size() ); art = dep.getArtifact(); assertEquals( "gid1", art.getGroupId() ); assertEquals( "aid", art.getArtifactId() ); assertEquals( "ver", art.getVersion() ); assertEquals( "ext", art.getExtension() ); } } aether-1.13.1/aether-test-util/src/test/resources/000077500000000000000000000000001167050556700220415ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/test/resources/org/000077500000000000000000000000001167050556700226305ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/test/resources/org/sonatype/000077500000000000000000000000001167050556700244725ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/test/resources/org/sonatype/aether/000077500000000000000000000000001167050556700257425ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/test/resources/org/sonatype/aether/test/000077500000000000000000000000001167050556700267215ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/test/resources/org/sonatype/aether/test/util/000077500000000000000000000000001167050556700276765ustar00rootroot00000000000000ArtifactDataReaderTest.ini000066400000000000000000000006251167050556700346350ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/test/resources/org/sonatype/aether/test/util[relocations] gid:aid:ext:ver [dependencies] gid:aid:ext:ver:scope -gid3:aid -gid2:aid2 gid:aid2:ext:ver:scope:optional gid:aid:ext:ver3:scope:optional gid1:aid:ext:ver:scope5:optional [managedDependencies] gid:aid:ext:ver:scope -gid3:aid -gid2:aid2 gid:aid2:ext:ver:scope:optional gid:aid:ext:ver3:scope:optional gid1:aid:ext:ver:scope5:optional [repositories] id:type:protocol://some/url?for=testing aether-1.13.1/aether-test-util/src/test/resources/org/sonatype/aether/test/util/gid_aid_ver_ext.ini000066400000000000000000000006251167050556700335160ustar00rootroot00000000000000[relocations] gid:aid:ext:ver [dependencies] gid:aid:ext:ver:scope -gid3:aid -gid2:aid2 gid:aid2:ext:ver:scope:optional gid:aid:ext:ver3:scope:optional gid1:aid:ext:ver:scope5:optional [managedDependencies] gid:aid:ext:ver:scope -gid3:aid -gid2:aid2 gid:aid2:ext:ver:scope:optional gid:aid:ext:ver3:scope:optional gid1:aid:ext:ver:scope5:optional [repositories] id:type:protocol://some/url?for=testing testResourceLoading.txt000066400000000000000000000000441167050556700343430ustar00rootroot00000000000000aether-1.13.1/aether-test-util/src/test/resources/org/sonatype/aether/test/utilgid:aid:ext:ver --- gid:aid2:ext:veraether-1.13.1/aether-util/000077500000000000000000000000001167050556700153045ustar00rootroot00000000000000aether-1.13.1/aether-util/pom.xml000066400000000000000000000032041167050556700166200ustar00rootroot00000000000000 4.0.0 org.sonatype.aether aether 1.13.1 aether-util Aether :: Utilities A collection of utility classes to ease usage of the repository system. org.sonatype.aether aether-api org.sonatype.aether aether-test-util test junit junit test org.codehaus.mojo animal-sniffer-maven-plugin org.codehaus.mojo clirr-maven-plugin aether-1.13.1/aether-util/src/000077500000000000000000000000001167050556700160735ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/000077500000000000000000000000001167050556700170175ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/000077500000000000000000000000001167050556700177405ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/000077500000000000000000000000001167050556700205275ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/000077500000000000000000000000001167050556700223715ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/000077500000000000000000000000001167050556700236415ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/000077500000000000000000000000001167050556700246165ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/ChecksumUtils.java000066400000000000000000000125641167050556700302540ustar00rootroot00000000000000package org.sonatype.aether.util; /******************************************************************************* * 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.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.Collection; import java.util.LinkedHashMap; import java.util.Map; /** * A utility class to assist in the verification and generation of checksums. * * @author Benjamin Bentmann */ public class ChecksumUtils { private ChecksumUtils() { // hide constructor } /** * Extracts the checksum from the specified file. * * @param checksumFile The path to the checksum file, must not be {@code null}. * @return The checksum stored in the file, never {@code null}. * @throws IOException If the checksum does not exist or could not be read for other reasons. */ public static String read( File checksumFile ) throws IOException { String checksum = ""; FileInputStream fis = new FileInputStream( checksumFile ); try { BufferedReader br = new BufferedReader( new InputStreamReader( fis, "UTF-8" ) ); try { while ( true ) { String line = br.readLine(); if ( line == null ) { break; } line = line.trim(); if ( line.length() > 0 ) { checksum = line; break; } } } finally { try { br.close(); } catch ( IOException e ) { // ignored } } } finally { try { fis.close(); } catch ( IOException e ) { // ignored } } if ( checksum.matches( ".+= [0-9A-Fa-f]+" ) ) { int lastSpacePos = checksum.lastIndexOf( ' ' ); checksum = checksum.substring( lastSpacePos + 1 ); } else { int spacePos = checksum.indexOf( ' ' ); if ( spacePos != -1 ) { checksum = checksum.substring( 0, spacePos ); } } return checksum; } /** * Calculates checksums for the specified file. * * @param dataFile The file for which to calculate checksums, must not be {@code null}. * @param algos The names of checksum algorithms (cf. {@link MessageDigest#getInstance(String)} to use, must not be * {@code null}. * @return The calculated checksums, indexed by algorithm name, or the exception that occurred while trying to * calculate it, never {@code null}. * @throws IOException If the data file could not be read. */ public static Map calc( File dataFile, Collection algos ) throws IOException { Map results = new LinkedHashMap(); Map digests = new LinkedHashMap(); for ( String algo : algos ) { try { digests.put( algo, MessageDigest.getInstance( algo ) ); } catch ( NoSuchAlgorithmException e ) { results.put( algo, e ); } } FileInputStream fis = new FileInputStream( dataFile ); try { for ( byte[] buffer = new byte[32 * 1024];; ) { int read = fis.read( buffer ); if ( read < 0 ) { break; } for ( MessageDigest digest : digests.values() ) { digest.update( buffer, 0, read ); } } } finally { try { fis.close(); } catch ( IOException e ) { // ignored } } for ( Map.Entry entry : digests.entrySet() ) { byte[] bytes = entry.getValue().digest(); results.put( entry.getKey(), toHexString( bytes ) ); } return results; } private static String toHexString( byte[] bytes ) { StringBuilder buffer = new StringBuilder( bytes.length * 2 ); for ( int i = 0; i < bytes.length; i++ ) { int b = bytes[i] & 0xFF; if ( b < 0x10 ) { buffer.append( '0' ); } buffer.append( Integer.toHexString( b ) ); } return buffer.toString(); } } aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/ConfigUtils.java000066400000000000000000000303341167050556700277120ustar00rootroot00000000000000package org.sonatype.aether.util; /******************************************************************************* * 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 java.util.Collections; import java.util.List; import java.util.Map; import org.sonatype.aether.RepositorySystemSession; /** * A utility class to read configuration properties from a repository system session. * * @author Benjamin Bentmann * @see RepositorySystemSession#getConfigProperties() */ public class ConfigUtils { private ConfigUtils() { // hide constructor } /** * Gets the specified configuration property. * * @param properties The configuration properties 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}. * @param keys The properties to read, must not be {@code null}. The specified keys are read one after one until a * valid value is found. * @return The property value or {@code null} if none. */ public static Object getObject( Map properties, Object defaultValue, String... keys ) { for ( String key : keys ) { Object value = properties.get( key ); if ( value != null ) { return value; } } 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 defaultValue The default value to return in case the property isn't set, may be {@code null}. * @param keys The properties to read, must not be {@code null}. The specified keys are read one after one until a * valid value is found. * @return The property value or {@code null} if none. */ public static Object getObject( RepositorySystemSession session, Object defaultValue, String... keys ) { return getObject( session.getConfigProperties(), defaultValue, keys ); } /** * Gets the specified configuration property. * * @param properties The configuration properties 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}. * @param keys The properties to read, must not be {@code null}. The specified keys are read one after one until a * valid value is found. * @return The property value or {@code null} if none. */ public static String getString( Map properties, String defaultValue, String... keys ) { for ( String key : keys ) { Object value = properties.get( key ); if ( value instanceof String ) { return (String) value; } } 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 defaultValue The default value to return in case the property isn't set, may be {@code null}. * @param keys The properties to read, must not be {@code null}. The specified keys are read one after one until a * valid value is found. * @return The property value or {@code null} if none. */ public static String getString( RepositorySystemSession session, String defaultValue, String... keys ) { return getString( session.getConfigProperties(), defaultValue, keys ); } /** * Gets the specified configuration property. * * @param properties The configuration properties to read, must not be {@code null}. * @param defaultValue The default value to return in case the property isn't set. * @param keys The properties to read, must not be {@code null}. The specified keys are read one after one until a * valid value is found. * @return The property value. */ public static int getInteger( Map properties, int defaultValue, String... keys ) { for ( String key : keys ) { Object value = properties.get( key ); if ( value instanceof Number ) { return ( (Number) value ).intValue(); } try { return Integer.valueOf( (String) value ); } catch ( Exception e ) { // try next key } } 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 defaultValue The default value to return in case the property isn't set. * @param keys The properties to read, must not be {@code null}. The specified keys are read one after one until a * valid value is found. * @return The property value. */ public static int getInteger( RepositorySystemSession session, int defaultValue, String... keys ) { return getInteger( session.getConfigProperties(), defaultValue, keys ); } /** * Gets the specified configuration property. * * @param properties The configuration properties to read, must not be {@code null}. * @param defaultValue The default value to return in case the property isn't set. * @param keys The properties to read, must not be {@code null}. The specified keys are read one after one until a * valid value is found. * @return The property value. */ public static long getLong( Map properties, long defaultValue, String... keys ) { for ( String key : keys ) { Object value = properties.get( key ); if ( value instanceof Number ) { return ( (Number) value ).longValue(); } try { return Long.valueOf( (String) value ); } catch ( Exception e ) { // try next key } } 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 defaultValue The default value to return in case the property isn't set. * @param keys The properties to read, must not be {@code null}. The specified keys are read one after one until a * valid value is found. * @return The property value. */ public static long getLong( RepositorySystemSession session, long defaultValue, String... keys ) { return getLong( session.getConfigProperties(), defaultValue, keys ); } /** * Gets the specified configuration property. * * @param properties The configuration properties to read, must not be {@code null}. * @param defaultValue The default value to return in case the property isn't set. * @param keys The properties to read, must not be {@code null}. The specified keys are read one after one until a * valid value is found. * @return The property value. */ public static boolean getBoolean( Map properties, boolean defaultValue, String... keys ) { for ( String key : keys ) { Object value = properties.get( key ); if ( value instanceof Boolean ) { return ( (Boolean) value ).booleanValue(); } else if ( value instanceof String ) { return Boolean.parseBoolean( (String) value ); } } 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 defaultValue The default value to return in case the property isn't set. * @param keys The properties to read, must not be {@code null}. The specified keys are read one after one until a * valid value is found. * @return The property value. */ public static boolean getBoolean( RepositorySystemSession session, boolean defaultValue, String... keys ) { return getBoolean( session.getConfigProperties(), defaultValue, keys ); } /** * Gets the specified configuration property. * * @param properties The configuration properties 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}. * @param keys The properties to read, must not be {@code null}. The specified keys are read one after one until a * valid value is found. * @return The property value or {@code null} if none. */ public static List getList( Map properties, List defaultValue, String... keys ) { for ( String key : keys ) { Object value = properties.get( key ); if ( value instanceof List ) { return (List) value; } else if ( value instanceof Collection ) { return Collections.unmodifiableList( new ArrayList( (Collection) value ) ); } } 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 defaultValue The default value to return in case the property isn't set, may be {@code null}. * @param keys The properties to read, must not be {@code null}. The specified keys are read one after one until a * valid value is found. * @return The property value or {@code null} if none. */ public static List getList( RepositorySystemSession session, List defaultValue, String... keys ) { return getList( session.getConfigProperties(), defaultValue, keys ); } /** * Gets the specified configuration property. * * @param properties The configuration properties 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}. * @param keys The properties to read, must not be {@code null}. The specified keys are read one after one until a * valid value is found. * @return The property value or {@code null} if none. */ public static Map getMap( Map properties, Map defaultValue, String... keys ) { for ( String key : keys ) { Object value = properties.get( key ); if ( value instanceof Map ) { return (Map) value; } } 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 defaultValue The default value to return in case the property isn't set, may be {@code null}. * @param keys The properties to read, must not be {@code null}. The specified keys are read one after one until a * valid value is found. * @return The property value or {@code null} if none. */ public static Map getMap( RepositorySystemSession session, Map defaultValue, String... keys ) { return getMap( session.getConfigProperties(), defaultValue, keys ); } } aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/DefaultRepositoryCache.java000066400000000000000000000024671167050556700321020ustar00rootroot00000000000000package org.sonatype.aether.util; /******************************************************************************* * 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 java.util.concurrent.ConcurrentHashMap; import org.sonatype.aether.RepositoryCache; import org.sonatype.aether.RepositorySystemSession; /** * A simplistic repository cache backed by a {@link ConcurrentHashMap}. The simplistic nature of this cache makes it * only suitable for use with short-lived repository system sessions. * * @author Benjamin Bentmann */ public class DefaultRepositoryCache implements RepositoryCache { private Map cache = new ConcurrentHashMap( 256 ); public Object get( RepositorySystemSession session, Object key ) { return cache.get( key ); } public void put( RepositorySystemSession session, Object key, Object data ) { if ( data != null ) { cache.put( key, data ); } } } aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/DefaultRepositorySystemSession.java000066400000000000000000000711661167050556700337310ustar00rootroot00000000000000package org.sonatype.aether.util; /******************************************************************************* * 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.HashMap; import java.util.Hashtable; import java.util.LinkedHashMap; import java.util.Map; import org.sonatype.aether.RepositoryCache; import org.sonatype.aether.RepositoryListener; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.SessionData; import org.sonatype.aether.artifact.ArtifactType; 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.Authentication; 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.Proxy; import org.sonatype.aether.repository.ProxySelector; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.repository.RepositoryPolicy; import org.sonatype.aether.repository.WorkspaceReader; import org.sonatype.aether.transfer.TransferListener; import org.sonatype.aether.util.graph.manager.NoopDependencyManager; import org.sonatype.aether.util.graph.selector.StaticDependencySelector; import org.sonatype.aether.util.graph.transformer.NoopDependencyGraphTransformer; import org.sonatype.aether.util.graph.traverser.StaticDependencyTraverser; /** * A simple repository system session. Note: This class is not thread-safe. It is assumed that the mutators get * only called during an initialize phase and the session itself is not changed when being used by the repository * system. * * @author Benjamin Bentmann */ public class DefaultRepositorySystemSession implements RepositorySystemSession { private static final DependencyTraverser TRAVERSER = new StaticDependencyTraverser( true ); private static final DependencyManager MANAGER = NoopDependencyManager.INSTANCE; private static final DependencySelector SELECTOR = new StaticDependencySelector( true ); private static final DependencyGraphTransformer TRANSFORMER = NoopDependencyGraphTransformer.INSTANCE; private boolean offline; private boolean transferErrorCachingEnabled; private boolean notFoundCachingEnabled; private boolean ignoreMissingArtifactDescriptor; private boolean ignoreInvalidArtifactDescriptor; private String checksumPolicy; private String updatePolicy; private LocalRepositoryManager localRepositoryManager; private WorkspaceReader workspaceReader; private RepositoryListener repositoryListener; private TransferListener transferListener; private Map systemProperties = new HashMap(); private Map userProperties = new HashMap(); private Map configProperties = new HashMap(); private MirrorSelector mirrorSelector = NullMirrorSelector.INSTANCE; private ProxySelector proxySelector = NullProxySelector.INSTANCE; private AuthenticationSelector authenticationSelector = NullAuthenticationSelector.INSTANCE; private ArtifactTypeRegistry artifactTypeRegistry = NullArtifactTypeRegistry.INSTANCE; private DependencyTraverser dependencyTraverser = TRAVERSER; private DependencyManager dependencyManager = MANAGER; private DependencySelector dependencySelector = SELECTOR; private DependencyGraphTransformer dependencyGraphTransformer = TRANSFORMER; private SessionData data = new DefaultSessionData(); private RepositoryCache cache; /** * Creates an uninitialized session. */ public DefaultRepositorySystemSession() { // enables default constructor } /** * Creates a shallow copy of the specified session. * * @param session The session to copy, must not be {@code null}. */ public DefaultRepositorySystemSession( RepositorySystemSession session ) { setOffline( session.isOffline() ); setTransferErrorCachingEnabled( session.isTransferErrorCachingEnabled() ); setNotFoundCachingEnabled( session.isNotFoundCachingEnabled() ); setIgnoreInvalidArtifactDescriptor( session.isIgnoreInvalidArtifactDescriptor() ); setIgnoreMissingArtifactDescriptor( session.isIgnoreMissingArtifactDescriptor() ); setChecksumPolicy( session.getChecksumPolicy() ); setUpdatePolicy( session.getUpdatePolicy() ); setLocalRepositoryManager( session.getLocalRepositoryManager() ); setWorkspaceReader( session.getWorkspaceReader() ); setRepositoryListener( session.getRepositoryListener() ); setTransferListener( session.getTransferListener() ); setSystemProperties( session.getSystemProperties() ); setUserProperties( session.getUserProperties() ); setConfigProperties( session.getConfigProperties() ); setMirrorSelector( session.getMirrorSelector() ); setProxySelector( session.getProxySelector() ); setAuthenticationSelector( session.getAuthenticationSelector() ); setArtifactTypeRegistry( session.getArtifactTypeRegistry() ); setDependencyTraverser( session.getDependencyTraverser() ); setDependencyManager( session.getDependencyManager() ); setDependencySelector( session.getDependencySelector() ); setDependencyGraphTransformer( session.getDependencyGraphTransformer() ); setData( session.getData() ); setCache( session.getCache() ); } public boolean isOffline() { return offline; } /** * Controls whether the repository system operates in offline mode and avoids/refuses any access to remote * repositories. * * @param offline {@code true} if the repository system is in offline mode, {@code false} otherwise. * @return This session for chaining, never {@code null}. */ public DefaultRepositorySystemSession setOffline( boolean offline ) { this.offline = offline; return this; } public boolean isTransferErrorCachingEnabled() { return transferErrorCachingEnabled; } /** * Controls 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. * * @param transferErrorCachingEnabled {@code true} to cache transfer errors, {@code false} to always reattempt * downloading. * @return This session for chaining, never {@code null}. */ public DefaultRepositorySystemSession setTransferErrorCachingEnabled( boolean transferErrorCachingEnabled ) { this.transferErrorCachingEnabled = transferErrorCachingEnabled; return this; } public boolean isNotFoundCachingEnabled() { return notFoundCachingEnabled; } /** * Controls 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. * * @param notFoundCachingEnabled {@code true} if to cache missing resources, {@code false} to always reattempt * downloading. * @return This session for chaining, never {@code null}. */ public DefaultRepositorySystemSession setNotFoundCachingEnabled( boolean notFoundCachingEnabled ) { this.notFoundCachingEnabled = notFoundCachingEnabled; return this; } public boolean isIgnoreMissingArtifactDescriptor() { return ignoreMissingArtifactDescriptor; } /** * Controls whether missing artifact descriptors are silently ignored. If enabled and no artifact descriptor is * available, an empty stub descriptor is used instead. * * @param ignoreMissingArtifactDescriptor {@code true} if to ignore missing artifact descriptors, {@code false} to * fail the operation with an exception. * @return This session for chaining, never {@code null}. */ public DefaultRepositorySystemSession setIgnoreMissingArtifactDescriptor( boolean ignoreMissingArtifactDescriptor ) { this.ignoreMissingArtifactDescriptor = ignoreMissingArtifactDescriptor; return this; } public boolean isIgnoreInvalidArtifactDescriptor() { return ignoreInvalidArtifactDescriptor; } /** * Controls whether invalid artifact descriptors are silently ignored. If enabled and an artifact descriptor is * invalid, an empty stub descriptor is used instead. * * @param ignoreInvalidArtifactDescriptor {@code true} if to ignore invalid artifact descriptors, {@code false} to * fail the operation with an exception. * @return This session for chaining, never {@code null}. */ public DefaultRepositorySystemSession setIgnoreInvalidArtifactDescriptor( boolean ignoreInvalidArtifactDescriptor ) { this.ignoreInvalidArtifactDescriptor = ignoreInvalidArtifactDescriptor; return this; } public String getChecksumPolicy() { return checksumPolicy; } /** * Sets the global checksum policy. If set, the global checksum policy overrides the checksum policies of the remote * repositories being used for resolution. * * @param checksumPolicy The global checksum policy, may be {@code null}/empty to apply the per-repository policies. * @return This session for chaining, never {@code null}. * @see RepositoryPolicy#CHECKSUM_POLICY_FAIL * @see RepositoryPolicy#CHECKSUM_POLICY_IGNORE * @see RepositoryPolicy#CHECKSUM_POLICY_WARN */ public DefaultRepositorySystemSession setChecksumPolicy( String checksumPolicy ) { this.checksumPolicy = checksumPolicy; return this; } public String getUpdatePolicy() { return updatePolicy; } /** * Sets the global update policy. If set, the global update policy overrides the update policies of the remote * repositories being used for resolution. * * @param updatePolicy The global update policy, may be {@code null}/empty to apply the per-repository policies. * @return This session for chaining, never {@code null}. * @see RepositoryPolicy#UPDATE_POLICY_ALWAYS * @see RepositoryPolicy#UPDATE_POLICY_DAILY * @see RepositoryPolicy#UPDATE_POLICY_NEVER */ public DefaultRepositorySystemSession setUpdatePolicy( String updatePolicy ) { this.updatePolicy = updatePolicy; return this; } public LocalRepository getLocalRepository() { LocalRepositoryManager lrm = getLocalRepositoryManager(); return ( lrm != null ) ? lrm.getRepository() : null; } public LocalRepositoryManager getLocalRepositoryManager() { return localRepositoryManager; } /** * Sets the local repository manager used during this session. Eventually, a valid session must have a local * repository manager set. * * @param localRepositoryManager The local repository manager used during this session, may be {@code null}. * @return This session for chaining, never {@code null}. */ public DefaultRepositorySystemSession setLocalRepositoryManager( LocalRepositoryManager localRepositoryManager ) { this.localRepositoryManager = localRepositoryManager; return this; } public WorkspaceReader getWorkspaceReader() { return workspaceReader; } /** * Sets the workspace reader used during this session. If set, the workspace reader will usually be consulted first * to resolve artifacts. * * @param workspaceReader The workspace reader for this session, may be {@code null} if none. * @return This session for chaining, never {@code null}. */ public DefaultRepositorySystemSession setWorkspaceReader( WorkspaceReader workspaceReader ) { this.workspaceReader = workspaceReader; return this; } public RepositoryListener getRepositoryListener() { return repositoryListener; } /** * Sets the listener being notified of actions in the repository system. * * @param repositoryListener The repository listener, may be {@code null} if none. * @return This session for chaining, never {@code null}. */ public DefaultRepositorySystemSession setRepositoryListener( RepositoryListener repositoryListener ) { this.repositoryListener = repositoryListener; return this; } public TransferListener getTransferListener() { return transferListener; } /** * Sets the listener being notified of uploads/downloads by the repository system. * * @param transferListener The transfer listener, may be {@code null} if none. * @return This session for chaining, never {@code null}. */ public DefaultRepositorySystemSession setTransferListener( TransferListener transferListener ) { this.transferListener = transferListener; return this; } private Map toSafeMap( Map table, Class valueType ) { Map map; if ( table == null || table.isEmpty() ) { map = new HashMap(); } else { map = new LinkedHashMap(); for ( Object key : table.keySet() ) { if ( key instanceof String ) { Object value = table.get( key ); if ( valueType.isInstance( value ) ) { map.put( key.toString(), valueType.cast( value ) ); } } } } return map; } public Map getSystemProperties() { return systemProperties; } /** * Sets 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. * * @param systemProperties The system properties, may be {@code null} or empty if none. * @return This session for chaining, never {@code null}. */ public DefaultRepositorySystemSession setSystemProperties( Map systemProperties ) { if ( systemProperties == null ) { this.systemProperties = new HashMap(); } else { this.systemProperties = systemProperties; } return this; } /** * Sets 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. * * @param systemProperties The system properties, may be {@code null} or empty if none. * @return This session for chaining, never {@code null}. */ public DefaultRepositorySystemSession setSystemProps( Hashtable systemProperties ) { this.systemProperties = toSafeMap( systemProperties, String.class ); return this; } /** * Sets the specified system property. * * @param key The property key, must not be {@code null}. * @param value The property value, may be {@code null} to remove/unset the property. * @return This session for chaining, never {@code null}. */ public DefaultRepositorySystemSession setSystemProperty( String key, String value ) { if ( value != null ) { systemProperties.put( key, value ); } else { systemProperties.remove( key ); } return this; } public Map getUserProperties() { return userProperties; } /** * Sets 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. * * @param userProperties The user properties, may be {@code null} or empty if none. * @return This session for chaining, never {@code null}. */ public DefaultRepositorySystemSession setUserProperties( Map userProperties ) { if ( userProperties == null ) { this.userProperties = new HashMap(); } else { this.userProperties = userProperties; } return this; } /** * Sets 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. * * @param userProperties The user properties, may be {@code null} or empty if none. * @return This session for chaining, never {@code null}. */ public DefaultRepositorySystemSession setUserProps( Map userProperties ) { this.userProperties = toSafeMap( userProperties, String.class ); return this; } /** * Sets the specified user property. * * @param key The property key, must not be {@code null}. * @param value The property value, may be {@code null} to remove/unset the property. * @return This session for chaining, never {@code null}. */ public DefaultRepositorySystemSession setUserProperty( String key, String value ) { if ( value != null ) { userProperties.put( key, value ); } else { userProperties.remove( key ); } return this; } public Map getConfigProperties() { return configProperties; } /** * Sets the configuration properties used to tweak internal aspects of the repository system (e.g. thread pooling, * connector-specific behavior, etc.) * * @param configProperties The configuration properties, may be {@code null} or empty if none. * @return This session for chaining, never {@code null}. */ public DefaultRepositorySystemSession setConfigProperties( Map configProperties ) { if ( configProperties == null ) { this.configProperties = new HashMap(); } else { this.configProperties = configProperties; } return this; } /** * Sets the configuration properties used to tweak internal aspects of the repository system (e.g. thread pooling, * connector-specific behavior, etc.) * * @param configProperties The configuration properties, may be {@code null} or empty if none. * @return This session for chaining, never {@code null}. */ public DefaultRepositorySystemSession setConfigProps( Map configProperties ) { this.configProperties = toSafeMap( configProperties, Object.class ); return this; } /** * Sets the specified configuration property. * * @param key The property key, must not be {@code null}. * @param value The property value, may be {@code null} to remove/unset the property. * @return This session for chaining, never {@code null}. */ public DefaultRepositorySystemSession setConfigProperty( String key, Object value ) { if ( value != null ) { configProperties.put( key, value ); } else { configProperties.remove( key ); } return this; } public MirrorSelector getMirrorSelector() { return mirrorSelector; } /** * Sets 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. * * @param mirrorSelector The mirror selector to use, may be {@code null}. * @return This session for chaining, never {@code null}. */ public DefaultRepositorySystemSession setMirrorSelector( MirrorSelector mirrorSelector ) { this.mirrorSelector = mirrorSelector; if ( this.mirrorSelector == null ) { this.mirrorSelector = NullMirrorSelector.INSTANCE; } return this; } public ProxySelector getProxySelector() { return proxySelector; } /** * Sets 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. * * @param proxySelector The proxy selector to use, may be {@code null}. * @return This session for chaining, never {@code null}. * @see org.sonatype.aether.repository.RemoteRepository#getProxy() */ public DefaultRepositorySystemSession setProxySelector( ProxySelector proxySelector ) { this.proxySelector = proxySelector; if ( this.proxySelector == null ) { this.proxySelector = NullProxySelector.INSTANCE; } return this; } public AuthenticationSelector getAuthenticationSelector() { return authenticationSelector; } /** * Sets 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. * * @param authenticationSelector The authentication selector to use, may be {@code null}. * @return This session for chaining, never {@code null}. * @see org.sonatype.aether.repository.RemoteRepository#getAuthentication() */ public DefaultRepositorySystemSession setAuthenticationSelector( AuthenticationSelector authenticationSelector ) { this.authenticationSelector = authenticationSelector; if ( this.authenticationSelector == null ) { this.authenticationSelector = NullAuthenticationSelector.INSTANCE; } return this; } public ArtifactTypeRegistry getArtifactTypeRegistry() { return artifactTypeRegistry; } /** * Sets the registry of artifact types recognized by this session. * * @param artifactTypeRegistry The artifact type registry, may be {@code null}. * @return This session for chaining, never {@code null}. */ public DefaultRepositorySystemSession setArtifactTypeRegistry( ArtifactTypeRegistry artifactTypeRegistry ) { this.artifactTypeRegistry = artifactTypeRegistry; if ( this.artifactTypeRegistry == null ) { this.artifactTypeRegistry = NullArtifactTypeRegistry.INSTANCE; } return this; } public DependencyTraverser getDependencyTraverser() { return dependencyTraverser; } /** * Sets the dependency traverser to use for building dependency graphs. * * @param dependencyTraverser The dependency traverser to use for building dependency graphs, may be {@code null}. * @return This session for chaining, never {@code null}. */ public DefaultRepositorySystemSession setDependencyTraverser( DependencyTraverser dependencyTraverser ) { this.dependencyTraverser = dependencyTraverser; if ( this.dependencyTraverser == null ) { this.dependencyTraverser = TRAVERSER; } return this; } public DependencyManager getDependencyManager() { return dependencyManager; } /** * Sets the dependency manager to use for building dependency graphs. * * @param dependencyManager The dependency manager to use for building dependency graphs, may be {@code null}. * @return This session for chaining, never {@code null}. */ public DefaultRepositorySystemSession setDependencyManager( DependencyManager dependencyManager ) { this.dependencyManager = dependencyManager; if ( this.dependencyManager == null ) { this.dependencyManager = MANAGER; } return this; } public DependencySelector getDependencySelector() { return dependencySelector; } /** * Sets the dependency selector to use for building dependency graphs. * * @param dependencySelector The dependency selector to use for building dependency graphs, may be {@code null}. * @return This session for chaining, never {@code null}. */ public DefaultRepositorySystemSession setDependencySelector( DependencySelector dependencySelector ) { this.dependencySelector = dependencySelector; if ( this.dependencySelector == null ) { this.dependencySelector = SELECTOR; } return this; } public DependencyGraphTransformer getDependencyGraphTransformer() { return dependencyGraphTransformer; } /** * Sets the dependency graph transformer to use for building dependency graphs. * * @param dependencyGraphTransformer The dependency graph transformer to use for building dependency graphs, may be * {@code null}. * @return This session for chaining, never {@code null}. */ public DefaultRepositorySystemSession setDependencyGraphTransformer( DependencyGraphTransformer dependencyGraphTransformer ) { this.dependencyGraphTransformer = dependencyGraphTransformer; if ( this.dependencyGraphTransformer == null ) { this.dependencyGraphTransformer = TRANSFORMER; } return this; } public SessionData getData() { return data; } /** * Sets the custom data associated with this session. * * @param data The session data, may be {@code null}. * @return This session for chaining, never {@code null}. */ public DefaultRepositorySystemSession setData( SessionData data ) { this.data = data; if ( this.data == null ) { this.data = new DefaultSessionData(); } return this; } public RepositoryCache getCache() { return cache; } /** * Sets the cache the repository system may use to save data for future reuse during the session. * * @param cache The repository cache, may be {@code null} if none. * @return This session for chaining, never {@code null}. */ public DefaultRepositorySystemSession setCache( RepositoryCache cache ) { this.cache = cache; return this; } static class NullProxySelector implements ProxySelector { public static final ProxySelector INSTANCE = new NullProxySelector(); public Proxy getProxy( RemoteRepository repository ) { return repository.getProxy(); } } static class NullMirrorSelector implements MirrorSelector { public static final MirrorSelector INSTANCE = new NullMirrorSelector(); public RemoteRepository getMirror( RemoteRepository repository ) { return null; } } static class NullAuthenticationSelector implements AuthenticationSelector { public static final AuthenticationSelector INSTANCE = new NullAuthenticationSelector(); public Authentication getAuthentication( RemoteRepository repository ) { return repository.getAuthentication(); } } static class NullArtifactTypeRegistry implements ArtifactTypeRegistry { public static final ArtifactTypeRegistry INSTANCE = new NullArtifactTypeRegistry(); public ArtifactType get( String typeId ) { return null; } } } aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/DefaultRequestTrace.java000066400000000000000000000042131167050556700313750ustar00rootroot00000000000000package org.sonatype.aether.util; /******************************************************************************* * 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.RequestTrace; /** * A simple request trace. * * @author Benjamin Bentmann */ public class DefaultRequestTrace implements RequestTrace { private final RequestTrace parent; private final Object data; /** * Creates a child of the specified request trace. This method is basically a convenience that will invoke * {@link RequestTrace#newChild(Object)} when the specified parent trace is not {@code null} or otherwise * instantiante a new root trace. * * @param parent The parent request trace, may be {@code null}. * @param data The data to associate with the child trace, may be {@code null}. * @return The child trace, never {@code null}. */ public static RequestTrace newChild( RequestTrace parent, Object data ) { if ( parent == null ) { return new DefaultRequestTrace( data ); } return parent.newChild( data ); } /** * Creates a new root trace with the specified data. * * @param data The data to associate with the trace, may be {@code null}. */ public DefaultRequestTrace( Object data ) { this( null, data ); } private DefaultRequestTrace( RequestTrace parent, Object data ) { this.parent = parent; this.data = data; } public Object getData() { return data; } public RequestTrace getParent() { return parent; } public RequestTrace newChild( Object data ) { return new DefaultRequestTrace( this, data ); } @Override public String toString() { return String.valueOf( getData() ); } } aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/DefaultSessionData.java000066400000000000000000000037321167050556700312100ustar00rootroot00000000000000package org.sonatype.aether.util; /******************************************************************************* * 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.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import org.sonatype.aether.SessionData; /** * A simple session data storage backed by a thread-safe map. * * @author Benjamin Bentmann */ public class DefaultSessionData implements SessionData { private final ConcurrentMap data; public DefaultSessionData() { data = new ConcurrentHashMap(); } public void set( Object key, Object value ) { if ( key == null ) { throw new IllegalArgumentException( "key must not be null" ); } if ( value != null ) { data.put( key, value ); } else { data.remove( key ); } } public boolean set( Object key, Object oldValue, Object newValue ) { if ( key == null ) { throw new IllegalArgumentException( "key must not be null" ); } if ( newValue != null ) { if ( oldValue == null ) { return data.putIfAbsent( key, newValue ) == null; } return data.replace( key, oldValue, newValue ); } else { return data.remove( key, oldValue ); } } public Object get( Object key ) { if ( key == null ) { throw new IllegalArgumentException( "key must not be null" ); } return data.get( key ); } } aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/FilterRepositorySystemSession.java000066400000000000000000000113621167050556700335620ustar00rootroot00000000000000package org.sonatype.aether.util; /******************************************************************************* * 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.RepositoryCache; import org.sonatype.aether.RepositoryListener; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.SessionData; 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.WorkspaceReader; import org.sonatype.aether.transfer.TransferListener; /** * A repository system session that wraps another session. This class exists merely for the purpose of sub classing * where a sub class would intercept one or more methods and present alternative settings to the caller. * * @author Benjamin Bentmann */ public class FilterRepositorySystemSession implements RepositorySystemSession { protected RepositorySystemSession session; /** * Creates a new repository system session that wraps the specified session. * * @param session The repository system session to wrap, must not be {@code null}. */ protected FilterRepositorySystemSession( RepositorySystemSession session ) { this.session = session; } public ArtifactTypeRegistry getArtifactTypeRegistry() { return session.getArtifactTypeRegistry(); } public AuthenticationSelector getAuthenticationSelector() { return session.getAuthenticationSelector(); } public RepositoryCache getCache() { return session.getCache(); } public String getChecksumPolicy() { return session.getChecksumPolicy(); } public Map getConfigProperties() { return session.getConfigProperties(); } public DependencyGraphTransformer getDependencyGraphTransformer() { return session.getDependencyGraphTransformer(); } public DependencyManager getDependencyManager() { return session.getDependencyManager(); } public DependencySelector getDependencySelector() { return session.getDependencySelector(); } public DependencyTraverser getDependencyTraverser() { return session.getDependencyTraverser(); } public LocalRepository getLocalRepository() { return session.getLocalRepository(); } public LocalRepositoryManager getLocalRepositoryManager() { return session.getLocalRepositoryManager(); } public MirrorSelector getMirrorSelector() { return session.getMirrorSelector(); } public ProxySelector getProxySelector() { return session.getProxySelector(); } public RepositoryListener getRepositoryListener() { return session.getRepositoryListener(); } public Map getSystemProperties() { return session.getSystemProperties(); } public TransferListener getTransferListener() { return session.getTransferListener(); } public String getUpdatePolicy() { return session.getUpdatePolicy(); } public Map getUserProperties() { return session.getUserProperties(); } public WorkspaceReader getWorkspaceReader() { return session.getWorkspaceReader(); } public boolean isIgnoreInvalidArtifactDescriptor() { return session.isIgnoreInvalidArtifactDescriptor(); } public boolean isIgnoreMissingArtifactDescriptor() { return session.isIgnoreMissingArtifactDescriptor(); } public boolean isNotFoundCachingEnabled() { return session.isNotFoundCachingEnabled(); } public boolean isOffline() { return session.isOffline(); } public boolean isTransferErrorCachingEnabled() { return session.isTransferErrorCachingEnabled(); } public SessionData getData() { return session.getData(); } } aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/StringUtils.java000066400000000000000000000020661167050556700277540ustar00rootroot00000000000000package org.sonatype.aether.util; /******************************************************************************* * 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 utility class to ease string processing. * * @author Benjamin Hanzelmann * @author Benjamin Bentmann */ public class StringUtils { private StringUtils() { // hide constructor } /** * Checks whether a string is {@code null} or of zero length. * * @param string The string to check, may be {@code null}. * @return {@code true} if the string is {@code null} or of zero length, {@code false} otherwise. */ public static boolean isEmpty( String string ) { return string == null || string.length() <= 0; } } aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/artifact/000077500000000000000000000000001167050556700264135ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/artifact/AbstractArtifact.java000066400000000000000000000140651167050556700325050ustar00rootroot00000000000000package org.sonatype.aether.util.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.Collections; import java.util.HashMap; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.sonatype.aether.artifact.Artifact; /** * A skeleton class for artifacts that implements {@link Object#equals(Object)}, {@link Object#hashCode()} and * {@link Object#toString()}. * * @author Benjamin Bentmann */ public abstract class AbstractArtifact implements Artifact { private static final String SNAPSHOT = "SNAPSHOT"; private static final Pattern SNAPSHOT_TIMESTAMP = Pattern.compile( "^(.*-)?([0-9]{8}.[0-9]{6}-[0-9]+)$" ); protected static boolean isSnapshot( String version ) { return version.endsWith( SNAPSHOT ) || SNAPSHOT_TIMESTAMP.matcher( version ).matches(); } protected static String toBaseVersion( String version ) { String baseVersion; if ( version == null ) { baseVersion = version; } else if ( version.startsWith( "[" ) || version.startsWith( "(" ) ) { baseVersion = version; } else { Matcher m = SNAPSHOT_TIMESTAMP.matcher( version ); if ( m.matches() ) { if ( m.group( 1 ) != null ) { baseVersion = m.group( 1 ) + SNAPSHOT; } else { baseVersion = SNAPSHOT; } } else { baseVersion = version; } } return baseVersion; } /** * Creates a new artifact with the specified coordinates, properties and file. * * @param groupId The group identifier of the artifact, may be {@code null}. * @param artifactId The artifact identifier of the artifact, may be {@code null}. * @param classifier The classifier of the artifact, may be {@code null}. * @param extension The file extension of the artifact, may be {@code null}. * @param version The version of the artifact, may be {@code null}. * @param properties The properties of the artifact, may be {@code null} if none. The method may assume immutability * of the supplied map. * @param file The resolved file of the artifact, may be {@code null}. */ protected Artifact newInstance( String groupId, String artifactId, String classifier, String extension, String version, Map properties, File file ) { return new DefaultArtifact( groupId, artifactId, classifier, extension, version, file, properties ); } public Artifact setVersion( String version ) { if ( getVersion().equals( version ) ) { return this; } return newInstance( getGroupId(), getArtifactId(), getClassifier(), getExtension(), version, getProperties(), getFile() ); } public Artifact setFile( File file ) { if ( eq( getFile(), file ) ) { return this; } return newInstance( getGroupId(), getArtifactId(), getClassifier(), getExtension(), getVersion(), getProperties(), file ); } public Artifact setProperties( Map properties ) { if ( getProperties().equals( properties ) ) { return this; } return newInstance( getGroupId(), getArtifactId(), getClassifier(), getExtension(), getVersion(), copy( properties ), getFile() ); } static Map copy( Map properties ) { if ( properties != null && !properties.isEmpty() ) { return new HashMap( properties ); } else { return Collections.emptyMap(); } } @Override public String toString() { StringBuilder buffer = new StringBuilder( 128 ); buffer.append( getGroupId() ); buffer.append( ':' ).append( getArtifactId() ); buffer.append( ':' ).append( getExtension() ); if ( getClassifier().length() > 0 ) { buffer.append( ':' ).append( getClassifier() ); } buffer.append( ':' ).append( getVersion() ); return buffer.toString(); } @Override public boolean equals( Object obj ) { if ( obj == this ) { return true; } else if ( !( obj instanceof Artifact ) ) { return false; } Artifact that = (Artifact) obj; return getArtifactId().equals( that.getArtifactId() ) && getGroupId().equals( that.getGroupId() ) && getVersion().equals( that.getVersion() ) && getExtension().equals( that.getExtension() ) && getClassifier().equals( that.getClassifier() ) && eq( getFile(), that.getFile() ) && getProperties().equals( that.getProperties() ); } private static boolean eq( T s1, T s2 ) { return s1 != null ? s1.equals( s2 ) : s2 == null; } @Override public int hashCode() { int hash = 17; hash = hash * 31 + getGroupId().hashCode(); hash = hash * 31 + getArtifactId().hashCode(); hash = hash * 31 + getExtension().hashCode(); hash = hash * 31 + getClassifier().hashCode(); hash = hash * 31 + getVersion().hashCode(); hash = hash * 31 + hash( getFile() ); return hash; } private static int hash( Object obj ) { return ( obj != null ) ? obj.hashCode() : 0; } } aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/artifact/ArtifacIdUtils.java000066400000000000000000000116061167050556700321310ustar00rootroot00000000000000package org.sonatype.aether.util.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 org.sonatype.aether.artifact.Artifact; /** * A utility class to create identifiers for artifacts. * * @author Benjamin Bentmann */ public class ArtifacIdUtils { private static final char SEP = ':'; private ArtifacIdUtils() { // hide constructor } /** * Creates an artifact identifier of the form {@code ::[:]:}. * * @param artifact The artifact to create an identifer for, may be {@code null}. * @return The artifact identifier or {@code null} if the input was {@code null}. */ public static String toId( Artifact artifact ) { String id = null; if ( artifact != null ) { id = toId( artifact.getGroupId(), artifact.getArtifactId(), artifact.getExtension(), artifact.getClassifier(), artifact.getVersion() ); } return id; } /** * Creates an artifact identifier of the form {@code ::[:]:}. * * @param groupId The group id, may be {@code null}. * @param artifactId The artifact id, may be {@code null}. * @param extension The file extensiion, may be {@code null}. * @param classifier The classifier, may be {@code null}. * @param version The version, may be {@code null}. * @return The artifact identifier, never {@code null}. */ public static String toId( String groupId, String artifactId, String extension, String classifier, String version ) { StringBuilder buffer = concat( groupId, artifactId, extension, classifier ); buffer.append( SEP ); if ( version != null ) { buffer.append( version ); } return buffer.toString(); } /** * Creates an artifact identifier of the form * {@code ::[:]:}. * * @param artifact The artifact to create an identifer for, may be {@code null}. * @return The artifact identifier or {@code null} if the input was {@code null}. */ public static String toBaseId( Artifact artifact ) { String id = null; if ( artifact != null ) { id = toId( artifact.getGroupId(), artifact.getArtifactId(), artifact.getExtension(), artifact.getClassifier(), artifact.getBaseVersion() ); } return id; } /** * Creates an artifact identifier of the form {@code ::[:]}. * * @param artifact The artifact to create an identifer for, may be {@code null}. * @return The artifact identifier or {@code null} if the input was {@code null}. */ public static String toVersionlessId( Artifact artifact ) { String id = null; if ( artifact != null ) { id = toVersionlessId( artifact.getGroupId(), artifact.getArtifactId(), artifact.getExtension(), artifact.getClassifier() ); } return id; } /** * Creates an artifact identifier of the form {@code ::[:]}. * * @param groupId The group id, may be {@code null}. * @param artifactId The artifact id, may be {@code null}. * @param extension The file extensiion, may be {@code null}. * @param classifier The classifier, may be {@code null}. * @return The artifact identifier, never {@code null}. */ public static String toVersionlessId( String groupId, String artifactId, String extension, String classifier ) { return concat( groupId, artifactId, extension, classifier ).toString(); } private static StringBuilder concat( String groupId, String artifactId, String extension, String classifier ) { StringBuilder buffer = new StringBuilder( 128 ); if ( groupId != null ) { buffer.append( groupId ); } buffer.append( SEP ); if ( artifactId != null ) { buffer.append( artifactId ); } buffer.append( SEP ); if ( extension != null ) { buffer.append( extension ); } if ( classifier != null && classifier.length() > 0 ) { buffer.append( SEP ).append( classifier ); } return buffer; } } aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/artifact/ArtifactProperties.java000066400000000000000000000040411167050556700330670ustar00rootroot00000000000000package org.sonatype.aether.util.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 *******************************************************************************/ /** * The keys for common properties of artifacts. * * @author Benjamin Bentmann * @see org.sonatype.aether.artifact.Artifact#getProperties() */ public final class ArtifactProperties { /** * A high-level characterization of the artifact, e.g. "maven-plugin" or "test-jar". */ public static final String TYPE = "type"; /** * The programming language this artifact is relevant for, e.g. "java" or "none". */ public static final String LANGUAGE = "language"; /** * 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. Artifact resolution will * verify the path and resolve the artifact if the path actually denotes an existing file. If the path isn't valid, * resolution will fail and no attempts to search local/remote repositories are made. */ public static final String LOCAL_PATH = "localPath"; /** * A boolean flag indicating whether the artifact presents some kind of bundle that physically includes its * dependencies, e.g. a fat WAR. */ public static final String INCLUDES_DEPENDENCIES = "includesDependencies"; /** * A boolean flag indicating whether the artifact is meant to be used for the compile/runtime/test build path of a * consumer project. */ public static final String CONSTITUTES_BUILD_PATH = "constitutesBuildPath"; private ArtifactProperties() { // hide constructor } } aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/artifact/DefaultArtifact.java000066400000000000000000000304271167050556700323260ustar00rootroot00000000000000package org.sonatype.aether.util.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.Collections; import java.util.HashMap; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.artifact.ArtifactType; /** * A simple 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 DefaultArtifact extends AbstractArtifact { private final String groupId; private final String artifactId; private final String version; private final String classifier; private final String extension; private final File file; private final Map properties; private String baseVersion; /** * Creates a new artifact with the specified coordinates. If not specified in the artifact coordinates, the * artifact's extension defaults to {@code jar} and classifier to an empty string. * * @param coords The artifact coordinates in the format * {@code :[:[:]]:}, must not be {@code null}. */ public DefaultArtifact( String coords ) { this( coords, Collections. emptyMap() ); } /** * Creates a new artifact with the specified coordinates and properties. If not specified in the artifact * coordinates, the artifact's extension defaults to {@code jar} and classifier to an empty string. * * @param coords The artifact coordinates in the format * {@code :[:[:]]:}, must not be {@code null}. * @param properties The artifact properties, may be {@code null}. */ public DefaultArtifact( String coords, Map properties ) { Pattern p = Pattern.compile( "([^: ]+):([^: ]+)(:([^: ]*)(:([^: ]+))?)?:([^: ]+)" ); Matcher m = p.matcher( coords ); if ( !m.matches() ) { throw new IllegalArgumentException( "Bad artifact coordinates " + coords + ", expected format is :[:[:]]:" ); } groupId = m.group( 1 ); artifactId = m.group( 2 ); extension = get( m.group( 4 ), "jar" ); classifier = get( m.group( 6 ), "" ); version = m.group( 7 ); file = null; this.properties = copy( properties ); } private static String get( String value, String defaultValue ) { return ( value == null || value.length() <= 0 ) ? defaultValue : value; } /** * Creates a new artifact with the specified coordinates and no classifier. Passing {@code null} for any of the * coordinates is equivalent to specifying an empty string. * * @param groupId The group identifier of the artifact, may be {@code null}. * @param artifactId The artifact identifier of the artifact, may be {@code null}. * @param extension The file extension of the artifact, may be {@code null}. * @param version The version of the artifact, may be {@code null}. */ public DefaultArtifact( String groupId, String artifactId, String extension, String version ) { this( groupId, artifactId, "", extension, version ); } /** * Creates a new artifact with the specified coordinates. Passing {@code null} for any of the coordinates is * equivalent to specifying an empty string. * * @param groupId The group identifier of the artifact, may be {@code null}. * @param artifactId The artifact identifier of the artifact, may be {@code null}. * @param classifier The classifier of the artifact, may be {@code null}. * @param extension The file extension of the artifact, may be {@code null}. * @param version The version of the artifact, may be {@code null}. */ public DefaultArtifact( String groupId, String artifactId, String classifier, String extension, String version ) { this( groupId, artifactId, classifier, extension, version, null, (File) null ); } /** * Creates a new artifact with the specified coordinates. Passing {@code null} for any of the coordinates is * equivalent to specifying an empty string. The optional artifact type provided to this constructor will be used to * determine the artifact's classifier and file extension if the corresponding arguments for this constructor are * {@code null}. * * @param groupId The group identifier of the artifact, may be {@code null}. * @param artifactId The artifact identifier of the artifact, may be {@code null}. * @param classifier The classifier of the artifact, may be {@code null}. * @param extension The file extension of the artifact, may be {@code null}. * @param version The version of the artifact, may be {@code null}. * @param type The artifact type from which to query classifier, file extension and properties, may be {@code null}. */ public DefaultArtifact( String groupId, String artifactId, String classifier, String extension, String version, ArtifactType type ) { this( groupId, artifactId, classifier, extension, version, null, type ); } /** * Creates a new artifact with the specified coordinates and properties. Passing {@code null} for any of the * coordinates is equivalent to specifying an empty string. The optional artifact type provided to this constructor * will be used to determine the artifact's classifier and file extension if the corresponding arguments for this * constructor are {@code null}. If the artifact type specifies properties, those will get merged with the * properties passed directly into the constructor, with the latter properties taking precedence. * * @param groupId The group identifier of the artifact, may be {@code null}. * @param artifactId The artifact identifier of the artifact, may be {@code null}. * @param classifier The classifier of the artifact, may be {@code null}. * @param extension The file extension of the artifact, may be {@code null}. * @param version The version of the artifact, may be {@code null}. * @param properties The properties of the artifact, may be {@code null} if none. * @param type The artifact type from which to query classifier, file extension and properties, may be {@code null}. */ public DefaultArtifact( String groupId, String artifactId, String classifier, String extension, String version, Map properties, ArtifactType type ) { this.groupId = emptify( groupId ); this.artifactId = emptify( artifactId ); if ( classifier != null || type == null ) { this.classifier = emptify( classifier ); } else { this.classifier = emptify( type.getClassifier() ); } if ( extension != null || type == null ) { this.extension = emptify( extension ); } else { this.extension = emptify( type.getExtension() ); } this.version = emptify( version ); this.file = null; this.properties = merge( properties, ( type != null ) ? type.getProperties() : null ); } private static Map merge( Map dominant, Map recessive ) { Map properties; if ( ( dominant == null || dominant.isEmpty() ) && ( recessive == null || recessive.isEmpty() ) ) { properties = Collections.emptyMap(); } else { properties = new HashMap(); if ( recessive != null ) { properties.putAll( recessive ); } if ( dominant != null ) { properties.putAll( dominant ); } } return properties; } /** * Creates a new artifact with the specified coordinates, properties and file. Passing {@code null} for any of the * coordinates is equivalent to specifying an empty string. * * @param groupId The group identifier of the artifact, may be {@code null}. * @param artifactId The artifact identifier of the artifact, may be {@code null}. * @param classifier The classifier of the artifact, may be {@code null}. * @param extension The file extension of the artifact, may be {@code null}. * @param version The version of the artifact, may be {@code null}. * @param properties The properties of the artifact, may be {@code null} if none. * @param file The resolved file of the artifact, may be {@code null}. */ public DefaultArtifact( String groupId, String artifactId, String classifier, String extension, String version, Map properties, File file ) { this.groupId = emptify( groupId ); this.artifactId = emptify( artifactId ); this.classifier = emptify( classifier ); this.extension = emptify( extension ); this.version = emptify( version ); this.file = file; this.properties = copy( properties ); } DefaultArtifact( String groupId, String artifactId, String classifier, String extension, String version, File file, Map properties ) { // NOTE: This constructor assumes immutability of the provided properties, for internal use only this.groupId = emptify( groupId ); this.artifactId = emptify( artifactId ); this.classifier = emptify( classifier ); this.extension = emptify( extension ); this.version = emptify( version ); this.file = file; this.properties = properties; } private static String emptify( String str ) { return ( str == null ) ? "" : str; } public String getGroupId() { return groupId; } public String getArtifactId() { return artifactId; } public String getBaseVersion() { if ( baseVersion == null ) { baseVersion = toBaseVersion( getVersion() ); } return baseVersion; } public String getVersion() { return version; } public Artifact setVersion( String version ) { if ( this.version.equals( version ) || ( version == null && this.version.length() <= 0 ) ) { return this; } return new DefaultArtifact( groupId, artifactId, classifier, extension, version, file, properties ); } public boolean isSnapshot() { return isSnapshot( getVersion() ); } public String getClassifier() { return classifier; } public String getExtension() { return extension; } public File getFile() { return file; } public Artifact setFile( File file ) { if ( ( this.file == null ) ? file == null : this.file.equals( file ) ) { return this; } return new DefaultArtifact( groupId, artifactId, classifier, extension, version, file, properties ); } public String getProperty( String key, String defaultValue ) { String value = properties.get( key ); return ( value != null ) ? value : defaultValue; } public Map getProperties() { return Collections.unmodifiableMap( properties ); } public Artifact setProperties( Map properties ) { if ( this.properties.equals( properties ) || ( properties == null && this.properties.isEmpty() ) ) { return this; } return new DefaultArtifact( groupId, artifactId, classifier, extension, version, file, copy( properties ) ); } } aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/artifact/DefaultArtifactType.java000066400000000000000000000046331167050556700331700ustar00rootroot00000000000000package org.sonatype.aether.util.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.HashMap; import java.util.Map; import org.sonatype.aether.artifact.ArtifactType; /** * A simple artifact type. * * @author Benjamin Bentmann */ public class DefaultArtifactType implements ArtifactType { private final String id; private final String extension; private final String classifier; private final Map properties; public DefaultArtifactType( String id ) { this( id, id, "", "none", false, false ); } public DefaultArtifactType( String id, String extension, String classifier, String language ) { this( id, extension, classifier, language, true, false ); } public DefaultArtifactType( String id, String extension, String classifier, String language, boolean constitutesBuildPath, boolean includesDependencies ) { if ( id == null || id.length() < 0 ) { throw new IllegalArgumentException( "no type id specified" ); } this.id = id; this.extension = ( extension != null && extension.length() > 0 ) ? extension : id; this.classifier = ( classifier != null ) ? classifier : ""; Map props = new HashMap(); props.put( ArtifactProperties.TYPE, id ); props.put( ArtifactProperties.LANGUAGE, ( language != null && language.length() > 0 ) ? language : "none" ); props.put( ArtifactProperties.INCLUDES_DEPENDENCIES, Boolean.toString( includesDependencies ) ); props.put( ArtifactProperties.CONSTITUTES_BUILD_PATH, Boolean.toString( constitutesBuildPath ) ); properties = props; } public String getId() { return id; } public String getExtension() { return extension; } public String getClassifier() { return classifier; } public Map getProperties() { return properties; } } DefaultArtifactTypeRegistry.java000066400000000000000000000032621167050556700346370ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/artifactpackage org.sonatype.aether.util.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.HashMap; import java.util.Map; import org.sonatype.aether.artifact.ArtifactType; import org.sonatype.aether.artifact.ArtifactTypeRegistry; /** * A simple artifact type registry. * * @author Benjamin Bentmann */ public class DefaultArtifactTypeRegistry implements ArtifactTypeRegistry { private final Map types; /** * Creates a new artifact type registry with initally no registered artifact types. Use {@link #add(ArtifactType)} * to populate the registry. */ public DefaultArtifactTypeRegistry() { types = new HashMap(); } /** * Adds the specified artifact type to the registry. * * @param type The artifact type to add, must not be {@code null}. * @return This registry for chaining, never {@code null}. */ public DefaultArtifactTypeRegistry add( ArtifactType type ) { types.put( type.getId(), type ); return this; } public ArtifactType get( String typeId ) { ArtifactType type = types.get( typeId ); return type; } @Override public String toString() { return types.toString(); } } aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/artifact/DelegatingArtifact.java000066400000000000000000000074631167050556700330110ustar00rootroot00000000000000package org.sonatype.aether.util.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; import org.sonatype.aether.artifact.Artifact; /** * An artifact that delegates to another artifact instance. This class serves as a base for subclasses that want to * carry additional data fields. */ public abstract class DelegatingArtifact extends AbstractArtifact { private final Artifact delegate; /** * Creates a new artifact instance that delegates to the specified artifact. * * @param delegate The artifact to delegate to, must not be {@code null}. */ protected DelegatingArtifact( Artifact delegate ) { if ( delegate == null ) { throw new IllegalArgumentException( "delegate artifact not specified" ); } this.delegate = delegate; } /** * Creates a new artifact instance that delegates to the specified artifact. Subclasses should use this hook to * instantiate themselves, taking along any data from the current instance that was added. * * @param delegate The artifact to delegate to, must not be {@code null}. * @return The new delegating artifact, never {@code null}. */ protected abstract DelegatingArtifact newInstance( Artifact delegate ); public String getGroupId() { return delegate.getGroupId(); } public String getArtifactId() { return delegate.getArtifactId(); } public String getVersion() { return delegate.getVersion(); } public Artifact setVersion( String version ) { Artifact artifact = delegate.setVersion( version ); if ( artifact != delegate ) { return newInstance( artifact ); } return this; } public String getBaseVersion() { return delegate.getBaseVersion(); } public boolean isSnapshot() { return delegate.isSnapshot(); } public String getClassifier() { return delegate.getClassifier(); } public String getExtension() { return delegate.getExtension(); } public File getFile() { return delegate.getFile(); } public Artifact setFile( File file ) { Artifact artifact = delegate.setFile( file ); if ( artifact != delegate ) { return newInstance( artifact ); } return this; } public String getProperty( String key, String defaultValue ) { return delegate.getProperty( key, defaultValue ); } public Map getProperties() { return delegate.getProperties(); } public Artifact setProperties( Map properties ) { Artifact artifact = delegate.setProperties( properties ); if ( artifact != delegate ) { return newInstance( artifact ); } return this; } @Override public boolean equals( Object obj ) { if ( obj == this ) { return true; } if ( obj instanceof DelegatingArtifact ) { return delegate.equals( ( (DelegatingArtifact) obj ).delegate ); } return delegate.equals( obj ); } @Override public int hashCode() { return delegate.hashCode(); } @Override public String toString() { return delegate.toString(); } } aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/artifact/JavaScopes.java000066400000000000000000000017601167050556700313200ustar00rootroot00000000000000package org.sonatype.aether.util.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 *******************************************************************************/ /** * The dependency scopes used for Java dependencies. * * @author Benjamin Bentmann * @see org.sonatype.aether.graph.Dependency#getScope() */ public final class JavaScopes { public static final String COMPILE = "compile"; public static final String PROVIDED = "provided"; public static final String SYSTEM = "system"; public static final String RUNTIME = "runtime"; public static final String TEST = "test"; private JavaScopes() { // hide constructor } } OverlayArtifactTypeRegistry.java000066400000000000000000000032541167050556700346750ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/artifactpackage org.sonatype.aether.util.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 org.sonatype.aether.artifact.ArtifactType; import org.sonatype.aether.artifact.ArtifactTypeRegistry; /** * An artifact type registry which first consults its own mappings and in case of an unknown type falls back to another * type registry. * * @author Benjamin Bentmann */ public class OverlayArtifactTypeRegistry extends DefaultArtifactTypeRegistry { private final ArtifactTypeRegistry delegate; /** * Creates a new artifact type registry with initially no registered artifact types and the specified fallback * registry. Use {@link #add(ArtifactType)} to populate the registry. * * @param delegate The artifact type registry to fall back to, may be {@code null}. */ public OverlayArtifactTypeRegistry( ArtifactTypeRegistry delegate ) { this.delegate = delegate; } public OverlayArtifactTypeRegistry add( ArtifactType type ) { super.add( type ); return this; } public ArtifactType get( String typeId ) { ArtifactType type = super.get( typeId ); if ( type == null && delegate != null ) { type = delegate.get( typeId ); } return type; } } aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/artifact/SubArtifact.java000066400000000000000000000211761167050556700314740ustar00rootroot00000000000000package org.sonatype.aether.util.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.Collections; import java.util.Map; import org.sonatype.aether.artifact.Artifact; /** * An artifact whose identity is derived from another 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 SubArtifact extends AbstractArtifact { private final Artifact mainArtifact; private final String classifier; private final String extension; private final File file; private final Map properties; /** * Creates a new sub artifact. The classifier and extension specified for this artifact may use the asterisk * character "*" to refer to the corresponding property of the main artifact. For instance, the classifier * "*-sources" can be used to refer to the source attachment of an artifact. Likewise, the extension "*.asc" can be * used to refer to the GPG signature of an artifact. * * @param mainArtifact The artifact from which to derive the identity, must not be {@code null}. * @param classifier The classifier for this artifact, may be {@code null} if none. * @param extension The extension for this artifact, may be {@code null} if none. */ public SubArtifact( Artifact mainArtifact, String classifier, String extension ) { this( mainArtifact, classifier, extension, (File) null ); } /** * Creates a new sub artifact. The classifier and extension specified for this artifact may use the asterisk * character "*" to refer to the corresponding property of the main artifact. For instance, the classifier * "*-sources" can be used to refer to the source attachment of an artifact. Likewise, the extension "*.asc" can be * used to refer to the GPG signature of an artifact. * * @param mainArtifact The artifact from which to derive the identity, must not be {@code null}. * @param classifier The classifier for this artifact, may be {@code null} if none. * @param extension The extension for this artifact, may be {@code null} if none. * @param file The file for this artifact, may be {@code null} if unresolved. */ public SubArtifact( Artifact mainArtifact, String classifier, String extension, File file ) { this( mainArtifact, classifier, extension, null, file ); } /** * Creates a new sub artifact. The classifier and extension specified for this artifact may use the asterisk * character "*" to refer to the corresponding property of the main artifact. For instance, the classifier * "*-sources" can be used to refer to the source attachment of an artifact. Likewise, the extension "*.asc" can be * used to refer to the GPG signature of an artifact. * * @param mainArtifact The artifact from which to derive the identity, must not be {@code null}. * @param classifier The classifier for this artifact, may be {@code null} if none. * @param extension The extension for this artifact, may be {@code null} if none. * @param properties The properties of the artifact, may be {@code null}. */ public SubArtifact( Artifact mainArtifact, String classifier, String extension, Map properties ) { this( mainArtifact, classifier, extension, properties, null ); } /** * Creates a new sub artifact. The classifier and extension specified for this artifact may use the asterisk * character "*" to refer to the corresponding property of the main artifact. For instance, the classifier * "*-sources" can be used to refer to the source attachment of an artifact. Likewise, the extension "*.asc" can be * used to refer to the GPG signature of an artifact. * * @param mainArtifact The artifact from which to derive the identity, must not be {@code null}. * @param classifier The classifier for this artifact, may be {@code null} if none. * @param extension The extension for this artifact, may be {@code null} if none. * @param properties The properties of the artifact, may be {@code null}. * @param file The file for this artifact, may be {@code null} if unresolved. */ public SubArtifact( Artifact mainArtifact, String classifier, String extension, Map properties, File file ) { if ( mainArtifact == null ) { throw new IllegalArgumentException( "no artifact specified" ); } this.mainArtifact = mainArtifact; this.classifier = classifier; this.extension = extension; this.file = file; this.properties = copy( properties ); } private SubArtifact( Artifact mainArtifact, String classifier, String extension, File file, Map properties ) { // NOTE: This constructor assumes immutability of the provided properties, for internal use only this.mainArtifact = mainArtifact; this.classifier = classifier; this.extension = extension; this.file = file; this.properties = properties; } public String getGroupId() { return mainArtifact.getGroupId(); } public String getArtifactId() { return mainArtifact.getArtifactId(); } public String getVersion() { return mainArtifact.getVersion(); } public Artifact setVersion( String version ) { return new DefaultArtifact( getGroupId(), getArtifactId(), getClassifier(), getExtension(), version, getFile(), getProperties() ); } public String getBaseVersion() { return mainArtifact.getBaseVersion(); } public boolean isSnapshot() { return mainArtifact.isSnapshot(); } public String getClassifier() { return expand( classifier, mainArtifact.getClassifier() ); } public String getExtension() { return expand( extension, mainArtifact.getExtension() ); } public File getFile() { return file; } public Artifact setFile( File file ) { if ( ( this.file == null ) ? file == null : this.file.equals( file ) ) { return this; } return new SubArtifact( mainArtifact, classifier, extension, file, properties ); } public String getProperty( String key, String defaultValue ) { String value = properties.get( key ); return ( value != null ) ? value : defaultValue; } public Map getProperties() { return Collections.unmodifiableMap( properties ); } public Artifact setProperties( Map properties ) { if ( this.properties.equals( properties ) || ( properties == null && this.properties.isEmpty() ) ) { return this; } return new SubArtifact( mainArtifact, classifier, extension, properties, file ); } private static String expand( String pattern, String replacement ) { String result = ""; if ( pattern != null ) { result = pattern.replace( "*", replacement ); if ( replacement.length() <= 0 ) { if ( pattern.startsWith( "*" ) ) { int i = 0; for ( ; i < result.length(); i++ ) { char c = result.charAt( i ); if ( c != '-' && c != '.' ) { break; } } result = result.substring( i ); } if ( pattern.endsWith( "*" ) ) { int i = result.length() - 1; for ( ; i >= 0; i-- ) { char c = result.charAt( i ); if ( c != '-' && c != '.' ) { break; } } result = result.substring( 0, i + 1 ); } } } return result; } } aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/concurrency/000077500000000000000000000000001167050556700271505ustar00rootroot00000000000000RunnableErrorForwarder.java000066400000000000000000000075361167050556700344030ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/concurrencypackage org.sonatype.aether.util.concurrency; /******************************************************************************* * 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.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.locks.LockSupport; /** * A utility class to forward any uncaught {@link Error} or {@link RuntimeException} from a {@link Runnable} executed in * a worker thread back to the parent thread. The simplified usage pattern looks like this: * *
 * RunnableErrorForwarder errorForwarder = new RunnableErrorForwarder();
 * for ( Runnable task : tasks )
 * {
 *     executor.execute( errorForwarder.wrap( task ) );
 * }
 * errorForwarder.await();
 * 
* * @author Benjamin Bentmann */ public class RunnableErrorForwarder { private final Thread thread = Thread.currentThread(); private final AtomicInteger counter = new AtomicInteger(); private final AtomicReference error = new AtomicReference(); /** * Wraps the specified runnable into an equivalent runnable that will allow forwarding of uncaught errors. * * @param runnable The runnable from which to forward errors, must not be {@code null}. * @return The error-forwarding runnable to eventually execute, never {@code null}. */ public Runnable wrap( final Runnable runnable ) { if ( runnable == null ) { throw new IllegalArgumentException( "runnable missing" ); } counter.incrementAndGet(); return new Runnable() { public void run() { try { runnable.run(); } catch ( RuntimeException e ) { error.compareAndSet( null, e ); throw e; } catch ( Error e ) { error.compareAndSet( null, e ); throw e; } finally { counter.decrementAndGet(); LockSupport.unpark( thread ); } } }; } /** * Causes the current thread to wait until all previously {@link #wrap(Runnable) wrapped} runnables have terminated * and potentially re-throws an uncaught {@link RuntimeException} or {@link Error} from any of the runnables. In * case multiple runnables encountered uncaught errors, one error is arbitrarily selected. */ public void await() { awaitTerminationOfAllRunnables(); Throwable error = this.error.get(); if ( error != null ) { if ( error instanceof RuntimeException ) { throw (RuntimeException) error; } else if ( error instanceof ThreadDeath ) { throw new IllegalStateException( error ); } else if ( error instanceof Error ) { throw (Error) error; } throw new IllegalStateException( error ); } } private void awaitTerminationOfAllRunnables() { boolean interrupted = false; while ( counter.get() > 0 ) { LockSupport.park(); if ( Thread.interrupted() ) { interrupted = true; } } if ( interrupted ) { Thread.currentThread().interrupt(); } } } aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/filter/000077500000000000000000000000001167050556700261035ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/filter/AndDependencyFilter.java000066400000000000000000000061031167050556700326150ustar00rootroot00000000000000package org.sonatype.aether.util.filter; /******************************************************************************* * 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.LinkedHashSet; import java.util.List; import org.sonatype.aether.graph.DependencyFilter; import org.sonatype.aether.graph.DependencyNode; /** * A dependency filter that combines zero or more other filters using a logical {@code AND}. * * @author Benjamin Bentmann */ public class AndDependencyFilter implements DependencyFilter { private final Collection filters = new LinkedHashSet(); /** * Creates a new filter from the specified filters. * * @param filters The filters to combine, may be {@code null}. */ public AndDependencyFilter( DependencyFilter... filters ) { if ( filters != null ) { Collections.addAll( this.filters, filters ); } } /** * Creates a new filter from the specified filters. * * @param filters The filters to combine, may be {@code null}. */ public AndDependencyFilter( Collection filters ) { if ( filters != null ) { this.filters.addAll( filters ); } } /** * Creates a new filter from the specified filters. * * @param filter1 The first filter to combine, may be {@code null}. * @param filter2 The first filter to combine, may be {@code null}. * @return The combined filter or {@code null} if both filter were {@code null}. */ public static DependencyFilter newInstance( DependencyFilter filter1, DependencyFilter filter2 ) { if ( filter1 == null ) { return filter2; } else if ( filter2 == null ) { return filter1; } return new AndDependencyFilter( filter1, filter2 ); } public boolean accept( DependencyNode node, List parents ) { for ( DependencyFilter filter : filters ) { if ( !filter.accept( node, parents ) ) { return false; } } return true; } @Override public boolean equals( Object obj ) { if ( this == obj ) { return true; } if ( obj == null || !getClass().equals( obj.getClass() ) ) { return false; } AndDependencyFilter that = (AndDependencyFilter) obj; return this.filters.equals( that.filters ); } @Override public int hashCode() { int hash = getClass().hashCode(); hash = hash * 31 + filters.hashCode(); return hash; } } aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/filter/DependencyFilterUtils.java000066400000000000000000000145431167050556700332220ustar00rootroot00000000000000package org.sonatype.aether.util.filter; /******************************************************************************* * 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.Arrays; import java.util.Collection; import java.util.Collections; import java.util.HashSet; import org.sonatype.aether.graph.DependencyFilter; import org.sonatype.aether.util.artifact.JavaScopes; /** * A utility class assisting in the creation of dependency node filters. * * @author Benjamin Bentmann */ public class DependencyFilterUtils { private DependencyFilterUtils() { // hide constructor } /** * Creates a new filter that negates the specified filter. * * @param filter The filter to negate, must not be {@code null}. * @return The new filter, never {@code null}. */ public static DependencyFilter notFilter( DependencyFilter filter ) { return new NotDependencyFilter( filter ); } /** * Creates a new filter that combines the specified filters using a logical {@code AND}. If no filters are * specified, the resulting filter accepts everything. * * @param filters The filters to combine, may be {@code null}. * @return The new filter, never {@code null}. */ public static DependencyFilter andFilter( DependencyFilter... filters ) { if ( filters != null && filters.length == 1 ) { return filters[0]; } else { return new AndDependencyFilter( filters ); } } /** * Creates a new filter that combines the specified filters using a logical {@code AND}. If no filters are * specified, the resulting filter accepts everything. * * @param filters The filters to combine, may be {@code null}. * @return The new filter, never {@code null}. */ public static DependencyFilter andFilter( Collection filters ) { if ( filters != null && filters.size() == 1 ) { return filters.iterator().next(); } else { return new AndDependencyFilter( filters ); } } /** * Creates a new filter that combines the specified filters using a logical {@code OR}. If no filters are specified, * the resulting filter accepts nothing. * * @param filters The filters to combine, may be {@code null}. * @return The new filter, never {@code null}. */ public static DependencyFilter orFilter( DependencyFilter... filters ) { if ( filters != null && filters.length == 1 ) { return filters[0]; } else { return new OrDependencyFilter( filters ); } } /** * Creates a new filter that combines the specified filters using a logical {@code OR}. If no filters are specified, * the resulting filter accepts nothing. * * @param filters The filters to combine, may be {@code null}. * @return The new filter, never {@code null}. */ public static DependencyFilter orFilter( Collection filters ) { if ( filters != null && filters.size() == 1 ) { return filters.iterator().next(); } else { return new OrDependencyFilter( filters ); } } /** * Creates a new filter that selects dependencies whose scope matches one or more of the specified classpath types. * A classpath type is a set of scopes separated by either {@code ','} or {@code '+'}. * * @param classpathTypes The classpath types, may be {@code null} or empty to match no dependency. * @return The new filter, never {@code null}. * @see JavaScopes */ public static DependencyFilter classpathFilter( String... classpathTypes ) { return classpathFilter( ( classpathTypes != null ) ? Arrays.asList( classpathTypes ) : null ); } /** * Creates a new filter that selects dependencies whose scope matches one or more of the specified classpath types. * A classpath type is a set of scopes separated by either {@code ','} or {@code '+'}. * * @param classpathTypes The classpath types, may be {@code null} or empty to match no dependency. * @return The new filter, never {@code null}. * @see JavaScopes */ public static DependencyFilter classpathFilter( Collection classpathTypes ) { Collection types = new HashSet(); if ( classpathTypes != null ) { for ( String classpathType : classpathTypes ) { String[] tokens = classpathType.split( "[+,]" ); for ( String token : tokens ) { token = token.trim(); if ( token.length() > 0 ) { types.add( token ); } } } } Collection included = new HashSet(); for ( String type : types ) { if ( JavaScopes.COMPILE.equals( type ) ) { Collections.addAll( included, JavaScopes.COMPILE, JavaScopes.PROVIDED, JavaScopes.SYSTEM ); } else if ( JavaScopes.RUNTIME.equals( type ) ) { Collections.addAll( included, JavaScopes.COMPILE, JavaScopes.RUNTIME ); } else if ( JavaScopes.TEST.equals( type ) ) { Collections.addAll( included, JavaScopes.COMPILE, JavaScopes.PROVIDED, JavaScopes.SYSTEM, JavaScopes.RUNTIME, JavaScopes.TEST ); } else { included.add( type ); } } Collection excluded = new HashSet(); Collections.addAll( excluded, JavaScopes.COMPILE, JavaScopes.PROVIDED, JavaScopes.SYSTEM, JavaScopes.RUNTIME, JavaScopes.TEST ); excluded.removeAll( included ); return new ScopeDependencyFilter( null, excluded ); } } ExclusionsDependencyFilter.java000066400000000000000000000050031167050556700341660ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/filterpackage org.sonatype.aether.util.filter; /******************************************************************************* * 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.HashSet; import java.util.List; import org.sonatype.aether.graph.Dependency; import org.sonatype.aether.graph.DependencyFilter; import org.sonatype.aether.graph.DependencyNode; /** * A simple filter to exclude artifacts based either artifact id or group id and artifact id. * * @author Benjamin Bentmann */ public class ExclusionsDependencyFilter implements DependencyFilter { private final Collection excludes = new HashSet(); /** * Creates a new filter using the specified exclude patterns. A pattern can either be of the form * {@code groupId:artifactId} (recommended) or just {@code artifactId}. * * @param excludes The exclude patterns, may be {@code null} or empty to exclude no artifacts. */ public ExclusionsDependencyFilter( Collection excludes ) { if ( excludes != null ) { this.excludes.addAll( excludes ); } } public boolean accept( DependencyNode node, List parents ) { Dependency dependency = node.getDependency(); if ( dependency == null ) { return true; } String id = dependency.getArtifact().getArtifactId(); if ( excludes.contains( id ) ) { return false; } id = dependency.getArtifact().getGroupId() + ':' + id; if ( excludes.contains( id ) ) { return false; } return true; } @Override public boolean equals( Object obj ) { if ( this == obj ) { return true; } if ( obj == null || !getClass().equals( obj.getClass() ) ) { return false; } ExclusionsDependencyFilter that = (ExclusionsDependencyFilter) obj; return this.excludes.equals( that.excludes ); } @Override public int hashCode() { int hash = 17; hash = hash * 31 + excludes.hashCode(); return hash; } } aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/filter/NotDependencyFilter.java000066400000000000000000000035211167050556700326540ustar00rootroot00000000000000package org.sonatype.aether.util.filter; /******************************************************************************* * 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.graph.DependencyFilter; import org.sonatype.aether.graph.DependencyNode; /** * A dependency filter that negates another filter. * * @author Benjamin Bentmann */ public class NotDependencyFilter implements DependencyFilter { private final DependencyFilter filter; /** * Creates a new filter negatint the specified filter. * * @param filter The filter to negate, must not be {@code null}. */ public NotDependencyFilter( DependencyFilter filter ) { if ( filter == null ) { throw new IllegalArgumentException( "no filter specified" ); } this.filter = filter; } public boolean accept( DependencyNode node, List parents ) { return !filter.accept( node, parents ); } @Override public boolean equals( Object obj ) { if ( this == obj ) { return true; } if ( obj == null || !getClass().equals( obj.getClass() ) ) { return false; } NotDependencyFilter that = (NotDependencyFilter) obj; return this.filter.equals( that.filter ); } @Override public int hashCode() { int hash = getClass().hashCode(); hash = hash * 31 + filter.hashCode(); return hash; } } aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/filter/OrDependencyFilter.java000066400000000000000000000060731167050556700325010ustar00rootroot00000000000000package org.sonatype.aether.util.filter; /******************************************************************************* * 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.LinkedHashSet; import java.util.List; import org.sonatype.aether.graph.DependencyFilter; import org.sonatype.aether.graph.DependencyNode; /** * A dependency filter that combines zero or more other filters using a logical {@code OR}. * * @author Benjamin Bentmann */ public class OrDependencyFilter implements DependencyFilter { private final Collection filters = new LinkedHashSet(); /** * Creates a new filter from the specified filters. * * @param filters The filters to combine, may be {@code null}. */ public OrDependencyFilter( DependencyFilter... filters ) { if ( filters != null ) { Collections.addAll( this.filters, filters ); } } /** * Creates a new filter from the specified filters. * * @param filters The filters to combine, may be {@code null}. */ public OrDependencyFilter( Collection filters ) { if ( filters != null ) { this.filters.addAll( filters ); } } /** * Creates a new filter from the specified filters. * * @param filter1 The first filter to combine, may be {@code null}. * @param filter2 The first filter to combine, may be {@code null}. * @return The combined filter or {@code null} if both filter were {@code null}. */ public static DependencyFilter newInstance( DependencyFilter filter1, DependencyFilter filter2 ) { if ( filter1 == null ) { return filter2; } else if ( filter2 == null ) { return filter1; } return new OrDependencyFilter( filter1, filter2 ); } public boolean accept( DependencyNode node, List parents ) { for ( DependencyFilter filter : filters ) { if ( filter.accept( node, parents ) ) { return true; } } return false; } @Override public boolean equals( Object obj ) { if ( this == obj ) { return true; } if ( obj == null || !getClass().equals( obj.getClass() ) ) { return false; } OrDependencyFilter that = (OrDependencyFilter) obj; return this.filters.equals( that.filters ); } @Override public int hashCode() { int hash = getClass().hashCode(); hash = hash * 31 + filters.hashCode(); return hash; } } PatternExclusionsDependencyFilter.java000066400000000000000000000065371167050556700355410ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/filterpackage org.sonatype.aether.util.filter; /******************************************************************************* * 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.graph.Dependency; import org.sonatype.aether.graph.DependencyNode; import org.sonatype.aether.version.VersionScheme; /** * A simple filter to exclude artifacts from a list of patterns. The artifact pattern syntax is of the form: * *
 * [groupId]:[artifactId]:[extension]:[version]
 * 
*

* Where each pattern segment is optional and supports full and partial * wildcards. An empty pattern * segment is treated as an implicit wildcard. Version can be a range in case a {@link VersionScheme} is specified. *

*

* For example, org.apache.* would match all artifacts whose group id started with org.apache. * , and :::*-SNAPSHOT would match all snapshot artifacts. *

* * @author Alin Dreghiciu */ public class PatternExclusionsDependencyFilter extends PatternInclusionsDependencyFilter { /** * Creates a new filter using the specified patterns. * * @param patterns The exclude patterns, may be {@code null} or empty to exclude no artifacts. */ public PatternExclusionsDependencyFilter( final String... patterns ) { super( patterns ); } /** * Creates a new filter using the specified patterns. * * @param versionScheme To be used for parsing versions/version ranges. If {@code null} and pattern specifies a * range no artifact will be excluded. * @param patterns The exclude patterns, may be {@code null} or empty to exclude no artifacts. */ public PatternExclusionsDependencyFilter( final VersionScheme versionScheme, final String... patterns ) { super( versionScheme, patterns ); } /** * Creates a new filter using the specified patterns. * * @param patterns The include patterns, may be {@code null} or empty to include no artifacts. */ public PatternExclusionsDependencyFilter( final Collection patterns ) { super( patterns ); } /** * Creates a new filter using the specified patterns and {@link VersionScheme} . * * @param versionScheme To be used for parsing versions/version ranges. If {@code null} and pattern specifies a * range no artifact will be excluded. * @param patterns The exclude patterns, may be {@code null} or empty to exclude no artifacts. */ public PatternExclusionsDependencyFilter( final VersionScheme versionScheme, final Collection patterns ) { super( versionScheme, patterns ); } @Override public boolean accept( final DependencyNode node, List parents ) { final Dependency dependency = node.getDependency(); if ( dependency == null ) { return true; } return !super.accept( node, parents ); } } PatternInclusionsDependencyFilter.java000066400000000000000000000167401167050556700355300ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/filterpackage org.sonatype.aether.util.filter; /******************************************************************************* * 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.Arrays; import java.util.Collection; import java.util.HashSet; import java.util.List; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.graph.Dependency; import org.sonatype.aether.graph.DependencyFilter; import org.sonatype.aether.graph.DependencyNode; import org.sonatype.aether.version.InvalidVersionSpecificationException; import org.sonatype.aether.version.Version; import org.sonatype.aether.version.VersionRange; import org.sonatype.aether.version.VersionScheme; /** * A simple filter to include artifacts from a list of patterns. The artifact pattern syntax is of the form: * *
 * [groupId]:[artifactId]:[extension]:[version]
 * 
*

* Where each pattern segment is optional and supports full and partial * wildcards. An empty pattern * segment is treated as an implicit wildcard. Version can be a range in case a {@link VersionScheme} is specified. *

*

* For example, org.apache.* would match all artifacts whose group id started with org.apache. * , and :::*-SNAPSHOT would match all snapshot artifacts. *

* * @author Alin Dreghiciu */ public class PatternInclusionsDependencyFilter implements DependencyFilter { private final Collection patterns = new HashSet(); private final VersionScheme versionScheme; /** * Creates a new filter using the specified patterns. * * @param patterns The include patterns, may be {@code null} or empty to include no artifacts. */ public PatternInclusionsDependencyFilter( final String... patterns ) { this( null, patterns ); } /** * Creates a new filter using the specified patterns. * * @param versionScheme To be used for parsing versions/version ranges. If {@code null} and pattern specifies a * range no artifact will be included. * @param patterns The include patterns, may be {@code null} or empty to include no artifacts. */ public PatternInclusionsDependencyFilter( final VersionScheme versionScheme, final String... patterns ) { this( versionScheme, patterns == null ? null : Arrays.asList( patterns ) ); } /** * Creates a new filter using the specified patterns. * * @param patterns The include patterns, may be {@code null} or empty to include no artifacts. */ public PatternInclusionsDependencyFilter( final Collection patterns ) { this( null, patterns ); } /** * Creates a new filter using the specified patterns and {@link VersionScheme} . * * @param versionScheme To be used for parsing versions/version ranges. If {@code null} and pattern specifies a * range no artifact will be included. * @param patterns The include patterns, may be {@code null} or empty to include no artifacts. */ public PatternInclusionsDependencyFilter( final VersionScheme versionScheme, final Collection patterns ) { if ( patterns != null ) { this.patterns.addAll( patterns ); } this.versionScheme = versionScheme; } public boolean accept( final DependencyNode node, List parents ) { final Dependency dependency = node.getDependency(); if ( dependency == null ) { return true; } final Artifact artifact = dependency.getArtifact(); for ( final String pattern : patterns ) { final boolean matched = accept( artifact, pattern ); if ( matched ) { return true; } } return false; } private boolean accept( final Artifact artifact, final String pattern ) { final String[] tokens = new String[] { artifact.getGroupId(), artifact.getArtifactId(), artifact.getExtension(), artifact.getBaseVersion() }; final String[] patternTokens = pattern.split( ":" ); // fail immediately if pattern tokens outnumber tokens to match boolean matched = ( patternTokens.length <= tokens.length ); for ( int i = 0; matched && i < patternTokens.length; i++ ) { matched = matches( tokens[i], patternTokens[i] ); } return matched; } private boolean matches( final String token, final String pattern ) { boolean matches; // support full wildcard and implied wildcard if ( "*".equals( pattern ) || pattern.length() == 0 ) { matches = true; } // support contains wildcard else if ( pattern.startsWith( "*" ) && pattern.endsWith( "*" ) ) { final String contains = pattern.substring( 1, pattern.length() - 1 ); matches = ( token.indexOf( contains ) != -1 ); } // support leading wildcard else if ( pattern.startsWith( "*" ) ) { final String suffix = pattern.substring( 1, pattern.length() ); matches = token.endsWith( suffix ); } // support trailing wildcard else if ( pattern.endsWith( "*" ) ) { final String prefix = pattern.substring( 0, pattern.length() - 1 ); matches = token.startsWith( prefix ); } // support versions range else if ( pattern.startsWith( "[" ) || pattern.startsWith( "(" ) ) { matches = isVersionIncludedInRange( token, pattern ); } // support exact match else { matches = token.equals( pattern ); } return matches; } private boolean isVersionIncludedInRange( final String version, final String range ) { if ( versionScheme == null ) { return false; } else { try { final Version parsedVersion = versionScheme.parseVersion( version ); final VersionRange parsedRange = versionScheme.parseVersionRange( range ); return parsedRange.containsVersion( parsedVersion ); } catch ( final InvalidVersionSpecificationException e ) { return false; } } } @Override public boolean equals( final Object obj ) { if ( this == obj ) { return true; } if ( obj == null || !getClass().equals( obj.getClass() ) ) { return false; } final PatternInclusionsDependencyFilter that = (PatternInclusionsDependencyFilter) obj; return this.patterns.equals( that.patterns ) && ( this.versionScheme == null ? that.versionScheme == null : this.versionScheme.equals( that.versionScheme ) ); } @Override public int hashCode() { int hash = 17; hash = hash * 31 + patterns.hashCode(); hash = hash * 31 + ( ( versionScheme == null ) ? 0 : versionScheme.hashCode() ); return hash; } } aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/filter/ScopeDependencyFilter.java000066400000000000000000000062701167050556700331710ustar00rootroot00000000000000package org.sonatype.aether.util.filter; /******************************************************************************* * 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.Arrays; import java.util.Collection; import java.util.HashSet; import java.util.List; import org.sonatype.aether.graph.Dependency; import org.sonatype.aether.graph.DependencyFilter; import org.sonatype.aether.graph.DependencyNode; /** * A dependency filter based on dependency scopes. Note: This filter does not assume any relationships between * the scopes. In particular, the filter is not aware of scopes that logically include other scopes. * * @author Benjamin Bentmann * @see Dependency#getScope() */ public class ScopeDependencyFilter implements DependencyFilter { private final Collection included = new HashSet(); private final Collection excluded = new HashSet(); /** * Creates a new filter using the specified includes and excludes. * * @param included The set of scopes to include, may be {@code null} or empty to include any scope. * @param excluded The set of scopes to exclude, may be {@code null} or empty to exclude no scope. */ public ScopeDependencyFilter( Collection included, Collection excluded ) { if ( included != null ) { this.included.addAll( included ); } if ( excluded != null ) { this.excluded.addAll( excluded ); } } /** * Creates a new filter using the specified excludes. * * @param excluded The set of scopes to exclude, may be {@code null} or empty to exclude no scope. */ public ScopeDependencyFilter( String... excluded ) { if ( excluded != null ) { this.excluded.addAll( Arrays.asList( excluded ) ); } } public boolean accept( DependencyNode node, List parents ) { Dependency dependency = node.getDependency(); if ( dependency == null ) { return true; } String scope = node.getDependency().getScope(); return ( included.isEmpty() || included.contains( scope ) ) && ( excluded.isEmpty() || !excluded.contains( scope ) ); } @Override public boolean equals( Object obj ) { if ( this == obj ) { return true; } if ( obj == null || !getClass().equals( obj.getClass() ) ) { return false; } ScopeDependencyFilter that = (ScopeDependencyFilter) obj; return this.included.equals( that.included ) && this.excluded.equals( that.excluded ); } @Override public int hashCode() { int hash = 17; hash = hash * 31 + included.hashCode(); hash = hash * 31 + excluded.hashCode(); return hash; } } aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/graph/000077500000000000000000000000001167050556700257175ustar00rootroot00000000000000AbstractDepthFirstNodeListGenerator.java000066400000000000000000000135721167050556700355640ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/graphpackage org.sonatype.aether.util.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 org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.graph.Dependency; import org.sonatype.aether.graph.DependencyNode; import org.sonatype.aether.graph.DependencyVisitor; import java.io.File; import java.util.ArrayList; import java.util.IdentityHashMap; import java.util.Iterator; import java.util.List; import java.util.Map; /** * Abstract base class for depth first dependency tree traversers. Subclasses of this visitor will visit each node * exactly once regardless how many paths within the dependency graph lead to the node such that the resulting node * sequence is free of duplicates.
* Actual vertex ordering (preorder, inorder, postorder) needs to be defined by subclasses through appropriate * implementations for {@link #visitEnter(org.sonatype.aether.graph.DependencyNode)} and * {@link #visitLeave(org.sonatype.aether.graph.DependencyNode)} * * @author Benjamin Bentmann * @author Ansgar Konermann */ public abstract class AbstractDepthFirstNodeListGenerator implements DependencyVisitor { private final Map visitedNodes; protected final List nodes; public AbstractDepthFirstNodeListGenerator() { nodes = new ArrayList( 128 ); visitedNodes = new IdentityHashMap( 512 ); } /** * Gets the list of dependency nodes that was generated during the graph traversal. * * @return The list of dependency nodes, never {@code null}. */ public List getNodes() { return nodes; } /** * Gets the dependencies seen during the graph traversal. * * @param includeUnresolved Whether unresolved dependencies shall be included in the result or not. * @return The list of dependencies, never {@code null}. */ public List getDependencies( boolean includeUnresolved ) { List dependencies = new ArrayList( getNodes().size() ); for ( DependencyNode node : getNodes() ) { Dependency dependency = node.getDependency(); if ( dependency != null ) { if ( includeUnresolved || dependency.getArtifact().getFile() != null ) { dependencies.add( dependency ); } } } return dependencies; } /** * Gets the artifacts associated with the list of dependency nodes generated during the graph traversal. * * @param includeUnresolved Whether unresolved artifacts shall be included in the result or not. * @return The list of artifacts, never {@code null}. */ public List getArtifacts( boolean includeUnresolved ) { List artifacts = new ArrayList( getNodes().size() ); for ( DependencyNode node : getNodes() ) { if ( node.getDependency() != null ) { Artifact artifact = node.getDependency().getArtifact(); if ( includeUnresolved || artifact.getFile() != null ) { artifacts.add( artifact ); } } } return artifacts; } /** * Gets the files of resolved artifacts seen during the graph traversal. * * @return The list of artifact files, never {@code null}. */ public List getFiles() { List files = new ArrayList( getNodes().size() ); for ( DependencyNode node : getNodes() ) { if ( node.getDependency() != null ) { File file = node.getDependency().getArtifact().getFile(); if ( file != null ) { files.add( file ); } } } return files; } /** * Gets a class path by concatenating the artifact files of the visited dependency nodes. Nodes with unresolved * artifacts are automatically skipped. * * @return The class path, using the platform-specific path separator, never {@code null}. */ public String getClassPath() { StringBuilder buffer = new StringBuilder( 1024 ); for ( Iterator it = getNodes().iterator(); it.hasNext(); ) { DependencyNode node = it.next(); if ( node.getDependency() != null ) { Artifact artifact = node.getDependency().getArtifact(); if ( artifact.getFile() != null ) { buffer.append( artifact.getFile().getAbsolutePath() ); if ( it.hasNext() ) { buffer.append( File.pathSeparatorChar ); } } } } return buffer.toString(); } /** * Marks the specified node as being visited and determines whether the node has been visited before. * * @param node The node being visited, must not be {@code null}. * @return {@code true} if the node has not been visited before, {@code false} if the node was already visited. */ protected boolean setVisited( DependencyNode node ) { return visitedNodes.put( node, Boolean.TRUE ) == null; } public abstract boolean visitEnter( DependencyNode node ); public abstract boolean visitLeave( DependencyNode node ); } aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/graph/CloningDependencyVisitor.java000066400000000000000000000054101167050556700335320ustar00rootroot00000000000000package org.sonatype.aether.util.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.IdentityHashMap; import java.util.Map; import org.sonatype.aether.graph.DependencyNode; import org.sonatype.aether.graph.DependencyVisitor; /** * A dependency visitor that constructs a clone of the visited dependency graph. If such a visitor is passed into a * {@link FilteringDependencyVisitor}, a sub graph can be created. This class creates shallow clones of the visited * dependency nodes but clients can create a subclass and override {@link #clone(DependencyNode)} to alter the clone * process. * * @author Benjamin Bentmann */ public class CloningDependencyVisitor implements DependencyVisitor { private final Map clones; private final Stack parents; private DependencyNode root; /** * Creates a new visitor that clones the visited nodes. */ public CloningDependencyVisitor() { parents = new Stack(); clones = new IdentityHashMap( 256 ); } /** * Gets the root node of the cloned dependency graph. * * @return The root node of the cloned dependency graph or {@code null}. */ public DependencyNode getRootNode() { return root; } /** * Creates a clone of the specified node. * * @param node The node to clone, must not be {@code null}. * @return The cloned node, never {@code null}. */ protected DependencyNode clone( DependencyNode node ) { DefaultDependencyNode clone = new DefaultDependencyNode( node ); return clone; } public boolean visitEnter( DependencyNode node ) { boolean recurse = true; DependencyNode clone = clones.get( node ); if ( clone == null ) { clone = clone( node ); clones.put( node, clone ); } else { recurse = false; } DependencyNode parent = parents.peek(); if ( parent == null ) { root = clone; } else { parent.getChildren().add( clone ); } parents.push( clone ); return recurse; } public boolean visitLeave( DependencyNode node ) { parents.pop(); return true; } } aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/graph/DefaultDependencyNode.java000066400000000000000000000176551167050556700327710ustar00rootroot00000000000000package org.sonatype.aether.util.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.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.graph.Dependency; import org.sonatype.aether.graph.DependencyNode; import org.sonatype.aether.graph.DependencyVisitor; import org.sonatype.aether.repository.RemoteRepository; import org.sonatype.aether.version.Version; import org.sonatype.aether.version.VersionConstraint; /** * A node within a dependency graph. * * @author Benjamin Bentmann */ public class DefaultDependencyNode implements DependencyNode { private List children = new ArrayList( 0 ); private Dependency dependency; private List relocations = Collections.emptyList(); private Collection aliases = Collections.emptyList(); private VersionConstraint versionConstraint; private Version version; private String premanagedVersion; private String premanagedScope; private List repositories = Collections.emptyList(); private String context = ""; private Map data = Collections.emptyMap(); /** * Creates an empty dependency node. */ public DefaultDependencyNode() { // enables no-arg constructor } /** * Creates a new root node with the specified dependency. * * @param dependency The dependency associated with this node, may be {@code null}. */ public DefaultDependencyNode( Dependency dependency ) { this.dependency = dependency; } /** * Creates a shallow clone of the specified node. * * @param node The node to copy, must not be {@code null}. */ public DefaultDependencyNode( DependencyNode node ) { setDependency( node.getDependency() ); setAliases( node.getAliases() ); setRequestContext( node.getRequestContext() ); setPremanagedScope( node.getPremanagedScope() ); setPremanagedVersion( node.getPremanagedVersion() ); setRelocations( node.getRelocations() ); setRepositories( node.getRepositories() ); setVersion( node.getVersion() ); setVersionConstraint( node.getVersionConstraint() ); setData( node.getData() ); } public List getChildren() { return children; } public Dependency getDependency() { return dependency; } public void setDependency( Dependency dependency ) { this.dependency = dependency; } public void setArtifact( Artifact artifact ) { dependency = dependency.setArtifact( artifact ); } public List getRelocations() { return relocations; } /** * Sets the sequence of relocations that was followed to resolve this dependency's artifact. * * @param relocations The sequence of relocations, may be {@code null}. */ public void setRelocations( List relocations ) { if ( relocations == null || relocations.isEmpty() ) { this.relocations = Collections.emptyList(); } else { this.relocations = relocations; } } public Collection getAliases() { return aliases; } /** * Sets the known aliases for this dependency's artifact. * * @param aliases The known aliases, may be {@code null}. */ public void setAliases( Collection aliases ) { if ( aliases == null || aliases.isEmpty() ) { this.aliases = Collections.emptyList(); } else { this.aliases = aliases; } } public VersionConstraint getVersionConstraint() { return versionConstraint; } public void setVersionConstraint( VersionConstraint versionConstraint ) { this.versionConstraint = versionConstraint; } public Version getVersion() { return version; } public void setVersion( Version version ) { this.version = version; } public void setScope( String scope ) { dependency = dependency.setScope( scope ); } public String getPremanagedVersion() { return premanagedVersion; } /** * Sets the version or version range for this dependency before dependency management was applied (if any). * * @param premanagedVersion The originally declared dependency version or {@code null} if the version was not * managed. */ public void setPremanagedVersion( String premanagedVersion ) { this.premanagedVersion = premanagedVersion; } public String getPremanagedScope() { return premanagedScope; } /** * Sets the scope for this dependency before dependency management was applied (if any). * * @param premanagedScope The originally declared dependency scope or {@code null} if the scope was not managed. */ public void setPremanagedScope( String premanagedScope ) { this.premanagedScope = premanagedScope; } public List getRepositories() { return repositories; } /** * Sets the remote repositories from which this node's artifact shall be resolved. * * @param repositories The remote repositories to use for artifact resolution, may be {@code null}. */ public void setRepositories( List repositories ) { if ( repositories == null || repositories.isEmpty() ) { this.repositories = Collections.emptyList(); } else { this.repositories = repositories; } } public String getRequestContext() { return context; } public void setRequestContext( String context ) { this.context = ( context != null ) ? context : ""; } public Map getData() { return data; } public void setData( Map data ) { if ( data == null ) { this.data = Collections.emptyMap(); } else { this.data = data; } } public void setData( Object key, Object value ) { if ( key == null ) { throw new IllegalArgumentException( "key must not be null" ); } if ( value == null ) { if ( !data.isEmpty() ) { data.remove( key ); if ( data.isEmpty() ) { data = Collections.emptyMap(); } } } else { if ( data.isEmpty() ) { data = new HashMap(); } data.put( key, value ); } } public boolean accept( DependencyVisitor visitor ) { if ( visitor.visitEnter( this ) ) { for ( DependencyNode child : getChildren() ) { if ( !child.accept( visitor ) ) { break; } } } return visitor.visitLeave( this ); } @Override public String toString() { Dependency dep = getDependency(); if ( dep == null ) { return String.valueOf( getChildren() ); } return dep.toString(); } } FilteringDependencyVisitor.java000066400000000000000000000056201167050556700340100ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/graphpackage org.sonatype.aether.util.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 org.sonatype.aether.graph.DependencyFilter; import org.sonatype.aether.graph.DependencyNode; import org.sonatype.aether.graph.DependencyVisitor; /** * A dependency visitor that delegates to another visitor if nodes match a filter. Note that in case of a mismatching * node, the children of that node are still visisted and presented to the filter. * * @author Benjamin Bentmann */ public class FilteringDependencyVisitor implements DependencyVisitor { private final DependencyFilter filter; private final DependencyVisitor visitor; private final Stack accepts; private final Stack parents; /** * Creates a new visitor that delegates traversal of nodes matching the given filter to the specified visitor. * * @param visitor The visitor to delegate to, must not be {@code null}. * @param filter The filter to apply, may be {@code null} to not filter. */ public FilteringDependencyVisitor( DependencyVisitor visitor, DependencyFilter filter ) { if ( visitor == null ) { throw new IllegalArgumentException( "dependency visitor not specified" ); } this.visitor = visitor; this.filter = filter; this.accepts = new Stack(); this.parents = new Stack(); } /** * Gets the visitor to which this visitor delegates to. * * @return The visitor being delegated to, never {@code null}. */ public DependencyVisitor getVisitor() { return visitor; } /** * Gets the filter being applied before delegation. * * @return The filter being applied or {@code null} if none. */ public DependencyFilter getFilter() { return filter; } public boolean visitEnter( DependencyNode node ) { boolean accept = filter == null || filter.accept( node, parents ); accepts.push( Boolean.valueOf( accept ) ); parents.push( node ); if ( accept ) { return visitor.visitEnter( node ); } else { return true; } } public boolean visitLeave( DependencyNode node ) { parents.pop(); Boolean accept = accepts.pop(); if ( accept.booleanValue() ) { return visitor.visitLeave( node ); } else { return true; } } } PathRecordingDependencyVisitor.java000066400000000000000000000075161167050556700346240ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/graphpackage org.sonatype.aether.util.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.ArrayList; import java.util.Arrays; import java.util.List; import org.sonatype.aether.graph.DependencyFilter; import org.sonatype.aether.graph.DependencyNode; import org.sonatype.aether.graph.DependencyVisitor; /** * A dependency visitor that records all paths leading to nodes matching a certain filter criteria. * * @author Benjamin Bentmann */ public class PathRecordingDependencyVisitor implements DependencyVisitor { private final DependencyFilter filter; private final List> paths; private final Stack parents; private final boolean excludeChildrenOfMatches; /** * Creates a new visitor that uses the specified filter to identify terminal nodes of interesting paths. The visitor * will not search for paths going beyond an already matched node. * * @param filter The filter used to select terminal nodes of paths to record, may be {@code null} to match any node. */ public PathRecordingDependencyVisitor( DependencyFilter filter ) { this( filter, true ); } /** * Creates a new visitor that uses the specified filter to identify terminal nodes of interesting paths. * * @param filter The filter used to select terminal nodes of paths to record, may be {@code null} to match any node. * @param excludeChildrenOfMatches Flag controlling whether children of matched nodes should be excluded from the * traversal, thereby ignoring any potential paths to other matching nodes beneath a matching ancestor * node. If {@code true}, all recorded paths will have only one matching node (namely the terminal node), * if {@code false} a recorded path can consist of multiple matching nodes. */ public PathRecordingDependencyVisitor( DependencyFilter filter, boolean excludeChildrenOfMatches ) { this.filter = filter; this.excludeChildrenOfMatches = excludeChildrenOfMatches; paths = new ArrayList>(); parents = new Stack(); } /** * Gets the filter being used to select terminal nodes. * * @return The filter being used or {@code null} if none. */ public DependencyFilter getFilter() { return filter; } /** * Gets the paths leading to nodes matching the filter that have been recorded during the graph visit. A path is * given as a sequence of nodes, starting with the root node of the graph and ending with the node that matched the * filter. * * @return The recorded paths, never {@code null}. */ public List> getPaths() { return paths; } public boolean visitEnter( DependencyNode node ) { boolean accept = filter == null || filter.accept( node, parents ); parents.push( node ); if ( accept ) { DependencyNode[] path = new DependencyNode[parents.size()]; int i = parents.size() - 1; for ( DependencyNode n : parents ) { path[i] = n; i--; } paths.add( Arrays.asList( path ) ); } return !( excludeChildrenOfMatches && accept ); } public boolean visitLeave( DependencyNode node ) { parents.pop(); return true; } } PostorderNodeListGenerator.java000066400000000000000000000033311167050556700337750ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/graphpackage org.sonatype.aether.util.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 org.sonatype.aether.graph.DependencyNode; /** * Generates a sequence of dependency nodes from a dependeny graph by traversing the graph in postorder. This visitor * visits each node exactly once regardless how many paths within the dependency graph lead to the node such that the * resulting node sequence is free of duplicates. * * @author Ansgar Konermann */ public class PostorderNodeListGenerator extends AbstractDepthFirstNodeListGenerator { private final Stack visits; /** * Creates a new postorder list generator. */ public PostorderNodeListGenerator() { visits = new Stack(); } @Override public boolean visitEnter( DependencyNode node ) { boolean visited = !setVisited( node ); visits.push( Boolean.valueOf( visited ) ); if ( visited ) { return false; } return true; } @Override public boolean visitLeave( DependencyNode node ) { Boolean visited = visits.pop(); if ( visited.booleanValue() ) { return true; } if ( node.getDependency() != null ) { nodes.add( node ); } return true; } } PreorderNodeListGenerator.java000066400000000000000000000026601167050556700336020ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/graphpackage org.sonatype.aether.util.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 org.sonatype.aether.graph.DependencyNode; /** * Generates a sequence of dependency nodes from a dependeny graph by traversing the graph in preorder. This visitor * visits each node exactly once regardless how many paths within the dependency graph lead to the node such that the * resulting node sequence is free of duplicates. * * @author Benjamin Bentmann */ public class PreorderNodeListGenerator extends AbstractDepthFirstNodeListGenerator { /** * Creates a new preorder list generator. */ public PreorderNodeListGenerator() { } @Override public boolean visitEnter( DependencyNode node ) { if ( !setVisited( node ) ) { return false; } if ( node.getDependency() != null ) { nodes.add( node ); } return true; } @Override public boolean visitLeave( DependencyNode node ) { return true; } } aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/graph/Stack.java000066400000000000000000000037171167050556700276370ustar00rootroot00000000000000package org.sonatype.aether.util.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.AbstractList; import java.util.NoSuchElementException; import java.util.RandomAccess; /** * A non-synchronized stack with a non-modifiable list view which starts at the top of the stack. While * {@code LinkedList} can provide the same behavior, it creates many temp objects upon frequent pushes/pops. */ class Stack extends AbstractList implements RandomAccess { private Object[] elements = new Object[64]; private int size; public void push( E element ) { if ( size >= elements.length ) { Object[] tmp = new Object[size + 64]; System.arraycopy( elements, 0, tmp, 0, elements.length ); elements = tmp; } elements[size++] = element; } @SuppressWarnings( "unchecked" ) public E pop() { if ( size <= 0 ) { throw new NoSuchElementException(); } return (E) elements[--size]; } @SuppressWarnings( "unchecked" ) public E peek() { if ( size <= 0 ) { return null; } return (E) elements[size - 1]; } @SuppressWarnings( "unchecked" ) @Override public E get( int index ) { if ( index < 0 || index >= size ) { throw new IndexOutOfBoundsException( "Index: " + index + ", Size: " + size ); } return (E) elements[size - index - 1]; } @Override public int size() { return size; } } aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/graph/TreeDependencyVisitor.java000066400000000000000000000042651167050556700330470ustar00rootroot00000000000000package org.sonatype.aether.util.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.IdentityHashMap; import java.util.Map; import org.sonatype.aether.graph.DependencyNode; import org.sonatype.aether.graph.DependencyVisitor; /** * A dependency visitor that delegates to another visitor if a node hasn't been visited before. In other words, this * visitor provides a tree-view of a dependency graph which generally can have multiple paths to the same node or even * cycles. * * @author Benjamin Bentmann */ public class TreeDependencyVisitor implements DependencyVisitor { private final Map visitedNodes; private final DependencyVisitor visitor; private final Stack visits; /** * Creates a new visitor that delegates to the specified visitor. * * @param visitor The visitor to delegate to, must not be {@code null}. */ public TreeDependencyVisitor( DependencyVisitor visitor ) { if ( visitor == null ) { throw new IllegalArgumentException( "no visitor delegate specified" ); } this.visitor = visitor; visitedNodes = new IdentityHashMap( 512 ); visits = new Stack(); } public boolean visitEnter( DependencyNode node ) { boolean visited = visitedNodes.put( node, Boolean.TRUE ) != null; visits.push( Boolean.valueOf( visited ) ); if ( visited ) { return false; } return visitor.visitEnter( node ); } public boolean visitLeave( DependencyNode node ) { Boolean visited = visits.pop(); if ( visited.booleanValue() ) { return true; } return visitor.visitLeave( node ); } } aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/graph/manager/000077500000000000000000000000001167050556700273315ustar00rootroot00000000000000ClassicDependencyManager.java000066400000000000000000000235351167050556700350000ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/graph/managerpackage org.sonatype.aether.util.graph.manager; /******************************************************************************* * 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.HashMap; import java.util.LinkedHashSet; import java.util.Map; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.collection.DependencyCollectionContext; import org.sonatype.aether.collection.DependencyManagement; import org.sonatype.aether.collection.DependencyManager; import org.sonatype.aether.graph.Dependency; import org.sonatype.aether.graph.Exclusion; import org.sonatype.aether.util.artifact.ArtifactProperties; import org.sonatype.aether.util.artifact.JavaScopes; /** * A dependency manager that mimics the way Maven 2.x works. * * @author Benjamin Bentmann */ public class ClassicDependencyManager implements DependencyManager { private final int depth; private final Map managedVersions; private final Map managedScopes; private final Map managedLocalPaths; private final Map> managedExclusions; /** * Creates a new dependency manager without any management information. */ public ClassicDependencyManager() { this( 0, Collections. emptyMap(), Collections. emptyMap(), Collections. emptyMap(), Collections.> emptyMap() ); } private ClassicDependencyManager( int depth, Map managedVersions, Map managedScopes, Map managedLocalPaths, Map> managedExclusions ) { this.depth = depth; this.managedVersions = managedVersions; this.managedScopes = managedScopes; this.managedLocalPaths = managedLocalPaths; this.managedExclusions = managedExclusions; } public DependencyManager deriveChildManager( DependencyCollectionContext context ) { if ( depth >= 2 ) { return this; } else if ( depth == 1 ) { return new ClassicDependencyManager( depth + 1, managedVersions, managedScopes, managedLocalPaths, managedExclusions ); } Map managedVersions = this.managedVersions; Map managedScopes = this.managedScopes; Map managedLocalPaths = this.managedLocalPaths; Map> managedExclusions = this.managedExclusions; for ( Dependency managedDependency : context.getManagedDependencies() ) { Artifact artifact = managedDependency.getArtifact(); Object key = getKey( artifact ); String version = artifact.getVersion(); if ( version.length() > 0 && !managedVersions.containsKey( key ) ) { if ( managedVersions == this.managedVersions ) { managedVersions = new HashMap( this.managedVersions ); } managedVersions.put( key, version ); } String scope = managedDependency.getScope(); if ( scope.length() > 0 && !managedScopes.containsKey( key ) ) { if ( managedScopes == this.managedScopes ) { managedScopes = new HashMap( this.managedScopes ); } managedScopes.put( key, scope ); } String localPath = managedDependency.getArtifact().getProperty( ArtifactProperties.LOCAL_PATH, null ); if ( localPath != null && !managedLocalPaths.containsKey( key ) ) { if ( managedLocalPaths == this.managedLocalPaths ) { managedLocalPaths = new HashMap( this.managedLocalPaths ); } managedLocalPaths.put( key, localPath ); } Collection exclusions = managedDependency.getExclusions(); if ( !exclusions.isEmpty() ) { if ( managedExclusions == this.managedExclusions ) { managedExclusions = new HashMap>( this.managedExclusions ); } Collection managed = managedExclusions.get( key ); if ( managed == null ) { managed = new LinkedHashSet(); managedExclusions.put( key, managed ); } managed.addAll( exclusions ); } } return new ClassicDependencyManager( depth + 1, managedVersions, managedScopes, managedLocalPaths, managedExclusions ); } public DependencyManagement manageDependency( Dependency dependency ) { DependencyManagement management = null; Object key = getKey( dependency.getArtifact() ); if ( depth >= 2 ) { String version = managedVersions.get( key ); if ( version != null ) { if ( management == null ) { management = new DependencyManagement(); } management.setVersion( version ); } String scope = managedScopes.get( key ); if ( scope != null ) { if ( management == null ) { management = new DependencyManagement(); } management.setScope( scope ); if ( !JavaScopes.SYSTEM.equals( scope ) && dependency.getArtifact().getProperty( ArtifactProperties.LOCAL_PATH, null ) != null ) { Map properties = new HashMap( dependency.getArtifact().getProperties() ); properties.remove( ArtifactProperties.LOCAL_PATH ); management.setProperties( properties ); } } if ( ( scope != null && JavaScopes.SYSTEM.equals( scope ) ) || ( scope == null && JavaScopes.SYSTEM.equals( dependency.getScope() ) ) ) { String localPath = managedLocalPaths.get( key ); if ( localPath != null ) { if ( management == null ) { management = new DependencyManagement(); } Map properties = new HashMap( dependency.getArtifact().getProperties() ); properties.put( ArtifactProperties.LOCAL_PATH, localPath ); management.setProperties( properties ); } } } Collection exclusions = managedExclusions.get( key ); if ( exclusions != null ) { if ( management == null ) { management = new DependencyManagement(); } Collection result = new LinkedHashSet( dependency.getExclusions() ); result.addAll( exclusions ); management.setExclusions( result ); } return management; } private Object getKey( Artifact a ) { return new Key( a ); } @Override public boolean equals( Object obj ) { if ( this == obj ) { return true; } else if ( null == obj || !getClass().equals( obj.getClass() ) ) { return false; } ClassicDependencyManager that = (ClassicDependencyManager) obj; return depth == that.depth && managedVersions.equals( that.managedVersions ) && managedScopes.equals( that.managedScopes ) && managedExclusions.equals( that.managedExclusions ); } @Override public int hashCode() { int hash = 17; hash = hash * 31 + depth; hash = hash * 31 + managedVersions.hashCode(); hash = hash * 31 + managedScopes.hashCode(); hash = hash * 31 + managedExclusions.hashCode(); return hash; } static class Key { private final Artifact artifact; private final int hashCode; public Key( Artifact artifact ) { this.artifact = artifact; int hash = 17; hash = hash * 31 + artifact.getGroupId().hashCode(); hash = hash * 31 + artifact.getArtifactId().hashCode(); hashCode = hash; } @Override public boolean equals( Object obj ) { if ( obj == this ) { return true; } else if ( !( obj instanceof Key ) ) { return false; } Key that = (Key) obj; return artifact.getArtifactId().equals( that.artifact.getArtifactId() ) && artifact.getGroupId().equals( that.artifact.getGroupId() ) && artifact.getExtension().equals( that.artifact.getExtension() ) && artifact.getClassifier().equals( that.artifact.getClassifier() ); } @Override public int hashCode() { return hashCode; } } } NoopDependencyManager.java000066400000000000000000000030741167050556700343260ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/graph/managerpackage org.sonatype.aether.util.graph.manager; /******************************************************************************* * 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.collection.DependencyCollectionContext; import org.sonatype.aether.collection.DependencyManagement; import org.sonatype.aether.collection.DependencyManager; import org.sonatype.aether.graph.Dependency; /** * A dependency manager that does not do any dependency management. * * @author Benjamin Bentmann */ public class NoopDependencyManager implements DependencyManager { public static final DependencyManager INSTANCE = new NoopDependencyManager(); public DependencyManager deriveChildManager( DependencyCollectionContext context ) { return this; } public DependencyManagement manageDependency( Dependency dependency ) { return null; } @Override public boolean equals( Object obj ) { if ( this == obj ) { return true; } else if ( null == obj || !getClass().equals( obj.getClass() ) ) { return false; } return true; } @Override public int hashCode() { return getClass().hashCode(); } } aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/graph/selector/000077500000000000000000000000001167050556700275375ustar00rootroot00000000000000AndDependencySelector.java000066400000000000000000000112311167050556700345230ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/graph/selectorpackage org.sonatype.aether.util.graph.selector; /******************************************************************************* * 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.LinkedHashSet; import java.util.Set; import org.sonatype.aether.collection.DependencyCollectionContext; import org.sonatype.aether.collection.DependencySelector; import org.sonatype.aether.graph.Dependency; /** * A dependency selector that combines zero or more other selectors using a logical {@code AND}. * * @author Benjamin Bentmann */ public class AndDependencySelector implements DependencySelector { private final Collection selectors; /** * Creates a new selector from the specified selectors. * * @param selectors The selectors to combine, may be {@code null}. */ public AndDependencySelector( DependencySelector... selectors ) { if ( selectors != null && selectors.length > 0 ) { this.selectors = new LinkedHashSet(); Collections.addAll( this.selectors, selectors ); } else { this.selectors = Collections.emptySet(); } } /** * Creates a new selector from the specified selectors. * * @param selectors The selectors to combine, may be {@code null}. */ public AndDependencySelector( Set selectors ) { if ( selectors != null && !selectors.isEmpty() ) { this.selectors = selectors; } else { this.selectors = Collections.emptySet(); } } /** * Creates a new selector from the specified selectors. * * @param selector1 The first selector to combine, may be {@code null}. * @param selector2 The first selector to combine, may be {@code null}. * @return The combined selector or {@code null} if both selectors were {@code null}. */ public static DependencySelector newInstance( DependencySelector selector1, DependencySelector selector2 ) { if ( selector1 == null ) { return selector2; } else if ( selector2 == null ) { return selector1; } return new AndDependencySelector( selector1, selector2 ); } public boolean selectDependency( Dependency dependency ) { for ( DependencySelector selector : selectors ) { if ( !selector.selectDependency( dependency ) ) { return false; } } return true; } public DependencySelector deriveChildSelector( DependencyCollectionContext context ) { int seen = 0; Set childSelectors = null; for ( DependencySelector selector : selectors ) { DependencySelector childSelector = selector.deriveChildSelector( context ); if ( childSelectors != null ) { childSelectors.add( childSelector ); } else if ( !selector.equals( childSelector ) ) { childSelectors = new LinkedHashSet(); if ( seen > 0 ) { for ( DependencySelector s : selectors ) { if ( childSelectors.size() >= seen ) { break; } childSelectors.add( s ); } } childSelectors.add( childSelector ); } else { seen++; } } return childSelectors != null ? new AndDependencySelector( childSelectors ) : this; } @Override public boolean equals( Object obj ) { if ( this == obj ) { return true; } else if ( null == obj || !getClass().equals( obj.getClass() ) ) { return false; } AndDependencySelector that = (AndDependencySelector) obj; return selectors.equals( that.selectors ); } @Override public int hashCode() { int hash = getClass().hashCode(); hash = hash * 31 + selectors.hashCode(); return hash; } } ExclusionDependencySelector.java000066400000000000000000000075731167050556700360100ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/graph/selectorpackage org.sonatype.aether.util.graph.selector; /******************************************************************************* * 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.LinkedHashSet; import java.util.Set; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.collection.DependencyCollectionContext; import org.sonatype.aether.collection.DependencySelector; import org.sonatype.aether.graph.Dependency; import org.sonatype.aether.graph.Exclusion; /** * A dependency selector that applies exclusions based on artifact coordinates. * * @author Benjamin Bentmann * @see Dependency#getExclusions() */ public class ExclusionDependencySelector implements DependencySelector { private final Collection exclusions; /** * Creates a new selector without any exclusions. */ public ExclusionDependencySelector() { this( Collections. emptySet() ); } /** * Creates a new selector with the specified exclusions. * * @param exclusions The exclusions, may be {@code null}. */ public ExclusionDependencySelector( Set exclusions ) { if ( exclusions != null && !exclusions.isEmpty() ) { this.exclusions = exclusions; } else { this.exclusions = Collections.emptySet(); } } public boolean selectDependency( Dependency dependency ) { Artifact artifact = dependency.getArtifact(); for ( Exclusion exclusion : exclusions ) { if ( matches( exclusion, artifact ) ) { return false; } } return true; } private boolean matches( Exclusion exclusion, Artifact artifact ) { if ( !matches( exclusion.getArtifactId(), artifact.getArtifactId() ) ) { return false; } if ( !matches( exclusion.getGroupId(), artifact.getGroupId() ) ) { return false; } if ( !matches( exclusion.getExtension(), artifact.getExtension() ) ) { return false; } if ( !matches( exclusion.getClassifier(), artifact.getClassifier() ) ) { return false; } return true; } private boolean matches( String pattern, String value ) { return "*".equals( pattern ) || pattern.equals( value ); } public DependencySelector deriveChildSelector( DependencyCollectionContext context ) { Dependency dependency = context.getDependency(); Collection exclusions = ( dependency != null ) ? dependency.getExclusions() : null; if ( exclusions == null || exclusions.isEmpty() ) { return this; } Set merged = new LinkedHashSet(); merged.addAll( this.exclusions ); merged.addAll( exclusions ); return new ExclusionDependencySelector( merged ); } @Override public boolean equals( Object obj ) { if ( this == obj ) { return true; } else if ( null == obj || !getClass().equals( obj.getClass() ) ) { return false; } ExclusionDependencySelector that = (ExclusionDependencySelector) obj; return exclusions.equals( that.exclusions ); } @Override public int hashCode() { int hash = getClass().hashCode(); hash = hash * 31 + exclusions.hashCode(); return hash; } } OptionalDependencySelector.java000066400000000000000000000040761167050556700356170ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/graph/selectorpackage org.sonatype.aether.util.graph.selector; /******************************************************************************* * 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.collection.DependencyCollectionContext; import org.sonatype.aether.collection.DependencySelector; import org.sonatype.aether.graph.Dependency; /** * A dependency selector that excludes optional dependencies which occur beyond level one of the dependency graph. * * @author Benjamin Bentmann * @see Dependency#isOptional() */ public class OptionalDependencySelector implements DependencySelector { private final int depth; /** * Creates a new selector to exclude optional transitive dependencies. */ public OptionalDependencySelector() { depth = 0; } private OptionalDependencySelector( int depth ) { this.depth = depth; } public boolean selectDependency( Dependency dependency ) { return depth < 2 || !dependency.isOptional(); } public DependencySelector deriveChildSelector( DependencyCollectionContext context ) { if ( depth >= 2 ) { return this; } return new OptionalDependencySelector( depth + 1 ); } @Override public boolean equals( Object obj ) { if ( this == obj ) { return true; } else if ( null == obj || !getClass().equals( obj.getClass() ) ) { return false; } OptionalDependencySelector that = (OptionalDependencySelector) obj; return depth == that.depth; } @Override public int hashCode() { int hash = getClass().hashCode(); hash = hash * 31 + depth; return hash; } } ScopeDependencySelector.java000066400000000000000000000100641167050556700350750ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/graph/selectorpackage org.sonatype.aether.util.graph.selector; /******************************************************************************* * 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.Arrays; import java.util.Collection; import java.util.Collections; import java.util.HashSet; import org.sonatype.aether.collection.DependencyCollectionContext; import org.sonatype.aether.collection.DependencySelector; import org.sonatype.aether.graph.Dependency; /** * A dependency selector that filters transitive dependencies based on their scope. Direct dependencies are always * included regardless of their scope. Note: This filter does not assume any relationships between the scopes. * In particular, the filter is not aware of scopes that logically include other scopes. * * @author Benjamin Bentmann * @see Dependency#getScope() */ public class ScopeDependencySelector implements DependencySelector { private final boolean transitive; private final Collection included; private final Collection excluded; /** * Creates a new selector using the specified includes and excludes. * * @param included The set of scopes to include, may be {@code null} or empty to include any scope. * @param excluded The set of scopes to exclude, may be {@code null} or empty to exclude no scope. */ public ScopeDependencySelector( Collection included, Collection excluded ) { transitive = false; if ( included != null ) { this.included = new HashSet(); this.included.addAll( included ); } else { this.included = Collections.emptySet(); } if ( excluded != null ) { this.excluded = new HashSet(); this.excluded.addAll( excluded ); } else { this.excluded = Collections.emptySet(); } } /** * Creates a new selector using the specified excludes. * * @param excluded The set of scopes to exclude, may be {@code null} or empty to exclude no scope. */ public ScopeDependencySelector( String... excluded ) { this( null, Arrays.asList( excluded ) ); } private ScopeDependencySelector( boolean transitive, Collection included, Collection excluded ) { this.transitive = transitive; this.included = included; this.excluded = excluded; } public boolean selectDependency( Dependency dependency ) { if ( !transitive ) { return true; } String scope = dependency.getScope(); return ( included.isEmpty() || included.contains( scope ) ) && ( excluded.isEmpty() || !excluded.contains( scope ) ); } public DependencySelector deriveChildSelector( DependencyCollectionContext context ) { if ( this.transitive || context.getDependency() == null ) { return this; } return new ScopeDependencySelector( true, included, excluded ); } @Override public boolean equals( Object obj ) { if ( this == obj ) { return true; } else if ( null == obj || !getClass().equals( obj.getClass() ) ) { return false; } ScopeDependencySelector that = (ScopeDependencySelector) obj; return transitive == that.transitive && included.equals( that.included ) && excluded.equals( that.excluded ); } @Override public int hashCode() { int hash = 17; hash = hash * 31 + ( transitive ? 1 : 0 ); hash = hash * 31 + included.hashCode(); hash = hash * 31 + excluded.hashCode(); return hash; } } StaticDependencySelector.java000066400000000000000000000036321167050556700352560ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/graph/selectorpackage org.sonatype.aether.util.graph.selector; /******************************************************************************* * 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.collection.DependencyCollectionContext; import org.sonatype.aether.collection.DependencySelector; import org.sonatype.aether.graph.Dependency; /** * A dependency selector that always includes or excludes dependencies. * * @author Benjamin Bentmann */ public class StaticDependencySelector implements DependencySelector { private final boolean select; /** * Creates a new selector with the specified selection behavior. * * @param select {@code true} to select all dependencies, {@code false} to exclude all dependencies. */ public StaticDependencySelector( boolean select ) { this.select = select; } public boolean selectDependency( Dependency dependency ) { return select; } public DependencySelector deriveChildSelector( DependencyCollectionContext context ) { return this; } @Override public boolean equals( Object obj ) { if ( this == obj ) { return true; } else if ( null == obj || !getClass().equals( obj.getClass() ) ) { return false; } StaticDependencySelector that = (StaticDependencySelector) obj; return select == that.select; } @Override public int hashCode() { int hash = getClass().hashCode(); hash = hash * 31 + ( select ? 1 : 0 ); return hash; } } aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/graph/transformer/000077500000000000000000000000001167050556700302615ustar00rootroot00000000000000ChainedDependencyGraphTransformer.java000066400000000000000000000052711167050556700376110ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/graph/transformerpackage org.sonatype.aether.util.graph.transformer; /******************************************************************************* * 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.collection.DependencyGraphTransformationContext; import org.sonatype.aether.collection.DependencyGraphTransformer; import org.sonatype.aether.graph.DependencyNode; /** * A dependency graph transformer that chains other transformers. * * @author Benjamin Bentmann */ public class ChainedDependencyGraphTransformer implements DependencyGraphTransformer { private final DependencyGraphTransformer[] transformers; /** * Creates a new transformer that chains the specified transformers. * * @param transformers The transformers to chain, may be {@code null} or empty. */ public ChainedDependencyGraphTransformer( DependencyGraphTransformer... transformers ) { if ( transformers == null ) { this.transformers = new DependencyGraphTransformer[0]; } else { this.transformers = transformers; } } /** * Creates a new transformer that chains the specified transformers or simply returns one of them if the other one * is {@code null}. * * @param transformer1 The first transformer of the chain, may be {@code null}. * @param transformer2 The second transformer of the chain, may be {@code null}. * @return The chained transformer or {@code null} if both input transformers are {@code null}. */ public static DependencyGraphTransformer newInstance( DependencyGraphTransformer transformer1, DependencyGraphTransformer transformer2 ) { if ( transformer1 == null ) { return transformer2; } else if ( transformer2 == null ) { return transformer1; } return new ChainedDependencyGraphTransformer( transformer1, transformer2 ); } public DependencyNode transformGraph( DependencyNode node, DependencyGraphTransformationContext context ) throws RepositoryException { for ( DependencyGraphTransformer transformer : transformers ) { node = transformer.transformGraph( node, context ); } return node; } } ConflictIdSorter.java000066400000000000000000000214251167050556700342660ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/graph/transformerpackage org.sonatype.aether.util.graph.transformer; /******************************************************************************* * 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 java.util.Collections; import java.util.HashSet; import java.util.IdentityHashMap; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import org.sonatype.aether.RepositoryException; import org.sonatype.aether.collection.DependencyGraphTransformationContext; import org.sonatype.aether.collection.DependencyGraphTransformer; import org.sonatype.aether.graph.DependencyNode; /** * A dependency graph transformer that creates a topological sorting of the conflict ids which have been assigned to the * dependency nodes. Conflict ids are sorted according to the dependency relation induced by the dependency graph. This * transformer will query the key {@link TransformationContextKeys#CONFLICT_IDS} in the transformation context for an * existing mapping of nodes to their conflicts ids. In absence of this map, the transformer will automatically invoke * the {@link ConflictMarker} to calculate the conflict ids. When this transformer has executed, the transformation * context holds a {@code List} that denotes the topologically sorted conflict ids. The list will be stored * using the key {@link TransformationContextKeys#SORTED_CONFLICT_IDS}. In addition, the transformer will store a * {@code Boolean} using the key {@link TransformationContextKeys#CYCLIC_CONFLICT_IDS} that indicates whether the * conflict ids have cyclic dependencies. * * @author Benjamin Bentmann */ public class ConflictIdSorter implements DependencyGraphTransformer { public DependencyNode transformGraph( DependencyNode node, DependencyGraphTransformationContext context ) throws RepositoryException { Map conflictIds = (Map) context.get( TransformationContextKeys.CONFLICT_IDS ); if ( conflictIds == null ) { ConflictMarker marker = new ConflictMarker(); marker.transformGraph( node, context ); conflictIds = (Map) context.get( TransformationContextKeys.CONFLICT_IDS ); } Map ids = new LinkedHashMap( 256 ); { ConflictId id = null; Object key = conflictIds.get( node ); if ( key != null ) { id = new ConflictId( key, 0 ); ids.put( key, id ); } Map visited = new IdentityHashMap( conflictIds.size() ); buildConflitIdDAG( ids, node, id, 0, visited, conflictIds ); } topsortConflictIds( ids.values(), context ); return node; } private void buildConflitIdDAG( Map ids, DependencyNode node, ConflictId id, int depth, Map visited, Map conflictIds ) { if ( visited.put( node, Boolean.TRUE ) != null ) { return; } depth++; for ( DependencyNode child : node.getChildren() ) { Object key = conflictIds.get( child ); ConflictId childId = ids.get( key ); if ( childId == null ) { childId = new ConflictId( key, depth ); ids.put( key, childId ); } else { childId.pullup( depth ); } if ( id != null ) { id.add( childId ); } buildConflitIdDAG( ids, child, childId, depth, visited, conflictIds ); } } private void topsortConflictIds( Collection conflictIds, DependencyGraphTransformationContext context ) { List sorted = new ArrayList( conflictIds.size() ); RootQueue roots = new RootQueue( conflictIds.size() / 2 ); for ( ConflictId id : conflictIds ) { if ( id.inDegree <= 0 ) { roots.add( id ); } } while ( !roots.isEmpty() ) { ConflictId root = roots.remove(); sorted.add( root.key ); for ( ConflictId child : root.children ) { child.inDegree--; if ( child.inDegree == 0 ) { roots.add( child ); } } } boolean cycle = sorted.size() < conflictIds.size(); while ( sorted.size() < conflictIds.size() ) { // cycle -> deal gracefully with nodes still having positive in-degree ConflictId nearest = null; for ( ConflictId id : conflictIds ) { if ( id.inDegree <= 0 ) { continue; } if ( nearest == null || id.minDepth < nearest.minDepth || ( id.minDepth == nearest.minDepth && id.inDegree < nearest.inDegree ) ) { nearest = id; } } nearest.inDegree = 0; roots.add( nearest ); while ( !roots.isEmpty() ) { ConflictId root = roots.remove(); sorted.add( root.key ); for ( ConflictId child : root.children ) { child.inDegree--; if ( child.inDegree == 0 ) { roots.add( child ); } } } } context.put( TransformationContextKeys.SORTED_CONFLICT_IDS, sorted ); context.put( TransformationContextKeys.CYCLIC_CONFLICT_IDS, Boolean.valueOf( cycle ) ); } static final class ConflictId { final Object key; Collection children = Collections.emptySet(); int inDegree; int minDepth; public ConflictId( Object key, int depth ) { this.key = key; this.minDepth = depth; } public void add( ConflictId child ) { if ( children.isEmpty() ) { children = new HashSet(); } if ( children.add( child ) ) { child.inDegree++; } } public void pullup( int depth ) { if ( depth < minDepth ) { minDepth = depth; depth++; for ( ConflictId child : children ) { child.pullup( depth ); } } } @Override public boolean equals( Object obj ) { if ( this == obj ) { return true; } else if ( !( obj instanceof ConflictId ) ) { return false; } ConflictId that = (ConflictId) obj; return this.key.equals( that.key ); } @Override public int hashCode() { return key.hashCode(); } @Override public String toString() { return key + " @ " + minDepth + " <" + inDegree; } } static final class RootQueue { private int nextOut; private int nextIn; private ConflictId[] ids; RootQueue( int capacity ) { ids = new ConflictId[capacity + 16]; } boolean isEmpty() { return nextOut >= nextIn; } void add( ConflictId id ) { if ( nextOut >= nextIn && nextOut > 0 ) { nextIn -= nextOut; nextOut = 0; } if ( nextIn >= ids.length ) { ConflictId[] tmp = new ConflictId[ids.length + ids.length / 2 + 16]; System.arraycopy( ids, nextOut, tmp, 0, nextIn - nextOut ); ids = tmp; nextIn -= nextOut; nextOut = 0; } int i; for ( i = nextIn - 1; i >= nextOut && id.minDepth < ids[i].minDepth; i-- ) { ids[i + 1] = ids[i]; } ids[i + 1] = id; nextIn++; } ConflictId remove() { return ids[nextOut++]; } } } ConflictMarker.java000066400000000000000000000207711167050556700337570ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/graph/transformerpackage org.sonatype.aether.util.graph.transformer; /******************************************************************************* * 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.HashMap; import java.util.HashSet; import java.util.IdentityHashMap; import java.util.Map; import java.util.Set; import org.sonatype.aether.RepositoryException; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.collection.DependencyGraphTransformationContext; import org.sonatype.aether.collection.DependencyGraphTransformer; import org.sonatype.aether.graph.Dependency; import org.sonatype.aether.graph.DependencyNode; /** * A dependency graph transformer that identifies conflicting dependencies. When this transformer has executed, the * transformation context holds a {@code Map} where dependency nodes that belong to the same * conflict group will have an equal conflict identifier. This map is stored using the key * {@link TransformationContextKeys#CONFLICT_IDS}. * * @author Benjamin Bentmann */ public class ConflictMarker implements DependencyGraphTransformer { private final Object SEEN = Boolean.TRUE; /** * After the execution of this method, every DependencyNode with an attached dependency is member of one conflict * group. * * @see DependencyGraphTransformer#transformGraph(DependencyNode, DependencyGraphTransformationContext) */ public DependencyNode transformGraph( DependencyNode node, DependencyGraphTransformationContext context ) throws RepositoryException { Map nodes = new IdentityHashMap( 1024 ); Map groups = new HashMap( 1024 ); analyze( node, nodes, groups ); Map conflictIds = mark( nodes.keySet(), groups ); context.put( TransformationContextKeys.CONFLICT_IDS, conflictIds ); return node; } private void analyze( DependencyNode node, Map nodes, Map groups ) { if ( nodes.put( node, SEEN ) != null ) { return; } Set keys = getKeys( node ); if ( !keys.isEmpty() ) { ConflictGroup group = null; boolean fixMappings = false; for ( Object key : keys ) { ConflictGroup g = groups.get( key ); if ( group != g ) { if ( group == null ) { Set newKeys = merge( g.keys, keys ); if ( newKeys == g.keys ) { group = g; break; } else { group = new ConflictGroup( newKeys ); fixMappings = true; } } else if ( g == null ) { fixMappings = true; } else { Set newKeys = merge( g.keys, group.keys ); if ( newKeys == g.keys ) { group = g; fixMappings = false; break; } else if ( newKeys != group.keys ) { group = new ConflictGroup( newKeys ); fixMappings = true; } } } } if ( group == null ) { group = new ConflictGroup( keys ); fixMappings = true; } if ( fixMappings ) { for ( Object key : group.keys ) { groups.put( key, group ); } } } for ( DependencyNode child : node.getChildren() ) { analyze( child, nodes, groups ); } } private Set merge( Set keys1, Set keys2 ) { int size1 = keys1.size(); int size2 = keys2.size(); if ( size1 < size2 ) { if ( keys2.containsAll( keys1 ) ) { return keys2; } } else { if ( keys1.containsAll( keys2 ) ) { return keys1; } } Set keys = new HashSet(); keys.addAll( keys1 ); keys.addAll( keys2 ); return keys; } private Set getKeys( DependencyNode node ) { Set keys; Dependency dependency = node.getDependency(); if ( dependency == null ) { keys = Collections.emptySet(); } else { Object key = toKey( dependency.getArtifact() ); if ( node.getRelocations().isEmpty() && node.getAliases().isEmpty() ) { keys = Collections.singleton( key ); } else { keys = new HashSet(); keys.add( key ); for ( Artifact relocation : node.getRelocations() ) { key = toKey( relocation ); keys.add( key ); } for ( Artifact alias : node.getAliases() ) { key = toKey( alias ); keys.add( key ); } } } return keys; } private Map mark( Collection nodes, Map groups ) { Map conflictIds = new IdentityHashMap( nodes.size() + 1 ); for ( DependencyNode node : nodes ) { Dependency dependency = node.getDependency(); if ( dependency != null ) { Object key = toKey( dependency.getArtifact() ); conflictIds.put( node, groups.get( key ).keys ); } } return conflictIds; } private static Object toKey( Artifact artifact ) { return new Key( artifact ); } static class ConflictGroup { final Set keys; public ConflictGroup( Set keys ) { this.keys = keys; } @Override public String toString() { return String.valueOf( keys ); } } static class Key { private final Artifact artifact; public Key( Artifact artifact ) { this.artifact = artifact; } @Override public boolean equals( Object obj ) { if ( obj == this ) { return true; } else if ( !( obj instanceof Key ) ) { return false; } Key that = (Key) obj; return artifact.getArtifactId().equals( that.artifact.getArtifactId() ) && artifact.getGroupId().equals( that.artifact.getGroupId() ) && artifact.getExtension().equals( that.artifact.getExtension() ) && artifact.getClassifier().equals( that.artifact.getClassifier() ); } @Override public int hashCode() { int hash = 17; hash = hash * 31 + artifact.getArtifactId().hashCode(); hash = hash * 31 + artifact.getGroupId().hashCode(); hash = hash * 31 + artifact.getClassifier().hashCode(); hash = hash * 31 + artifact.getExtension().hashCode(); return hash; } @Override public String toString() { return artifact.getGroupId() + ':' + artifact.getArtifactId() + ':' + artifact.getClassifier() + ':' + artifact.getExtension(); } } } JavaDependencyContextRefiner.java000066400000000000000000000050561167050556700366130ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/graph/transformerpackage org.sonatype.aether.util.graph.transformer; /******************************************************************************* * 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.collection.DependencyGraphTransformationContext; import org.sonatype.aether.collection.DependencyGraphTransformer; import org.sonatype.aether.graph.Dependency; import org.sonatype.aether.graph.DependencyNode; import org.sonatype.aether.util.artifact.JavaScopes; /** * A dependency graph transformer that refines the request context for nodes that belong to the "project" context by * appending the classpath type to which the node belongs. For instance, a compile-time project dependency will be * assigned the request context "project/compile". * * @author Benjamin Bentmann * @see DependencyNode#getRequestContext() */ public class JavaDependencyContextRefiner implements DependencyGraphTransformer { public DependencyNode transformGraph( DependencyNode node, DependencyGraphTransformationContext context ) throws RepositoryException { String ctx = node.getRequestContext(); if ( "project".equals( ctx ) ) { String scope = getClasspathScope( node ); if ( scope != null ) { ctx += '/' + scope; node.setRequestContext( ctx ); } } for ( DependencyNode child : node.getChildren() ) { transformGraph( child, context ); } return node; } private String getClasspathScope( DependencyNode node ) { Dependency dependency = node.getDependency(); if ( dependency == null ) { return null; } String scope = dependency.getScope(); if ( JavaScopes.COMPILE.equals( scope ) || JavaScopes.SYSTEM.equals( scope ) || JavaScopes.PROVIDED.equals( scope ) ) { return JavaScopes.COMPILE; } else if ( JavaScopes.RUNTIME.equals( scope ) ) { return JavaScopes.RUNTIME; } else if ( JavaScopes.TEST.equals( scope ) ) { return JavaScopes.TEST; } return null; } } JavaEffectiveScopeCalculator.java000066400000000000000000000224201167050556700365530ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/graph/transformerpackage org.sonatype.aether.util.graph.transformer; /******************************************************************************* * 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.HashMap; import java.util.HashSet; import java.util.IdentityHashMap; import java.util.List; import java.util.Map; import java.util.Set; import org.sonatype.aether.RepositoryException; import org.sonatype.aether.collection.DependencyGraphTransformationContext; import org.sonatype.aether.collection.DependencyGraphTransformer; import org.sonatype.aether.graph.DependencyNode; import org.sonatype.aether.util.artifact.JavaScopes; /** * A dependency graph transformer that handles scope inheritance and conflict resolution among conflicting scopes as * seen in Maven 2.x. For a given set of conflicting nodes, a single scope will be chosen and assigned to all of the * nodes. This transformer will query the keys {@link TransformationContextKeys#CONFLICT_IDS} and * {@link TransformationContextKeys#SORTED_CONFLICT_IDS} for existing information about conflict ids. In absence of this * information, it will automatically invoke the {@link ConflictIdSorter} to calculate it. * * @author Benjamin Bentmann */ public class JavaEffectiveScopeCalculator implements DependencyGraphTransformer { public DependencyNode transformGraph( DependencyNode node, DependencyGraphTransformationContext context ) throws RepositoryException { List sortedConflictIds = (List) context.get( TransformationContextKeys.SORTED_CONFLICT_IDS ); if ( sortedConflictIds == null ) { ConflictIdSorter sorter = new ConflictIdSorter(); sorter.transformGraph( node, context ); sortedConflictIds = (List) context.get( TransformationContextKeys.SORTED_CONFLICT_IDS ); } Map conflictIds = (Map) context.get( TransformationContextKeys.CONFLICT_IDS ); if ( conflictIds == null ) { throw new RepositoryException( "conflict groups have not been identified" ); } Boolean cyclicConflictIds = (Boolean) context.get( TransformationContextKeys.CYCLIC_CONFLICT_IDS ); Map groups = new HashMap( 256 ); buildConflictGroups( groups, node, null, conflictIds ); String rootScope = ""; if ( node.getDependency() != null ) { Object key = conflictIds.get( node ); groups.get( key ).scope = rootScope = node.getDependency().getScope(); } for ( DependencyNode child : node.getChildren() ) { Object key = conflictIds.get( child ); groups.get( key ).scope = getInheritedScope( rootScope, child.getDependency().getScope() ); } Set prequisites = null; if ( Boolean.TRUE.equals( cyclicConflictIds ) ) { prequisites = new HashSet( sortedConflictIds.size() * 2 ); } for ( Object key : sortedConflictIds ) { if ( prequisites != null ) { prequisites.add( key ); } ConflictGroup group = groups.get( key ); resolve( group, conflictIds, prequisites ); } return node; } private void buildConflictGroups( Map groups, DependencyNode node, DependencyNode parent, Map conflictIds ) { Object key = conflictIds.get( node ); ConflictGroup group = groups.get( key ); if ( group == null ) { group = new ConflictGroup( key ); groups.put( key, group ); } List parents = group.parents.get( node ); boolean visited = parents != null; if ( parents == null ) { parents = new ArrayList( 4 ); group.parents.put( node, parents ); } if ( parent != null ) { parents.add( parent ); } if ( !visited ) { parent = ( node.getDependency() != null ) ? node : null; for ( DependencyNode child : node.getChildren() ) { buildConflictGroups( groups, child, parent, conflictIds ); } } } private void resolve( ConflictGroup group, Map conflictIds, Set prerequisites ) { if ( group.scope == null ) { Set inheritedScopes = getInheritedScopes( group, conflictIds, prerequisites ); group.scope = chooseEffectiveScope( inheritedScopes ); } for ( DependencyNode node : group.parents.keySet() ) { if ( node.getPremanagedScope() == null ) { String scope = node.getDependency().getScope(); if ( !group.scope.equals( scope ) && !JavaScopes.SYSTEM.equals( scope ) ) { node.setScope( group.scope ); } } } } private Set getInheritedScopes( ConflictGroup group, Map conflictIds, Set prerequisites ) { Set inheritedScopes = new HashSet(); for ( Map.Entry> entry : group.parents.entrySet() ) { String childScope = entry.getKey().getDependency().getScope(); if ( entry.getValue().isEmpty() ) { inheritedScopes.add( childScope ); } else { for ( DependencyNode parent : entry.getValue() ) { if ( prerequisites != null && !prerequisites.contains( conflictIds.get( parent ) ) ) { /* * There's a cycle and the parent node belongs to a later group, i.e. its scope is not yet * calculated so ignore it. */ continue; } String parentScope = parent.getDependency().getScope(); String inheritedScope = getInheritedScope( parentScope, childScope ); inheritedScopes.add( inheritedScope ); } } } return inheritedScopes; } private String getInheritedScope( String parentScope, String childScope ) { String inheritedScope; if ( JavaScopes.SYSTEM.equals( childScope ) || JavaScopes.TEST.equals( childScope ) ) { inheritedScope = childScope; } else if ( parentScope == null || parentScope.length() <= 0 || JavaScopes.COMPILE.equals( parentScope ) ) { inheritedScope = childScope; } else if ( JavaScopes.TEST.equals( parentScope ) || JavaScopes.RUNTIME.equals( parentScope ) ) { inheritedScope = parentScope; } else if ( JavaScopes.SYSTEM.equals( parentScope ) || JavaScopes.PROVIDED.equals( parentScope ) ) { inheritedScope = JavaScopes.PROVIDED; } else { inheritedScope = JavaScopes.RUNTIME; } return inheritedScope; } private String chooseEffectiveScope( Set scopes ) { if ( scopes.size() > 1 ) { scopes.remove( JavaScopes.SYSTEM ); } String effectiveScope = ""; if ( scopes.size() == 1 ) { effectiveScope = scopes.iterator().next(); } else if ( scopes.contains( JavaScopes.COMPILE ) ) { effectiveScope = JavaScopes.COMPILE; } else if ( scopes.contains( JavaScopes.RUNTIME ) ) { effectiveScope = JavaScopes.RUNTIME; } else if ( scopes.contains( JavaScopes.PROVIDED ) ) { effectiveScope = JavaScopes.PROVIDED; } else if ( scopes.contains( JavaScopes.TEST ) ) { effectiveScope = JavaScopes.TEST; } return effectiveScope; } static final class ConflictGroup { final Object key; final Map> parents; String scope; public ConflictGroup( Object key ) { this.key = key; this.parents = new IdentityHashMap>(); } @Override public boolean equals( Object obj ) { if ( this == obj ) { return true; } else if ( !( obj instanceof ConflictGroup ) ) { return false; } ConflictGroup that = (ConflictGroup) obj; return this.key.equals( that.key ); } @Override public int hashCode() { return key.hashCode(); } @Override public String toString() { return String.valueOf( key ); } } } NearestVersionConflictResolver.java000066400000000000000000000236741167050556700372340ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/graph/transformerpackage org.sonatype.aether.util.graph.transformer; /******************************************************************************* * 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.HashSet; import java.util.IdentityHashMap; import java.util.Iterator; import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import org.sonatype.aether.RepositoryException; import org.sonatype.aether.collection.DependencyGraphTransformationContext; import org.sonatype.aether.collection.DependencyGraphTransformer; import org.sonatype.aether.collection.UnsolvableVersionConflictException; import org.sonatype.aether.graph.DependencyFilter; import org.sonatype.aether.graph.DependencyNode; import org.sonatype.aether.util.graph.PathRecordingDependencyVisitor; import org.sonatype.aether.version.Version; import org.sonatype.aether.version.VersionConstraint; /** * A dependency graph transformer that resolves version conflicts using the nearest-wins strategy. For a given set of * conflicting nodes, one node will be chosen as the winner and the other nodes are removed from the dependency graph. * This transformer will query the keys {@link TransformationContextKeys#CONFLICT_IDS} and * {@link TransformationContextKeys#SORTED_CONFLICT_IDS} for existing information about conflict ids. In absence of this * information, it will automatically invoke the {@link ConflictIdSorter} to calculate it. * * @author Benjamin Bentmann */ public class NearestVersionConflictResolver implements DependencyGraphTransformer { public DependencyNode transformGraph( DependencyNode node, DependencyGraphTransformationContext context ) throws RepositoryException { List sortedConflictIds = (List) context.get( TransformationContextKeys.SORTED_CONFLICT_IDS ); if ( sortedConflictIds == null ) { ConflictIdSorter sorter = new ConflictIdSorter(); sorter.transformGraph( node, context ); sortedConflictIds = (List) context.get( TransformationContextKeys.SORTED_CONFLICT_IDS ); } Map conflictIds = (Map) context.get( TransformationContextKeys.CONFLICT_IDS ); if ( conflictIds == null ) { throw new RepositoryException( "conflict groups have not been identified" ); } Map depths = new IdentityHashMap( conflictIds.size() ); for ( Object key : sortedConflictIds ) { ConflictGroup group = new ConflictGroup( key ); depths.clear(); selectVersion( node, null, 0, depths, group, conflictIds, node ); pruneNonSelectedVersions( group, conflictIds ); } return node; } private void selectVersion( DependencyNode node, DependencyNode parent, int depth, Map depths, ConflictGroup group, Map conflictIds, DependencyNode root ) throws RepositoryException { Integer smallestDepth = depths.get( node ); if ( smallestDepth == null || smallestDepth.intValue() > depth ) { depths.put( node, Integer.valueOf( depth ) ); } else { return; } Object key = conflictIds.get( node ); if ( group.key.equals( key ) ) { Position pos = new Position( parent, depth ); if ( parent != null ) { group.positions.add( pos ); } VersionConstraint constraint = node.getVersionConstraint(); boolean backtrack = false; boolean hardConstraint = !constraint.getRanges().isEmpty(); if ( hardConstraint ) { if ( group.constraints.add( constraint ) ) { if ( group.version != null && !constraint.containsVersion( group.version ) ) { backtrack = true; } } } if ( isAcceptable( group, node.getVersion() ) ) { group.candidates.put( node, pos ); if ( backtrack ) { backtrack( group, conflictIds, root ); } else if ( group.version == null || isNearer( pos, node.getVersion(), group.position, group.version ) ) { group.version = node.getVersion(); group.position = pos; } } else { if ( backtrack ) { backtrack( group, conflictIds, root ); } return; } } depth++; for ( DependencyNode child : node.getChildren() ) { selectVersion( child, node, depth, depths, group, conflictIds, root ); } } private boolean isAcceptable( ConflictGroup group, Version version ) { for ( VersionConstraint constraint : group.constraints ) { if ( !constraint.containsVersion( version ) ) { return false; } } return true; } private void backtrack( ConflictGroup group, Map conflictIds, DependencyNode root ) throws UnsolvableVersionConflictException { group.version = null; for ( Iterator> it = group.candidates.entrySet().iterator(); it.hasNext(); ) { Map.Entry entry = it.next(); Version version = entry.getKey().getVersion(); Position pos = entry.getValue(); if ( !isAcceptable( group, version ) ) { it.remove(); } else if ( group.version == null || isNearer( pos, version, group.position, group.version ) ) { group.version = version; group.position = pos; } } if ( group.version == null ) { throw newFailure( group, conflictIds, root ); } } private UnsolvableVersionConflictException newFailure( final ConflictGroup group, final Map conflictIds, DependencyNode root ) { DependencyFilter filter = new DependencyFilter() { public boolean accept( DependencyNode node, List parents ) { return group.key.equals( conflictIds.get( node ) ); } }; PathRecordingDependencyVisitor visitor = new PathRecordingDependencyVisitor( filter ); root.accept( visitor ); return new UnsolvableVersionConflictException( visitor.getPaths(), group.key ); } private boolean isNearer( Position pos1, Version ver1, Position pos2, Version ver2 ) { if ( pos1.depth < pos2.depth ) { return true; } else if ( pos1.depth == pos2.depth && pos1.parent == pos2.parent && ver1.compareTo( ver2 ) > 0 ) { return true; } return false; } private void pruneNonSelectedVersions( ConflictGroup group, Map conflictIds ) { for ( Position pos : group.positions ) { for ( Iterator it = pos.parent.getChildren().iterator(); it.hasNext(); ) { DependencyNode child = it.next(); Object key = conflictIds.get( child ); if ( group.key.equals( key ) ) { if ( !group.pruned && group.position.depth == pos.depth && group.version.equals( child.getVersion() ) ) { group.pruned = true; } else { it.remove(); } } } } } static final class ConflictGroup { final Object key; final Collection constraints = new HashSet(); final Map candidates = new IdentityHashMap( 32 ); Version version; Position position; final Collection positions = new LinkedHashSet(); boolean pruned; public ConflictGroup( Object key ) { this.key = key; this.position = new Position( null, Integer.MAX_VALUE ); } @Override public String toString() { return key + " > " + version; } } static final class Position { final DependencyNode parent; final int depth; final int hash; public Position( DependencyNode parent, int depth ) { this.parent = parent; this.depth = depth; hash = 31 * System.identityHashCode( parent ) + depth; } @Override public boolean equals( Object obj ) { if ( this == obj ) { return true; } else if ( !( obj instanceof Position ) ) { return false; } Position that = (Position) obj; return this.parent == that.parent && this.depth == that.depth; } @Override public int hashCode() { return hash; } @Override public String toString() { return depth + " > " + parent; } } } NoopDependencyGraphTransformer.java000066400000000000000000000022741167050556700371710ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/graph/transformerpackage org.sonatype.aether.util.graph.transformer; /******************************************************************************* * 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.collection.DependencyGraphTransformationContext; import org.sonatype.aether.collection.DependencyGraphTransformer; import org.sonatype.aether.graph.DependencyNode; /** * A dependency graph transformer that does nothing. * * @author Benjamin Bentmann */ public class NoopDependencyGraphTransformer implements DependencyGraphTransformer { public static final DependencyGraphTransformer INSTANCE = new NoopDependencyGraphTransformer(); public DependencyNode transformGraph( DependencyNode node, DependencyGraphTransformationContext context ) throws RepositoryException { return node; } } TransformationContextKeys.java000066400000000000000000000035611167050556700362610ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/graph/transformerpackage org.sonatype.aether.util.graph.transformer; /******************************************************************************* * 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 collection of keys used by the dependency graph transformers when exchanging information via the graph * transformation context. * * @author Benjamin Bentmann * @see org.sonatype.aether.collection.DependencyGraphTransformationContext#get(Object) */ public final class TransformationContextKeys { /** * The key in the graph transformation context where a {@code Map} is stored which maps * dependency nodes to their conflict ids. All nodes that map to an equal conflict id belong to the same group of * conflicting dependencies. Note that the map keys use reference equality. * * @see ConflictMarker */ public static final Object CONFLICT_IDS = "conflictIds"; /** * The key in the graph transformation context where a {@code List} is stored that denotes a topological * sorting of the conflict ids. * * @see ConflictIdSorter */ public static final Object SORTED_CONFLICT_IDS = "sortedConflictIds"; /** * The key in the graph transformation context where a {@code Boolean} is stored that indicates whether the * dependencies between conflict ids form a cycle. * * @see ConflictIdSorter */ public static final Object CYCLIC_CONFLICT_IDS = "cyclicConflictIds"; private TransformationContextKeys() { // hide constructor } } aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/graph/traverser/000077500000000000000000000000001167050556700277345ustar00rootroot00000000000000FatArtifactTraverser.java000066400000000000000000000035461167050556700346160ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/graph/traverserpackage org.sonatype.aether.util.graph.traverser; /******************************************************************************* * 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.collection.DependencyCollectionContext; import org.sonatype.aether.collection.DependencyTraverser; import org.sonatype.aether.graph.Dependency; import org.sonatype.aether.util.artifact.ArtifactProperties; /** * A dependency traverser that excludes the dependencies of fat artifacts from the traversal. Fat artifacts are * artifacts that have the property {@link org.sonatype.aether.util.artifact.ArtifactProperties#INCLUDES_DEPENDENCIES} * set to {@code true}. * * @author Benjamin Bentmann * @see org.sonatype.aether.artifact.Artifact#getProperties() */ public class FatArtifactTraverser implements DependencyTraverser { public boolean traverseDependency( Dependency dependency ) { String prop = dependency.getArtifact().getProperty( ArtifactProperties.INCLUDES_DEPENDENCIES, "" ); return !Boolean.parseBoolean( prop ); } public DependencyTraverser deriveChildTraverser( DependencyCollectionContext context ) { return this; } @Override public boolean equals( Object obj ) { if ( this == obj ) { return true; } else if ( null == obj || !getClass().equals( obj.getClass() ) ) { return false; } return true; } @Override public int hashCode() { return getClass().hashCode(); } } StaticDependencyTraverser.java000066400000000000000000000036541167050556700356540ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/graph/traverserpackage org.sonatype.aether.util.graph.traverser; /******************************************************************************* * 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.collection.DependencyCollectionContext; import org.sonatype.aether.collection.DependencyTraverser; import org.sonatype.aether.graph.Dependency; /** * A dependency traverser which always or never traverses children. * * @author Benjamin Bentmann */ public class StaticDependencyTraverser implements DependencyTraverser { private final boolean traverse; /** * Creates a new traverser with the specified traversal behavior. * * @param traverse {@code true} to traverse all dependencies, {@code false} to never traverse. */ public StaticDependencyTraverser( boolean traverse ) { this.traverse = traverse; } public boolean traverseDependency( Dependency dependency ) { return traverse; } public DependencyTraverser deriveChildTraverser( DependencyCollectionContext context ) { return this; } @Override public boolean equals( Object obj ) { if ( this == obj ) { return true; } else if ( null == obj || !getClass().equals( obj.getClass() ) ) { return false; } StaticDependencyTraverser that = (StaticDependencyTraverser) obj; return traverse == that.traverse; } @Override public int hashCode() { int hash = getClass().hashCode(); hash = hash * 31 + ( traverse ? 1 : 0 ); return hash; } } aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/layout/000077500000000000000000000000001167050556700261335ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/layout/MavenDefaultLayout.java000066400000000000000000000046621167050556700325570ustar00rootroot00000000000000package org.sonatype.aether.util.layout; /******************************************************************************* * 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.net.URI; import java.net.URISyntaxException; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.metadata.Metadata; /** * The layout for a Maven remote repository of type "default". * * @author Benjamin Bentmann */ public class MavenDefaultLayout implements RepositoryLayout { private URI toUri( String path ) { try { return new URI( null, null, path, null ); } catch ( URISyntaxException e ) { throw new IllegalStateException( e ); } } public URI getPath( Artifact artifact ) { StringBuilder path = new StringBuilder( 128 ); path.append( artifact.getGroupId().replace( '.', '/' ) ).append( '/' ); path.append( artifact.getArtifactId() ).append( '/' ); path.append( artifact.getBaseVersion() ).append( '/' ); path.append( artifact.getArtifactId() ).append( '-' ).append( artifact.getVersion() ); if ( artifact.getClassifier().length() > 0 ) { path.append( '-' ).append( artifact.getClassifier() ); } if ( artifact.getExtension().length() > 0 ) { path.append( '.' ).append( artifact.getExtension() ); } return toUri( path.toString() ); } public URI getPath( Metadata metadata ) { StringBuilder path = new StringBuilder( 128 ); if ( metadata.getGroupId().length() > 0 ) { path.append( metadata.getGroupId().replace( '.', '/' ) ).append( '/' ); if ( metadata.getArtifactId().length() > 0 ) { path.append( metadata.getArtifactId() ).append( '/' ); if ( metadata.getVersion().length() > 0 ) { path.append( metadata.getVersion() ).append( '/' ); } } } path.append( metadata.getType() ); return toUri( path.toString() ); } } aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/layout/RepositoryLayout.java000066400000000000000000000030331167050556700323520ustar00rootroot00000000000000package org.sonatype.aether.util.layout; /******************************************************************************* * 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.net.URI; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.metadata.Metadata; /** * The layout for a remote repository whose artifacts/metadata can be addressed via URIs. * * @author Benjamin Bentmann */ public interface RepositoryLayout { /** * Gets the URI to the location within a remote repository where the specified artifact would be stored. The URI is * relative to the root directory of the repository. * * @param artifact The artifact to get the URI for, must not be {@code null}. * @return The relative URI to the artifact, never {@code null}. */ URI getPath( Artifact artifact ); /** * Gets the URI to the location within a remote repository where the specified metadata would be stored. The URI is * relative to the root directory of the repository. * * @param metadata The metadata to get the URI for, must not be {@code null}. * @return The relative URI to the metadata, never {@code null}. */ URI getPath( Metadata metadata ); } aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/listener/000077500000000000000000000000001167050556700264435ustar00rootroot00000000000000AbstractRepositoryListener.java000066400000000000000000000015521167050556700346030ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/listenerpackage org.sonatype.aether.util.listener; /******************************************************************************* * 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 * @deprecated As of version 1.8, use {@link org.sonatype.aether.AbstractRepositoryListener} instead. */ @Deprecated public abstract class AbstractRepositoryListener extends org.sonatype.aether.AbstractRepositoryListener { } AbstractTransferListener.java000066400000000000000000000015641167050556700342130ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/listenerpackage org.sonatype.aether.util.listener; /******************************************************************************* * 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 transfer listeners. The callback methods in this class do nothing. * * @author Benjamin Bentmann * @deprecated As of version 1.8, use {@link org.sonatype.aether.transfer.AbstractTransferListener} instead. */ @Deprecated public abstract class AbstractTransferListener extends org.sonatype.aether.transfer.AbstractTransferListener { } ChainedRepositoryListener.java000066400000000000000000000257711167050556700344040ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/listenerpackage org.sonatype.aether.util.listener; /******************************************************************************* * 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.Arrays; import java.util.Collection; import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; import org.sonatype.aether.AbstractRepositoryListener; import org.sonatype.aether.RepositoryEvent; import org.sonatype.aether.RepositoryListener; /** * A repository listener that delegates to zero or more other listeners (multicast). The list of target listeners is * thread-safe, i.e. target listeners can be added or removed by any thread at any time. * * @author Benjamin Bentmann */ public class ChainedRepositoryListener extends AbstractRepositoryListener { private final List listeners = new CopyOnWriteArrayList(); /** * Creates a new multicast listener that delegates to the specified listeners. In contrast to the constructor, this * factory method will avoid creating an actual chained listener if one of the specified readers is actually * {@code null}. * * @param listener1 The first listener, may be {@code null}. * @param listener2 The second listener, may be {@code null}. * @return The chained listener or {@code null} if no listener was supplied. */ public static RepositoryListener newInstance( RepositoryListener listener1, RepositoryListener listener2 ) { if ( listener1 == null ) { return listener2; } else if ( listener2 == null ) { return listener1; } return new ChainedRepositoryListener( listener1, listener2 ); } /** * Creates a new multicast listener that delegates to the specified listeners. * * @param listeners The listeners to delegate to, may be {@code null} or empty. */ public ChainedRepositoryListener( RepositoryListener... listeners ) { if ( listeners != null ) { add( Arrays.asList( listeners ) ); } } /** * Creates a new multicast listener that delegates to the specified listeners. * * @param listeners The listeners to delegate to, may be {@code null} or empty. */ public ChainedRepositoryListener( Collection listeners ) { add( listeners ); } /** * Adds the specified listeners to the end of the multicast chain. * * @param listeners The listeners to add, may be {@code null} or empty. */ public void add( Collection listeners ) { if ( listeners != null ) { for ( RepositoryListener listener : listeners ) { add( listener ); } } } /** * Adds the specified listener to the end of the multicast chain. * * @param listener The listener to add, may be {@code null}. */ public void add( RepositoryListener listener ) { if ( listener != null ) { listeners.add( listener ); } } /** * Removes the specified listener from the multicast chain. Trying to remove a non-existing listener has no effect. * * @param listener The listener to remove, may be {@code null}. */ public void remove( RepositoryListener listener ) { if ( listener != null ) { listeners.remove( listener ); } } protected void handleError( RepositoryEvent event, RepositoryListener listener, RuntimeException error ) { // default just swallows errors } @Override public void artifactDeployed( RepositoryEvent event ) { for ( RepositoryListener listener : listeners ) { try { listener.artifactDeployed( event ); } catch ( RuntimeException e ) { handleError( event, listener, e ); } } } @Override public void artifactDeploying( RepositoryEvent event ) { for ( RepositoryListener listener : listeners ) { try { listener.artifactDeploying( event ); } catch ( RuntimeException e ) { handleError( event, listener, e ); } } } @Override public void artifactDescriptorInvalid( RepositoryEvent event ) { for ( RepositoryListener listener : listeners ) { try { listener.artifactDescriptorInvalid( event ); } catch ( RuntimeException e ) { handleError( event, listener, e ); } } } @Override public void artifactDescriptorMissing( RepositoryEvent event ) { for ( RepositoryListener listener : listeners ) { try { listener.artifactDescriptorMissing( event ); } catch ( RuntimeException e ) { handleError( event, listener, e ); } } } @Override public void artifactDownloaded( RepositoryEvent event ) { for ( RepositoryListener listener : listeners ) { try { listener.artifactDownloaded( event ); } catch ( RuntimeException e ) { handleError( event, listener, e ); } } } @Override public void artifactDownloading( RepositoryEvent event ) { for ( RepositoryListener listener : listeners ) { try { listener.artifactDownloading( event ); } catch ( RuntimeException e ) { handleError( event, listener, e ); } } } @Override public void artifactInstalled( RepositoryEvent event ) { for ( RepositoryListener listener : listeners ) { try { listener.artifactInstalled( event ); } catch ( RuntimeException e ) { handleError( event, listener, e ); } } } @Override public void artifactInstalling( RepositoryEvent event ) { for ( RepositoryListener listener : listeners ) { try { listener.artifactInstalling( event ); } catch ( RuntimeException e ) { handleError( event, listener, e ); } } } @Override public void artifactResolved( RepositoryEvent event ) { for ( RepositoryListener listener : listeners ) { try { listener.artifactResolved( event ); } catch ( RuntimeException e ) { handleError( event, listener, e ); } } } @Override public void artifactResolving( RepositoryEvent event ) { for ( RepositoryListener listener : listeners ) { try { listener.artifactResolving( event ); } catch ( RuntimeException e ) { handleError( event, listener, e ); } } } @Override public void metadataDeployed( RepositoryEvent event ) { for ( RepositoryListener listener : listeners ) { try { listener.metadataDeployed( event ); } catch ( RuntimeException e ) { handleError( event, listener, e ); } } } @Override public void metadataDeploying( RepositoryEvent event ) { for ( RepositoryListener listener : listeners ) { try { listener.metadataDeploying( event ); } catch ( RuntimeException e ) { handleError( event, listener, e ); } } } @Override public void metadataDownloaded( RepositoryEvent event ) { for ( RepositoryListener listener : listeners ) { try { listener.metadataDownloaded( event ); } catch ( RuntimeException e ) { handleError( event, listener, e ); } } } @Override public void metadataDownloading( RepositoryEvent event ) { for ( RepositoryListener listener : listeners ) { try { listener.metadataDownloading( event ); } catch ( RuntimeException e ) { handleError( event, listener, e ); } } } @Override public void metadataInstalled( RepositoryEvent event ) { for ( RepositoryListener listener : listeners ) { try { listener.metadataInstalled( event ); } catch ( RuntimeException e ) { handleError( event, listener, e ); } } } @Override public void metadataInstalling( RepositoryEvent event ) { for ( RepositoryListener listener : listeners ) { try { listener.metadataInstalling( event ); } catch ( RuntimeException e ) { handleError( event, listener, e ); } } } @Override public void metadataInvalid( RepositoryEvent event ) { for ( RepositoryListener listener : listeners ) { try { listener.metadataInvalid( event ); } catch ( RuntimeException e ) { handleError( event, listener, e ); } } } @Override public void metadataResolved( RepositoryEvent event ) { for ( RepositoryListener listener : listeners ) { try { listener.metadataResolved( event ); } catch ( RuntimeException e ) { handleError( event, listener, e ); } } } @Override public void metadataResolving( RepositoryEvent event ) { for ( RepositoryListener listener : listeners ) { try { listener.metadataResolving( event ); } catch ( RuntimeException e ) { handleError( event, listener, e ); } } } } ChainedTransferListener.java000066400000000000000000000145151167050556700340030ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/listenerpackage org.sonatype.aether.util.listener; /******************************************************************************* * 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.Arrays; import java.util.Collection; import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; import org.sonatype.aether.transfer.AbstractTransferListener; import org.sonatype.aether.transfer.TransferCancelledException; import org.sonatype.aether.transfer.TransferEvent; import org.sonatype.aether.transfer.TransferListener; /** * A transfer listener that delegates to zero or more other listeners (multicast). The list of target listeners is * thread-safe, i.e. target listeners can be added or removed by any thread at any time. * * @author Benjamin Bentmann */ public class ChainedTransferListener extends AbstractTransferListener { private final List listeners = new CopyOnWriteArrayList(); /** * Creates a new multicast listener that delegates to the specified listeners. In contrast to the constructor, this * factory method will avoid creating an actual chained listener if one of the specified readers is actually * {@code null}. * * @param listener1 The first listener, may be {@code null}. * @param listener2 The second listener, may be {@code null}. * @return The chained listener or {@code null} if no listener was supplied. */ public static TransferListener newInstance( TransferListener listener1, TransferListener listener2 ) { if ( listener1 == null ) { return listener2; } else if ( listener2 == null ) { return listener1; } return new ChainedTransferListener( listener1, listener2 ); } /** * Creates a new multicast listener that delegates to the specified listeners. * * @param listeners The listeners to delegate to, may be {@code null} or empty. */ public ChainedTransferListener( TransferListener... listeners ) { if ( listeners != null ) { add( Arrays.asList( listeners ) ); } } /** * Creates a new multicast listener that delegates to the specified listeners. * * @param listeners The listeners to delegate to, may be {@code null} or empty. */ public ChainedTransferListener( Collection listeners ) { add( listeners ); } /** * Adds the specified listeners to the end of the multicast chain. * * @param listeners The listeners to add, may be {@code null} or empty. */ public void add( Collection listeners ) { if ( listeners != null ) { for ( TransferListener listener : listeners ) { add( listener ); } } } /** * Adds the specified listener to the end of the multicast chain. * * @param listener The listener to add, may be {@code null}. */ public void add( TransferListener listener ) { if ( listener != null ) { listeners.add( listener ); } } /** * Removes the specified listener from the multicast chain. Trying to remove a non-existing listener has no effect. * * @param listener The listener to remove, may be {@code null}. */ public void remove( TransferListener listener ) { if ( listener != null ) { listeners.remove( listener ); } } protected void handleError( TransferEvent event, TransferListener listener, RuntimeException error ) { // default just swallows errors } @Override public void transferInitiated( TransferEvent event ) throws TransferCancelledException { for ( TransferListener listener : listeners ) { try { listener.transferInitiated( event ); } catch ( RuntimeException e ) { handleError( event, listener, e ); } } } @Override public void transferStarted( TransferEvent event ) throws TransferCancelledException { for ( TransferListener listener : listeners ) { try { listener.transferStarted( event ); } catch ( RuntimeException e ) { handleError( event, listener, e ); } } } @Override public void transferProgressed( TransferEvent event ) throws TransferCancelledException { for ( TransferListener listener : listeners ) { try { listener.transferProgressed( event ); } catch ( RuntimeException e ) { handleError( event, listener, e ); } } } @Override public void transferCorrupted( TransferEvent event ) throws TransferCancelledException { for ( TransferListener listener : listeners ) { try { listener.transferCorrupted( event ); } catch ( RuntimeException e ) { handleError( event, listener, e ); } } } @Override public void transferSucceeded( TransferEvent event ) { for ( TransferListener listener : listeners ) { try { listener.transferSucceeded( event ); } catch ( RuntimeException e ) { handleError( event, listener, e ); } } } @Override public void transferFailed( TransferEvent event ) { for ( TransferListener listener : listeners ) { try { listener.transferFailed( event ); } catch ( RuntimeException e ) { handleError( event, listener, e ); } } } } DefaultRepositoryEvent.java000066400000000000000000000160141167050556700337170ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/listenerpackage org.sonatype.aether.util.listener; /******************************************************************************* * 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.Collections; import java.util.List; import org.sonatype.aether.RepositoryEvent; 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.ArtifactRepository; /** * A simple repository event. * * @author Benjamin Bentmann */ public class DefaultRepositoryEvent implements RepositoryEvent { private EventType type; private RepositorySystemSession session; private Artifact artifact; private Metadata metadata; private ArtifactRepository repository; private File file; private List exceptions = Collections.emptyList(); private RequestTrace trace; /** * Creates a new event with the specified properties. * * @param type The type of the event, must not be {@code null}. * @param session The repository system session, must not be {@code null}. * @deprecated As of version 1.11, use * {@link #DefaultRepositoryEvent(org.sonatype.aether.RepositoryEvent.EventType, RepositorySystemSession, RequestTrace)} * instead. */ @Deprecated public DefaultRepositoryEvent( EventType type, RepositorySystemSession session ) { this( type, session, null ); } /** * Creates a new event with the specified properties. * * @param type The type of the event, must not be {@code null}. * @param session The repository system session, must not be {@code null}. * @param trace The trace information, may be {@code null}. */ public DefaultRepositoryEvent( EventType type, RepositorySystemSession session, RequestTrace trace ) { setType( type ); setSession( session ); setTrace( trace ); } public EventType getType() { return type; } /** * Sets the type of the event. * * @param type The type of the event, must not be {@code null}. * @return This event for chaining, never {@code null}. */ private DefaultRepositoryEvent setType( EventType type ) { if ( type == null ) { throw new IllegalArgumentException( "event type not specified" ); } this.type = type; return this; } public RepositorySystemSession getSession() { return session; } private DefaultRepositoryEvent setSession( RepositorySystemSession session ) { if ( session == null ) { throw new IllegalArgumentException( "session not specified" ); } this.session = session; return this; } public Artifact getArtifact() { return artifact; } /** * Sets the artifact involved in the event. * * @param artifact The involved artifact, may be {@code null}. * @return This event for chaining, never {@code null}. */ public DefaultRepositoryEvent setArtifact( Artifact artifact ) { this.artifact = artifact; return this; } public Metadata getMetadata() { return metadata; } /** * Sets the metadata involved in the event. * * @param metadata The involved metadata, may be {@code null}. * @return This event for chaining, never {@code null}. */ public DefaultRepositoryEvent setMetadata( Metadata metadata ) { this.metadata = metadata; return this; } public ArtifactRepository getRepository() { return repository; } /** * Sets the repository involved in the event. * * @param repository The involved repository, may be {@code null}. * @return This event for chaining, never {@code null}. */ public DefaultRepositoryEvent setRepository( ArtifactRepository repository ) { this.repository = repository; return this; } public File getFile() { return file; } /** * Sets the file involved in the event. * * @param file The involved file, may be {@code null}. * @return This event for chaining, never {@code null}. */ public DefaultRepositoryEvent setFile( File file ) { this.file = file; return this; } public Exception getException() { return exceptions.isEmpty() ? null : exceptions.get( 0 ); } /** * Sets the exception causing the event. * * @param exception The exception causing the event, may be {@code null}. * @return This event for chaining, never {@code null}. */ public DefaultRepositoryEvent setException( Exception exception ) { if ( exception != null ) { this.exceptions = Collections.singletonList( exception ); } else { this.exceptions = Collections.emptyList(); } return this; } public List getExceptions() { return exceptions; } /** * Sets the exceptions causing the event. * * @param exceptions The exceptions causing the event, may be {@code null}. * @return This event for chaining, never {@code null}. */ public DefaultRepositoryEvent setExceptions( List exceptions ) { if ( exceptions != null ) { this.exceptions = exceptions; } else { this.exceptions = Collections.emptyList(); } return this; } public RequestTrace getTrace() { return trace; } /** * Sets the trace information about the request during which the event occurred. * * @param trace The trace information, may be {@code null}. * @return This event for chaining, never {@code null}. */ public DefaultRepositoryEvent setTrace( RequestTrace trace ) { this.trace = trace; return this; } @Override public String toString() { StringBuilder buffer = new StringBuilder( 256 ); buffer.append( getType() ); if ( getArtifact() != null ) { buffer.append( " " ).append( getArtifact() ); } if ( getMetadata() != null ) { buffer.append( " " ).append( getMetadata() ); } if ( getFile() != null ) { buffer.append( " (" ).append( getFile() ).append( ")" ); } if ( getRepository() != null ) { buffer.append( " @ " ).append( getRepository() ); } return buffer.toString(); } } aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/listener/DefaultTransferEvent.java000066400000000000000000000123561167050556700334100ustar00rootroot00000000000000package org.sonatype.aether.util.listener; /******************************************************************************* * 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.nio.ByteBuffer; import org.sonatype.aether.transfer.TransferEvent; import org.sonatype.aether.transfer.TransferResource; /** * A simple transfer event. * * @author Benjamin Bentmann */ public class DefaultTransferEvent implements TransferEvent { private EventType type = EventType.INITIATED; private RequestType requestType = RequestType.GET; private TransferResource resource; private ByteBuffer dataBuffer; private long transferredBytes; private Exception exception; /** * Creates a new and uninitialized transfer event. Use the various setters to populate the event. */ public DefaultTransferEvent() { } public EventType getType() { return type; } /** * Sets the type of the event. * * @param type The type of the event, must not be {@code null}. * @return This event for chaining, never {@code null}. */ public DefaultTransferEvent setType( EventType type ) { if ( type == null ) { throw new IllegalArgumentException( "event type not specified" ); } this.type = type; return this; } public RequestType getRequestType() { return requestType; } /** * Sets the type of the request/transfer. * * @param requestType The request/transfer type, must not be {@code null}. * @return This event for chaining, never {@code null}. */ public DefaultTransferEvent setRequestType( RequestType requestType ) { if ( requestType == null ) { throw new IllegalArgumentException( "request type not specified" ); } this.requestType = requestType; return this; } public TransferResource getResource() { return resource; } /** * Sets the resource being transferred. * * @param resource The resource being transferred, must not be {@code null}. * @return This event for chaining, never {@code null}. */ public DefaultTransferEvent setResource( TransferResource resource ) { if ( resource == null ) { throw new IllegalArgumentException( "transfer resource not specified" ); } this.resource = resource; return this; } public long getTransferredBytes() { return transferredBytes; } /** * Sets the total number of bytes that have been transferred so far during the download/upload. * * @param transferredBytes The total number of bytes that have been transferred so far during the download/upload, * must not be negative. * @return This event for chaining, never {@code null}. */ public DefaultTransferEvent setTransferredBytes( long transferredBytes ) { if ( transferredBytes < 0 ) { throw new IllegalArgumentException( "number of transferred bytes cannot be negative" ); } this.transferredBytes = transferredBytes; return this; } public int getDataLength() { return ( dataBuffer != null ) ? dataBuffer.remaining() : 0; } public ByteBuffer getDataBuffer() { return ( dataBuffer != null ) ? dataBuffer.asReadOnlyBuffer() : null; } /** * Wraps the given byte[]-array into a {@link ByteBuffer} as the content for this event. * * @param buffer The array to use, must not be {@code null}. * @param offset the starting point of valid bytes in the array. * @param length the number of valid bytes. * @return This event for chaining, never {@code null}. */ public DefaultTransferEvent setDataBuffer( byte[] buffer, int offset, int length ) { return setDataBuffer( ByteBuffer.wrap( buffer, offset, length ) ); } /** * Sets the byte buffer holding the transferred bytes since the last event. * * @param dataBuffer The byte buffer holding the transferred bytes since the last event, may be {@code null}. * @return This event for chaining, never {@code null}. */ public DefaultTransferEvent setDataBuffer( ByteBuffer dataBuffer ) { this.dataBuffer = dataBuffer; return this; } public Exception getException() { return exception; } /** * Sets the error that occurred during the transfer. * * @param exception The error that occurred during the transfer, may be {@code null} if none. * @return This event for chaining, never {@code null}. */ public DefaultTransferEvent setException( Exception exception ) { this.exception = exception; return this; } @Override public String toString() { return getRequestType() + " " + getType() + " " + getResource(); } } DefaultTransferResource.java000066400000000000000000000103141167050556700340270ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/listenerpackage org.sonatype.aether.util.listener; /******************************************************************************* * 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 org.sonatype.aether.RequestTrace; import org.sonatype.aether.transfer.TransferResource; /** * A simple transfer resource. * * @author Benjamin Bentmann */ public class DefaultTransferResource implements TransferResource { private final String repositoryUrl; private final String resourceName; private final File file; private final long startTime; private final RequestTrace trace; private long contentLength = -1; /** * Creates a new transfer resource with the specified properties. * * @param repositoryUrl The base URL of the repository, may be {@code null} or empty if unknown. If not empty, a * trailing slash will automatically be added if missing. * @param resourceName The relative path to the resource within the repository, may be {@code null}. A leading slash * (if any) will be automatically removed. * @param file The source/target file involved in the transfer, may be {@code null}. * @deprecated As of version 1.11, use {@link #DefaultTransferResource(String, String, File, RequestTrace)} instead. */ @Deprecated public DefaultTransferResource( String repositoryUrl, String resourceName, File file ) { this( repositoryUrl, resourceName, file, null ); } /** * Creates a new transfer resource with the specified properties. * * @param repositoryUrl The base URL of the repository, may be {@code null} or empty if unknown. If not empty, a * trailing slash will automatically be added if missing. * @param resourceName The relative path to the resource within the repository, may be {@code null}. A leading slash * (if any) will be automatically removed. * @param file The source/target file involved in the transfer, may be {@code null}. * @param trace The trace information, may be {@code null}. */ public DefaultTransferResource( String repositoryUrl, String resourceName, File file, RequestTrace trace ) { if ( repositoryUrl == null || repositoryUrl.length() <= 0 ) { this.repositoryUrl = ""; } else if ( repositoryUrl.endsWith( "/" ) ) { this.repositoryUrl = repositoryUrl; } else { this.repositoryUrl = repositoryUrl + '/'; } if ( resourceName == null || resourceName.length() <= 0 ) { this.resourceName = ""; } else if ( resourceName.startsWith( "/" ) ) { this.resourceName = resourceName.substring( 1 ); } else { this.resourceName = resourceName; } this.file = file; this.trace = trace; startTime = System.currentTimeMillis(); } public String getRepositoryUrl() { return repositoryUrl; } public String getResourceName() { return resourceName; } public File getFile() { return file; } public long getContentLength() { return contentLength; } /** * Sets the size of the resource in bytes. * * @param contentLength The size of the resource in bytes or a negative value if unknown. * @return This resource for chaining, never {@code null}. */ public DefaultTransferResource setContentLength( long contentLength ) { this.contentLength = contentLength; return this; } public long getTransferStartTime() { return startTime; } public RequestTrace getTrace() { return trace; } @Override public String toString() { return getRepositoryUrl() + getResourceName() + " <> " + getFile(); } } aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/metadata/000077500000000000000000000000001167050556700263765ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/metadata/DefaultMetadata.java000066400000000000000000000153721167050556700322760ustar00rootroot00000000000000package org.sonatype.aether.util.metadata; /******************************************************************************* * 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 org.sonatype.aether.metadata.Metadata; /** * A basic metadata instance. 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 DefaultMetadata implements Metadata { private final String groupId; private final String artifactId; private final String version; private final String type; private final Nature nature; private final File file; /** * Creates a new metadata for the repository root with the specific type and nature. * * @param type The type of the metadata, e.g. "maven-metadata.xml", may be {@code null}. * @param nature The nature of the metadata, must not be {@code null}. */ public DefaultMetadata( String type, Nature nature ) { groupId = artifactId = version = ""; this.type = ( type != null ) ? type : ""; if ( nature == null ) { throw new IllegalArgumentException( "metadata nature was not specified" ); } this.nature = nature; this.file = null; } /** * Creates a new metadata for the groupId level with the specific type and nature. * * @param groupId The group identifier to which this metadata applies, may be {@code null}. * @param type The type of the metadata, e.g. "maven-metadata.xml", may be {@code null}. * @param nature The nature of the metadata, must not be {@code null}. */ public DefaultMetadata( String groupId, String type, Nature nature ) { this.groupId = ( groupId != null ) ? groupId : ""; artifactId = version = ""; this.type = ( type != null ) ? type : ""; if ( nature == null ) { throw new IllegalArgumentException( "metadata nature was not specified" ); } this.nature = nature; this.file = null; } /** * Creates a new metadata for the groupId:artifactId level with the specific type and nature. * * @param groupId The group identifier to which this metadata applies, may be {@code null}. * @param artifactId The artifact identifier to which this metadata applies, may be {@code null}. * @param type The type of the metadata, e.g. "maven-metadata.xml", may be {@code null}. * @param nature The nature of the metadata, must not be {@code null}. */ public DefaultMetadata( String groupId, String artifactId, String type, Nature nature ) { this.groupId = ( groupId != null ) ? groupId : ""; this.artifactId = ( artifactId != null ) ? artifactId : ""; version = ""; this.type = ( type != null ) ? type : ""; if ( nature == null ) { throw new IllegalArgumentException( "metadata nature was not specified" ); } this.nature = nature; this.file = null; } /** * Creates a new metadata for the groupId:artifactId:version level with the specific type and nature. * * @param groupId The group identifier to which this metadata applies, may be {@code null}. * @param artifactId The artifact identifier to which this metadata applies, may be {@code null}. * @param version The version to which this metadata applies, may be {@code null}. * @param type The type of the metadata, e.g. "maven-metadata.xml", may be {@code null}. * @param nature The nature of the metadata, must not be {@code null}. */ public DefaultMetadata( String groupId, String artifactId, String version, String type, Nature nature ) { this.groupId = ( groupId != null ) ? groupId : ""; this.artifactId = ( artifactId != null ) ? artifactId : ""; this.version = ( version != null ) ? version : ""; this.type = ( type != null ) ? type : ""; if ( nature == null ) { throw new IllegalArgumentException( "metadata nature was not specified" ); } this.nature = nature; this.file = null; } /** * Creates a new metadata for the groupId:artifactId:version level with the specific type and nature. * * @param groupId The group identifier to which this metadata applies, may be {@code null}. * @param artifactId The artifact identifier to which this metadata applies, may be {@code null}. * @param version The version to which this metadata applies, may be {@code null}. * @param type The type of the metadata, e.g. "maven-metadata.xml", may be {@code null}. * @param nature The nature of the metadata, must not be {@code null}. * @param file The resolved file of the metadata, may be {@code null}. */ public DefaultMetadata( String groupId, String artifactId, String version, String type, Nature nature, File file ) { this.groupId = ( groupId != null ) ? groupId : ""; this.artifactId = ( artifactId != null ) ? artifactId : ""; this.version = ( version != null ) ? version : ""; this.type = ( type != null ) ? type : ""; if ( nature == null ) { throw new IllegalArgumentException( "metadata nature was not specified" ); } this.nature = nature; this.file = file; } public String getGroupId() { return groupId; } public String getArtifactId() { return artifactId; } public String getVersion() { return version; } public String getType() { return type; } public Nature getNature() { return nature; } public File getFile() { return file; } public Metadata setFile( File file ) { return new DefaultMetadata( groupId, artifactId, version, type, nature, file ); } @Override public String toString() { StringBuilder buffer = new StringBuilder( 128 ); if ( getGroupId().length() > 0 ) { buffer.append( getGroupId() ); } if ( getArtifactId().length() > 0 ) { buffer.append( ':' ).append( getArtifactId() ); } if ( getVersion().length() > 0 ) { buffer.append( ':' ).append( getVersion() ); } buffer.append( '/' ).append( getType() ); return buffer.toString(); } } aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/repository/000077500000000000000000000000001167050556700270355ustar00rootroot00000000000000ChainedWorkspaceReader.java000066400000000000000000000106571167050556700341670ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/repositorypackage org.sonatype.aether.util.repository; /******************************************************************************* * 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.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.LinkedHashSet; import java.util.List; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.repository.WorkspaceReader; import org.sonatype.aether.repository.WorkspaceRepository; /** * A workspace reader that delegates to a chain of other readers, effectively aggregating their contents. * * @author Benjamin Bentmann */ public class ChainedWorkspaceReader implements WorkspaceReader { private List readers = new ArrayList(); private WorkspaceRepository repository; /** * Creates a new workspace reader by chaining the specified readers. * * @param readers The readers to chain, may be {@code null}. * @see #newInstance(WorkspaceReader, WorkspaceReader) */ public ChainedWorkspaceReader( WorkspaceReader... readers ) { if ( readers != null ) { Collections.addAll( this.readers, readers ); } StringBuilder buffer = new StringBuilder(); for ( WorkspaceReader reader : readers ) { if ( buffer.length() > 0 ) { buffer.append( '+' ); } buffer.append( reader.getRepository().getContentType() ); } repository = new WorkspaceRepository( buffer.toString(), new Key( this.readers ) ); } /** * Creates a new workspace reader by chaining the specified readers. In contrast to the constructor, this factory * method will avoid creating an actual chained reader if one of the specified readers is actually {@code null}. * * @param reader1 The first workspace reader, may be {@code null}. * @param reader2 The second workspace reader, may be {@code null}. * @return The chained reader or {@code null} if no workspace reader was supplied. */ public static WorkspaceReader newInstance( WorkspaceReader reader1, WorkspaceReader reader2 ) { if ( reader1 == null ) { return reader2; } else if ( reader2 == null ) { return reader1; } return new ChainedWorkspaceReader( reader1, reader2 ); } public File findArtifact( Artifact artifact ) { File file = null; for ( WorkspaceReader reader : readers ) { file = reader.findArtifact( artifact ); if ( file != null ) { break; } } return file; } public List findVersions( Artifact artifact ) { Collection versions = new LinkedHashSet(); for ( WorkspaceReader reader : readers ) { versions.addAll( reader.findVersions( artifact ) ); } return Collections.unmodifiableList( new ArrayList( versions ) ); } public WorkspaceRepository getRepository() { Key key = new Key( readers ); if ( !key.equals( repository.getKey() ) ) { repository = new WorkspaceRepository( repository.getContentType(), key ); } return repository; } private static class Key { private final List keys = new ArrayList(); public Key( List readers ) { for ( WorkspaceReader reader : readers ) { keys.add( reader.getRepository().getKey() ); } } @Override public boolean equals( Object obj ) { if ( this == obj ) { return true; } if ( obj == null || !getClass().equals( obj.getClass() ) ) { return false; } return keys.equals( ( (Key) obj ).keys ); } @Override public int hashCode() { return keys.hashCode(); } } } ConservativeAuthenticationSelector.java000066400000000000000000000034721167050556700367000ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/repositorypackage org.sonatype.aether.util.repository; /******************************************************************************* * 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.repository.Authentication; import org.sonatype.aether.repository.AuthenticationSelector; import org.sonatype.aether.repository.RemoteRepository; /** * An authentication selector that delegates to another selector but only if a repository has no authentication data * yet. If authentication has already been assigned to a repository, that is selected. * * @author Benjamin Bentmann */ public class ConservativeAuthenticationSelector implements AuthenticationSelector { private final AuthenticationSelector selector; /** * Creates a new selector that delegates to the specified selector. * * @param selector The selector to delegate to in case a repository has no authentication yet, must not be {@code * null}. */ public ConservativeAuthenticationSelector( AuthenticationSelector selector ) { if ( selector == null ) { throw new IllegalArgumentException( "no authentication selector specified" ); } this.selector = selector; } public Authentication getAuthentication( RemoteRepository repository ) { Authentication auth = repository.getAuthentication(); if ( auth != null ) { return auth; } return selector.getAuthentication( repository ); } } ConservativeProxySelector.java000066400000000000000000000032161167050556700350360ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/repositorypackage org.sonatype.aether.util.repository; /******************************************************************************* * 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.repository.Proxy; import org.sonatype.aether.repository.ProxySelector; import org.sonatype.aether.repository.RemoteRepository; /** * A proxy selector that delegates to another selector but only if a repository has no proxy yet. If a proxy has already * been assigned to a repository, that is selected. * * @author Benjamin Bentmann */ public class ConservativeProxySelector implements ProxySelector { private final ProxySelector selector; /** * Creates a new selector that delegates to the specified selector. * * @param selector The selector to delegate to in case a repository has no proxy yet, must not be {@code null}. */ public ConservativeProxySelector( ProxySelector selector ) { if ( selector == null ) { throw new IllegalArgumentException( "no proxy selector specified" ); } this.selector = selector; } public Proxy getProxy( RemoteRepository repository ) { Proxy proxy = repository.getProxy(); if ( proxy != null ) { return proxy; } return selector.getProxy( repository ); } } DefaultAuthenticationSelector.java000066400000000000000000000032061167050556700356070ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/repositorypackage org.sonatype.aether.util.repository; /******************************************************************************* * 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.HashMap; import java.util.Map; import org.sonatype.aether.repository.Authentication; import org.sonatype.aether.repository.AuthenticationSelector; import org.sonatype.aether.repository.RemoteRepository; /** * A simple authentication selector that selects authentication based on repository identifiers. * * @author Benjamin Bentmann */ public class DefaultAuthenticationSelector implements AuthenticationSelector { private final Map repos = new HashMap(); /** * Adds the specified authentication info for the given repository identifier. * * @param id The identifier of the repository to add the authentication for, must not be {@code null}. * @param auth The authentication to add, must not be {@code null}. * @return This selector for chaining, never {@code null}. */ public DefaultAuthenticationSelector add( String id, Authentication auth ) { repos.put( id, auth ); return this; } public Authentication getAuthentication( RemoteRepository repository ) { return repos.get( repository.getId() ); } } DefaultMirrorSelector.java000066400000000000000000000224561167050556700341120ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/repositorypackage org.sonatype.aether.util.repository; /******************************************************************************* * 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.repository.MirrorSelector; import org.sonatype.aether.repository.RemoteRepository; /** * A simple mirror selector that selects mirrors based on repository identifiers. * * @author Benjamin Bentmann */ public class DefaultMirrorSelector implements MirrorSelector { private static final String WILDCARD = "*"; private static final String EXTERNAL_WILDCARD = "external:*"; private final List mirrors = new ArrayList(); /** * Adds the specified mirror to this selector. * * @param id The identifier of the mirror, must not be {@code null}. * @param url The URL of the mirror, must not be {@code null}. * @param type The content type of the mirror, must not be {@code null}. * @param repositoryManager A flag whether the mirror is a repository manager or a simple server. * @param mirrorOfIds The identifier(s) of remote repositories to mirror, must not be {@code null}. Multiple * identifiers can be separated by comma and additionally the wildcards "*" and "external:*" can be used * to match all (external) repositories, prefixing a repo id with an exclamation mark allows to express * an exclusion. For example "external:*,!central". * @param mirrorOfTypes The content type(s) of remote repositories to mirror, may be {@code null} or empty to match * any content type. Similar to the repo id specification, multiple types can be comma-separated, the * wildcard "*" and the "!" negation syntax are supported. For example "*,!p2". * @return This selector for chaining, never {@code null}. */ public DefaultMirrorSelector add( String id, String url, String type, boolean repositoryManager, String mirrorOfIds, String mirrorOfTypes ) { mirrors.add( new MirrorDef( id, url, type, repositoryManager, mirrorOfIds, mirrorOfTypes ) ); return this; } public RemoteRepository getMirror( RemoteRepository repository ) { MirrorDef mirror = findMirror( repository ); if ( mirror == null ) { return null; } RemoteRepository repo = new RemoteRepository(); repo.setRepositoryManager( mirror.repositoryManager ); repo.setId( mirror.id ); repo.setUrl( mirror.url ); if ( mirror.type != null && mirror.type.length() > 0 ) { repo.setContentType( mirror.type ); } else { repo.setContentType( repository.getContentType() ); } repo.setPolicy( true, repository.getPolicy( true ) ); repo.setPolicy( false, repository.getPolicy( false ) ); repo.setMirroredRepositories( Collections.singletonList( repository ) ); return repo; } private MirrorDef findMirror( RemoteRepository repository ) { String repoId = repository.getId(); if ( repoId != null && !mirrors.isEmpty() ) { for ( MirrorDef mirror : mirrors ) { if ( repoId.equals( mirror.mirrorOfIds ) && matchesType( repository.getContentType(), mirror.mirrorOfTypes ) ) { return mirror; } } for ( MirrorDef mirror : mirrors ) { if ( matchPattern( repository, mirror.mirrorOfIds ) && matchesType( repository.getContentType(), mirror.mirrorOfTypes ) ) { return mirror; } } } return null; } /** * This method checks if the pattern matches the originalRepository. Valid patterns: * = everything external:* = * everything not on the localhost and not file based. repo,repo1 = repo or repo1 *,!repo1 = everything except repo1 * * @param repository to compare for a match. * @param pattern used for match. Currently only '*' is supported. * @return true if the repository is a match to this pattern. */ static boolean matchPattern( RemoteRepository repository, String pattern ) { boolean result = false; String originalId = repository.getId(); // simple checks first to short circuit processing below. if ( WILDCARD.equals( pattern ) || pattern.equals( originalId ) ) { result = true; } else { // process the list String[] repos = pattern.split( "," ); for ( String repo : repos ) { // see if this is a negative match if ( repo.length() > 1 && repo.startsWith( "!" ) ) { if ( repo.substring( 1 ).equals( originalId ) ) { // explicitly exclude. Set result and stop processing. result = false; break; } } // check for exact match else if ( repo.equals( originalId ) ) { result = true; break; } // check for external:* else if ( EXTERNAL_WILDCARD.equals( repo ) && isExternalRepo( repository ) ) { result = true; // don't stop processing in case a future segment explicitly excludes this repo } else if ( WILDCARD.equals( repo ) ) { result = true; // don't stop processing in case a future segment explicitly excludes this repo } } } return result; } /** * Checks the URL to see if this repository refers to an external repository. * * @param repository The repository to check, must not be {@code null}. * @return {@code true} if external, {@code false} otherwise. */ static boolean isExternalRepo( RemoteRepository repository ) { boolean local = "localhost".equals( repository.getHost() ) || "127.0.0.1".equals( repository.getHost() ) || "file".equalsIgnoreCase( repository.getProtocol() ); return !local; } /** * Checks whether the types configured for a mirror match with the type of the repository. * * @param repoType The type of the repository, may be {@code null}. * @param mirrorType The types supported by the mirror, may be {@code null}. * @return {@code true} if the types associated with the mirror match the type of the original repository, {@code * false} otherwise. */ static boolean matchesType( String repoType, String mirrorType ) { boolean result = false; // simple checks first to short circuit processing below. if ( mirrorType == null || mirrorType.length() <= 0 || WILDCARD.equals( mirrorType ) ) { result = true; } else if ( mirrorType.equals( repoType ) ) { result = true; } else { // process the list String[] layouts = mirrorType.split( "," ); for ( String layout : layouts ) { // see if this is a negative match if ( layout.length() > 1 && layout.startsWith( "!" ) ) { if ( layout.substring( 1 ).equals( repoType ) ) { // explicitly exclude. Set result and stop processing. result = false; break; } } // check for exact match else if ( layout.equals( repoType ) ) { result = true; break; } else if ( WILDCARD.equals( layout ) ) { result = true; // don't stop processing in case a future segment explicitly excludes this repo } } } return result; } static class MirrorDef { final String id; final String url; final String type; final boolean repositoryManager; final String mirrorOfIds; final String mirrorOfTypes; public MirrorDef( String id, String url, String type, boolean repositoryManager, String mirrorOfIds, String mirrorOfTypes ) { this.id = id; this.url = url; this.type = type; this.repositoryManager = repositoryManager; this.mirrorOfIds = mirrorOfIds; this.mirrorOfTypes = mirrorOfTypes; } } } DefaultProxySelector.java000066400000000000000000000072571167050556700337630ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/repositorypackage org.sonatype.aether.util.repository; /******************************************************************************* * 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.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.StringTokenizer; import org.sonatype.aether.repository.Proxy; import org.sonatype.aether.repository.ProxySelector; import org.sonatype.aether.repository.RemoteRepository; /** * A simple proxy selector that selects the first matching proxy from a list of configured proxies. * * @author Benjamin Bentmann */ public class DefaultProxySelector implements ProxySelector { private List proxies = new ArrayList(); /** * Adds the specified proxy definition to the selector. Proxy definitions are ordered, the first matching proxy for * a given repository will be used. * * @param proxy The proxy definition to add, must not be {@code null}. * @param nonProxyHosts The list of hosts to exclude from proxying, may be {@code null}. * @return This proxy selector for chaining, never {@code null}. */ public DefaultProxySelector add( Proxy proxy, String nonProxyHosts ) { proxies.add( new ProxyDef( proxy, nonProxyHosts ) ); return this; } public Proxy getProxy( RemoteRepository repository ) { Map candidates = new HashMap(); String host = repository.getHost(); for ( ProxyDef proxy : proxies ) { if ( !isNonProxyHosts( host, proxy.nonProxyHosts ) ) { String key = proxy.proxy.getType().toLowerCase( Locale.ENGLISH ); if ( !candidates.containsKey( key ) ) { candidates.put( key, proxy ); } } } String protocol = repository.getProtocol().toLowerCase( Locale.ENGLISH ); if ( "davs".equals( protocol ) ) { protocol = "https"; } else if ( "dav".equals( protocol ) ) { protocol = "http"; } else if ( protocol.startsWith( "dav:" ) ) { protocol = protocol.substring( "dav:".length() ); } ProxyDef proxy = candidates.get( protocol ); if ( proxy == null && "https".equals( protocol ) ) { proxy = candidates.get( "http" ); } return ( proxy != null ) ? proxy.proxy : null; } static boolean isNonProxyHosts( String host, String nonProxyHosts ) { if ( host != null && nonProxyHosts != null && nonProxyHosts.length() > 0 ) { for ( StringTokenizer tokenizer = new StringTokenizer( nonProxyHosts, "|" ); tokenizer.hasMoreTokens(); ) { String pattern = tokenizer.nextToken(); pattern = pattern.replace( ".", "\\." ).replace( "*", ".*" ); if ( host.matches( pattern ) ) { return true; } } } return false; } static class ProxyDef { final Proxy proxy; final String nonProxyHosts; public ProxyDef( Proxy proxy, String nonProxyHosts ) { this.proxy = proxy; this.nonProxyHosts = nonProxyHosts; } } } aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/version/000077500000000000000000000000001167050556700263035ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/version/GenericVersion.java000066400000000000000000000300451167050556700320720ustar00rootroot00000000000000package org.sonatype.aether.util.version; /******************************************************************************* * 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.math.BigInteger; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.TreeMap; import org.sonatype.aether.version.Version; /** * A generic version, that is a version that accepts any input string and tries to apply common sense sorting. See * {@link GenericVersionScheme} for details. */ final class GenericVersion implements Version { private final String version; private final Item[] items; private final int hash; /** * Creates a generic version from the specified string. * * @param version The version string, must not be {@code null}. */ public GenericVersion( String version ) { this.version = version; items = parse( version ); hash = Arrays.hashCode( items ); } private static Item[] parse( String version ) { List items = new ArrayList(); for ( Tokenizer tokenizer = new Tokenizer( version ); tokenizer.next(); ) { Item item = new Item( tokenizer ); items.add( item ); } trimPadding( items ); return items.toArray( new Item[items.size()] ); } private static void trimPadding( List items ) { Boolean number = null; int end = items.size() - 1; for ( int i = end; i > 0; i-- ) { Item item = items.get( i ); if ( !Boolean.valueOf( item.isNumber() ).equals( number ) ) { end = i; number = Boolean.valueOf( item.isNumber() ); } if ( end == i && ( i == items.size() - 1 || items.get( i - 1 ).isNumber() == item.isNumber() ) && item.compareTo( null ) == 0 ) { items.remove( i ); end--; } } } public int compareTo( Version obj ) { final Item[] these = items; final Item[] those = ( (GenericVersion) obj ).items; boolean number = true; for ( int index = 0;; index++ ) { if ( index >= these.length && index >= those.length ) { return 0; } else if ( index >= these.length ) { return -comparePadding( those, index, null ); } else if ( index >= those.length ) { return comparePadding( these, index, null ); } Item thisItem = these[index]; Item thatItem = those[index]; if ( thisItem.isNumber() != thatItem.isNumber() ) { if ( number == thisItem.isNumber() ) { return comparePadding( these, index, Boolean.valueOf( number ) ); } else { return -comparePadding( those, index, Boolean.valueOf( number ) ); } } else { int rel = thisItem.compareTo( thatItem ); if ( rel != 0 ) { return rel; } number = thisItem.isNumber(); } } } private static int comparePadding( Item[] items, int index, Boolean number ) { int rel = 0; for ( int i = index; i < items.length; i++ ) { Item item = items[i]; if ( number != null && number.booleanValue() != item.isNumber() ) { break; } rel = item.compareTo( null ); if ( rel != 0 ) { break; } } return rel; } @Override public boolean equals( Object obj ) { return ( obj instanceof GenericVersion ) && compareTo( (GenericVersion) obj ) == 0; } @Override public int hashCode() { return hash; } @Override public String toString() { return version; } static final class Tokenizer { private final String version; private int index; private String token; private boolean number; private boolean terminatedByNumber; public Tokenizer( String version ) { this.version = ( version.length() > 0 ) ? version : "0"; } public String getToken() { return token; } public boolean isNumber() { return number; } public boolean isTerminatedByNumber() { return terminatedByNumber; } public boolean next() { final int n = version.length(); if ( index >= n ) { return false; } int state = -2; int start = index; int end = n; terminatedByNumber = false; for ( ; index < n; index++ ) { char c = version.charAt( index ); if ( c == '.' || c == '-' ) { end = index; index++; break; } else { int digit = Character.digit( c, 10 ); if ( digit >= 0 ) { if ( state == -1 ) { end = index; terminatedByNumber = true; break; } if ( state == 0 ) { // normalize numbers and strip leading zeros (prereq for Integer/BigInteger handling) start++; } state = ( state > 0 || digit > 0 ) ? 1 : 0; } else { if ( state >= 0 ) { end = index; break; } state = -1; } } } if ( end - start > 0 ) { token = version.substring( start, end ); number = state >= 0; } else { token = "0"; number = true; } return true; } @Override public String toString() { return String.valueOf( token ); } } static final class Item { private static final int KIND_BIGINT = 3; private static final int KIND_INT = 2; private static final int KIND_STRING = 1; private static final int KIND_QUALIFIER = 0; private static final Map QUALIFIERS; static { QUALIFIERS = new TreeMap( String.CASE_INSENSITIVE_ORDER ); QUALIFIERS.put( "alpha", Integer.valueOf( -5 ) ); QUALIFIERS.put( "beta", Integer.valueOf( -4 ) ); QUALIFIERS.put( "milestone", Integer.valueOf( -3 ) ); QUALIFIERS.put( "cr", Integer.valueOf( -2 ) ); QUALIFIERS.put( "rc", Integer.valueOf( -2 ) ); QUALIFIERS.put( "snapshot", Integer.valueOf( -1 ) ); QUALIFIERS.put( "ga", Integer.valueOf( 0 ) ); QUALIFIERS.put( "final", Integer.valueOf( 0 ) ); QUALIFIERS.put( "", Integer.valueOf( 0 ) ); QUALIFIERS.put( "sp", Integer.valueOf( 1 ) ); } private final int kind; private final Object value; public Item( Tokenizer tokenizer ) { String token = tokenizer.getToken(); if ( tokenizer.isNumber() ) { try { if ( token.length() < 10 ) { kind = KIND_INT; value = Integer.valueOf( Integer.parseInt( token ) ); } else { kind = KIND_BIGINT; value = new BigInteger( token ); } } catch ( NumberFormatException e ) { throw new IllegalStateException( e ); } } else { if ( tokenizer.isTerminatedByNumber() && token.length() == 1 ) { switch ( token.charAt( 0 ) ) { case 'a': case 'A': token = "alpha"; break; case 'b': case 'B': token = "beta"; break; case 'm': case 'M': token = "milestone"; break; } } Integer qualifier = QUALIFIERS.get( token ); if ( qualifier != null ) { kind = KIND_QUALIFIER; value = qualifier; } else { kind = KIND_STRING; value = token.toLowerCase( Locale.ENGLISH ); } } } public boolean isNumber() { return kind >= KIND_INT; } public int compareTo( Item that ) { int rel; if ( that == null ) { // null in this context denotes the pad item (0 or "ga") switch ( kind ) { case KIND_BIGINT: case KIND_STRING: rel = 1; break; case KIND_INT: case KIND_QUALIFIER: rel = ( (Integer) value ).intValue(); break; default: throw new IllegalStateException( "unknown version item kind " + kind ); } } else { rel = kind - that.kind; if ( rel == 0 ) { switch ( kind ) { case KIND_BIGINT: rel = ( (BigInteger) value ).compareTo( (BigInteger) that.value ); break; case KIND_INT: case KIND_QUALIFIER: rel = ( (Integer) value ).compareTo( (Integer) that.value ); break; case KIND_STRING: rel = ( (String) value ).compareToIgnoreCase( (String) that.value ); break; default: throw new IllegalStateException( "unknown version item kind " + kind ); } } } return rel; } @Override public boolean equals( Object obj ) { return ( obj instanceof Item ) && compareTo( (Item) obj ) == 0; } @Override public int hashCode() { return value.hashCode() + kind * 31; } @Override public String toString() { return String.valueOf( value ); } } } GenericVersionConstraint.java000066400000000000000000000071541167050556700340650ustar00rootroot00000000000000aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/versionpackage org.sonatype.aether.util.version; /******************************************************************************* * 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.HashSet; import org.sonatype.aether.version.Version; import org.sonatype.aether.version.VersionConstraint; import org.sonatype.aether.version.VersionRange; /** * A constraint on versions for a dependency. * * @author Benjamin Bentmann */ final class GenericVersionConstraint implements VersionConstraint { private Collection ranges = new HashSet(); private Version version; /** * Adds the specified version range to this constraint. All versions matched by the given range satisfy this * constraint. * * @param range The version range to add, may be {@code null}. * @return This constraint for chaining, never {@code null}. */ public GenericVersionConstraint addRange( VersionRange range ) { if ( range != null ) { ranges.add( range ); } return this; } public Collection getRanges() { return ranges; } /** * Sets the recommended version to satisfy this constraint. * * @param version The recommended version for this constraint, may be {@code null} if none. * @return This constraint for chaining, never {@code null}. */ public GenericVersionConstraint setVersion( Version version ) { this.version = version; return this; } public Version getVersion() { return version; } public boolean containsVersion( Version version ) { if ( ranges.isEmpty() ) { return version.equals( this.version ); } else { for ( VersionRange range : ranges ) { if ( range.containsVersion( version ) ) { return true; } } return false; } } @Override public String toString() { StringBuilder buffer = new StringBuilder( 128 ); for ( VersionRange range : getRanges() ) { if ( buffer.length() > 0 ) { buffer.append( "," ); } buffer.append( range ); } if ( buffer.length() <= 0 ) { buffer.append( getVersion() ); } return buffer.toString(); } @Override public boolean equals( Object obj ) { if ( this == obj ) { return true; } if ( obj == null || !getClass().equals( obj.getClass() ) ) { return false; } GenericVersionConstraint that = (GenericVersionConstraint) obj; return ranges.equals( that.getRanges() ) && eq( version, that.getVersion() ); } private static boolean eq( T s1, T s2 ) { return s1 != null ? s1.equals( s2 ) : s2 == null; } @Override public int hashCode() { int hash = 17; hash = hash * 31 + hash( getRanges() ); hash = hash * 31 + hash( getVersion() ); return hash; } private static int hash( Object obj ) { return obj != null ? obj.hashCode() : 0; } } aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/version/GenericVersionRange.java000066400000000000000000000152521167050556700330520ustar00rootroot00000000000000package org.sonatype.aether.util.version; /******************************************************************************* * 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.version.InvalidVersionSpecificationException; import org.sonatype.aether.version.Version; import org.sonatype.aether.version.VersionRange; /** * A version range inspired by mathematical range syntax. For example, "[1.0,2.0)", "[1.0,)" or "[1.0]". * * @author Benjamin Bentmann * @author Alin Dreghiciu */ final class GenericVersionRange implements VersionRange { private final Version lowerBound; private final boolean lowerBoundInclusive; private final Version upperBound; private final boolean upperBoundInclusive; /** * Creates a version range from the specified range specification. * * @param range The range specification to parse, must not be {@code null}. * @throws InvalidVersionSpecificationException If the range could not be parsed. */ public GenericVersionRange( String range ) throws InvalidVersionSpecificationException { String process = range; if ( range.startsWith( "[" ) ) { lowerBoundInclusive = true; } else if ( range.startsWith( "(" ) ) { lowerBoundInclusive = false; } else { throw new InvalidVersionSpecificationException( range, "Invalid version range " + range + ", a range must start with either [ or (" ); } if ( range.endsWith( "]" ) ) { upperBoundInclusive = true; } else if ( range.endsWith( ")" ) ) { upperBoundInclusive = false; } else { throw new InvalidVersionSpecificationException( range, "Invalid version range " + range + ", a range must end with either [ or (" ); } process = process.substring( 1, process.length() - 1 ); int index = process.indexOf( "," ); if ( index < 0 ) { if ( !lowerBoundInclusive || !upperBoundInclusive ) { throw new InvalidVersionSpecificationException( range, "Invalid version range " + range + ", single version must be surrounded by []" ); } lowerBound = upperBound = new GenericVersion( process.trim() ); } else { String parsedLowerBound = process.substring( 0, index ).trim(); String parsedUpperBound = process.substring( index + 1 ).trim(); // more than two bounds, e.g. (1,2,3) if ( parsedUpperBound.contains( "," ) ) { throw new InvalidVersionSpecificationException( range, "Invalid version range " + range + ", bounds may not contain additional ','" ); } lowerBound = parsedLowerBound.length() > 0 ? new GenericVersion( parsedLowerBound ) : null; upperBound = parsedUpperBound.length() > 0 ? new GenericVersion( parsedUpperBound ) : null; if ( upperBound != null && lowerBound != null ) { if ( upperBound.compareTo( lowerBound ) < 0 ) { throw new InvalidVersionSpecificationException( range, "Invalid version range " + range + ", lower bound must not be greater than upper bound" ); } } } } public GenericVersionRange( Version lowerBound, boolean lowerBoundInclusive, Version upperBound, boolean upperBoundInclusive ) { this.lowerBound = lowerBound; this.lowerBoundInclusive = lowerBoundInclusive; this.upperBound = upperBound; this.upperBoundInclusive = upperBoundInclusive; } public Version getLowerBound() { return lowerBound; } public boolean isLowerBoundInclusive() { return lowerBoundInclusive; } public Version getUpperBound() { return upperBound; } public boolean isUpperBoundInclusive() { return upperBoundInclusive; } public boolean containsVersion( Version version ) { if ( lowerBound != null ) { int comparison = lowerBound.compareTo( version ); if ( comparison == 0 && !lowerBoundInclusive ) { return false; } if ( comparison > 0 ) { return false; } } if ( upperBound != null ) { int comparison = upperBound.compareTo( version ); if ( comparison == 0 && !upperBoundInclusive ) { return false; } if ( comparison < 0 ) { return false; } } return true; } @Override public boolean equals( Object obj ) { if ( obj == this ) { return true; } else if ( obj == null || !getClass().equals( obj.getClass() ) ) { return false; } GenericVersionRange that = (GenericVersionRange) obj; return upperBoundInclusive == that.upperBoundInclusive && lowerBoundInclusive == that.lowerBoundInclusive && eq( upperBound, that.upperBound ) && eq( lowerBound, that.lowerBound ); } private static boolean eq( T s1, T s2 ) { return s1 != null ? s1.equals( s2 ) : s2 == null; } @Override public int hashCode() { int hash = 17; hash = hash * 31 + hash( upperBound ); hash = hash * 31 + ( upperBoundInclusive ? 1 : 0 ); hash = hash * 31 + hash( lowerBound ); hash = hash * 31 + ( lowerBoundInclusive ? 1 : 0 ); return hash; } private static int hash( Object obj ) { return obj != null ? obj.hashCode() : 0; } @Override public String toString() { StringBuilder buffer = new StringBuilder( 64 ); buffer.append( lowerBoundInclusive ? '[' : '(' ); if ( lowerBound != null ) { buffer.append( lowerBound ); } buffer.append( ',' ); if ( upperBound != null ) { buffer.append( upperBound ); } buffer.append( upperBoundInclusive ? ']' : ')' ); return buffer.toString(); } } aether-1.13.1/aether-util/src/main/java/org/sonatype/aether/util/version/GenericVersionScheme.java000066400000000000000000000103701167050556700332160ustar00rootroot00000000000000package org.sonatype.aether.util.version; /******************************************************************************* * 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.version.InvalidVersionSpecificationException; import org.sonatype.aether.version.Version; import org.sonatype.aether.version.VersionConstraint; import org.sonatype.aether.version.VersionRange; import org.sonatype.aether.version.VersionScheme; /** * A version scheme using a generic version syntax and common sense sorting. This scheme accepts versions of any form, * interpreting a version as a sequence of numeric and alphabetic components. The characters '-' and '.' as well as the * mere transitions from digit to letter and vice versa delimit the version components. Delimiters are treated as * equivalent. Numeric components are compared mathematically, alphabetic components are compared lexicographically and * case-insensitively. However, the following qualifier strings are recognized and treated specially: "alpha" < "beta" < * "milestone" < "cr" = "rc" < "snapshot" < "final" = "ga" < "sp". All of those well-known qualifiers are considered * smaller/older than other strings. An empty component/string is equivalent to 0. Numbers and strings are considered * incomparable against each other. Where version components of different kind would collide, comparison will instead * assume that the previous components are padded with 0 or "ga", respectively, until the kind mismatch is resolved, * i.e. 1-alpha = 1.0.0-alpha < 1.0.1-ga = 1.0.1. * * @author Benjamin Bentmann * @author Alin Dreghiciu */ public class GenericVersionScheme implements VersionScheme { /** * Creates a new instance of the version scheme for parsing versions. */ public GenericVersionScheme() { } public Version parseVersion( final String version ) throws InvalidVersionSpecificationException { return new GenericVersion( version ); } public VersionRange parseVersionRange( final String range ) throws InvalidVersionSpecificationException { return new GenericVersionRange( range ); } public VersionConstraint parseVersionConstraint( final String constraint ) throws InvalidVersionSpecificationException { GenericVersionConstraint result = new GenericVersionConstraint(); String process = constraint; while ( process.startsWith( "[" ) || process.startsWith( "(" ) ) { int index1 = process.indexOf( ')' ); int index2 = process.indexOf( ']' ); int index = index2; if ( index2 < 0 || ( index1 >= 0 && index1 < index2 ) ) { index = index1; } if ( index < 0 ) { throw new InvalidVersionSpecificationException( constraint, "Unbounded version range " + constraint ); } VersionRange range = parseVersionRange( process.substring( 0, index + 1 ) ); result.addRange( range ); process = process.substring( index + 1 ).trim(); if ( process.length() > 0 && process.startsWith( "," ) ) { process = process.substring( 1 ).trim(); } } if ( process.length() > 0 && !result.getRanges().isEmpty() ) { throw new InvalidVersionSpecificationException( constraint, "Invalid version range " + constraint + ", expected [ or ( but got " + process ); } if ( result.getRanges().isEmpty() ) { result.setVersion( parseVersion( constraint ) ); } return result; } @Override public boolean equals( final Object obj ) { if ( this == obj ) { return true; } return obj != null && getClass().equals( obj.getClass() ); } @Override public int hashCode() { return getClass().hashCode(); } } aether-1.13.1/aether-util/src/test/000077500000000000000000000000001167050556700170525ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/java/000077500000000000000000000000001167050556700177735ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/java/org/000077500000000000000000000000001167050556700205625ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/java/org/sonatype/000077500000000000000000000000001167050556700224245ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/000077500000000000000000000000001167050556700236745ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/000077500000000000000000000000001167050556700246515ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/ChecksumUtilTest.java000066400000000000000000000131421167050556700307550ustar00rootroot00000000000000package org.sonatype.aether.util; /******************************************************************************* * 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 static org.junit.Assert.*; import java.io.File; import java.io.IOException; import java.util.Arrays; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import org.sonatype.aether.test.util.TestFileUtils; public class ChecksumUtilTest { private File emptyFile; private File patternFile; private File textFile; private static Map emptyFileChecksums = new HashMap(); private static Map patternFileChecksums = new HashMap(); private static Map textFileChecksums = new HashMap(); private Map> sums = new HashMap>(); @BeforeClass public static void beforeClass() throws IOException { emptyFileChecksums.put( "MD5", "d41d8cd98f00b204e9800998ecf8427e" ); emptyFileChecksums.put( "SHA-1", "da39a3ee5e6b4b0d3255bfef95601890afd80709" ); patternFileChecksums.put( "MD5", "14f01d6c7de7d4cf0a4887baa3528b5a" ); patternFileChecksums.put( "SHA-1", "feeeda19f626f9b0ef6cbf5948c1ec9531694295" ); textFileChecksums.put( "MD5", "12582d1a662cefe3385f2113998e43ed" ); textFileChecksums.put( "SHA-1", "a8ae272db549850eef2ff54376f8cac2770745ee" ); } @Before public void before() throws IOException { sums.clear(); emptyFile = TestFileUtils.createTempFile( new byte[] {}, 0 ); sums.put( emptyFile, emptyFileChecksums ); patternFile = TestFileUtils.createTempFile( new byte[] { 0, 1, 2, 4, 8, 16, 32, 64, 127, -1, -2, -4, -8, -16, -32, -64, -127 }, 1000 ); sums.put( patternFile, patternFileChecksums ); textFile = TestFileUtils.createTempFile( "the quick brown fox jumps over the lazy dog\n".getBytes( "UTF-8" ), 500 ); sums.put( textFile, textFileChecksums ); } @Test public void testEquality() throws Throwable { Map checksums = null; for ( File file : new File[] { emptyFile, patternFile, textFile } ) { checksums = ChecksumUtils.calc( file, Arrays.asList( "SHA-1", "MD5" ) ); for ( Entry entry : checksums.entrySet() ) { if ( entry.getValue() instanceof Throwable ) { throw (Throwable) entry.getValue(); } String actual = entry.getValue().toString(); String expected = sums.get( file ).get( entry.getKey() ); assertEquals( String.format( "checksums do not match for '%s', algorithm '%s'", file.getName(), entry.getKey() ), expected, actual ); } assertTrue( "Could not delete file", file.delete() ); } } @Test public void testFileHandleLeakage() throws IOException { for ( File file : new File[] { emptyFile, patternFile, textFile } ) { for ( int i = 0; i < 150; i++ ) { ChecksumUtils.calc( file, Arrays.asList( "SHA-1", "MD5" ) ); } assertTrue( "Could not delete file", file.delete() ); } } @Test public void testRead() throws IOException { for ( Map checksums : sums.values() ) { String sha1 = checksums.get( "SHA-1" ); String md5 = checksums.get( "MD5" ); File sha1File = TestFileUtils.createTempFile( sha1 ); File md5File = TestFileUtils.createTempFile( md5 ); assertEquals( sha1, ChecksumUtils.read( sha1File ) ); assertEquals( md5, ChecksumUtils.read( md5File ) ); assertTrue( "ChecksumUtils leaks file handles (cannot delete checksums.sha1)", sha1File.delete() ); assertTrue( "ChecksumUtils leaks file handles (cannot delete checksums.md5)", md5File.delete() ); } } @Test public void testReadSpaces() throws IOException { for ( Map checksums : sums.values() ) { String sha1 = checksums.get( "SHA-1" ); String md5 = checksums.get( "MD5" ); File sha1File = TestFileUtils.createTempFile( "sha1-checksum = " + sha1 ); File md5File = TestFileUtils.createTempFile( md5 + " test" ); assertEquals( sha1, ChecksumUtils.read( sha1File ) ); assertEquals( md5, ChecksumUtils.read( md5File ) ); assertTrue( "ChecksumUtils leaks file handles (cannot delete checksums.sha1)", sha1File.delete() ); assertTrue( "ChecksumUtils leaks file handles (cannot delete checksums.md5)", md5File.delete() ); } } @Test public void testReadEmptyFile() throws IOException { File file = TestFileUtils.createTempFile( "" ); assertEquals( "", ChecksumUtils.read( file ) ); assertTrue( "ChecksumUtils leaks file handles (cannot delete checksum.empty)", file.delete() ); } } DefaultRepositorySystemSessionTest.java000066400000000000000000000033641167050556700345400ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/utilpackage org.sonatype.aether.util; /******************************************************************************* * 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 static org.junit.Assert.*; import org.junit.Test; import org.sonatype.aether.repository.Authentication; import org.sonatype.aether.repository.Proxy; import org.sonatype.aether.repository.RemoteRepository; /** */ public class DefaultRepositorySystemSessionTest { @Test public void testDefaultProxySelectorUsesExistingProxy() { DefaultRepositorySystemSession session = new DefaultRepositorySystemSession(); RemoteRepository repo = new RemoteRepository( "id", "default", "void" ); assertSame( null, session.getProxySelector().getProxy( repo ) ); repo.setProxy( new Proxy( "http", "localhost", 8080, null ) ); assertSame( repo.getProxy(), session.getProxySelector().getProxy( repo ) ); } @Test public void testDefaultAuthenticationSelectorUsesExistingAuth() { DefaultRepositorySystemSession session = new DefaultRepositorySystemSession(); RemoteRepository repo = new RemoteRepository( "id", "default", "void" ); assertSame( null, session.getAuthenticationSelector().getAuthentication( repo ) ); repo.setAuthentication( new Authentication( "user", "pass" ) ); assertSame( repo.getAuthentication(), session.getAuthenticationSelector().getAuthentication( repo ) ); } } aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/DefaultRequestTraceTest.java000066400000000000000000000030361167050556700322720ustar00rootroot00000000000000package org.sonatype.aether.util; /******************************************************************************* * 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 static org.junit.Assert.*; import org.junit.Test; import org.sonatype.aether.RequestTrace; /** * @author Benjamin Bentmann */ public class DefaultRequestTraceTest { @Test public void testConstructor() { DefaultRequestTrace trace = new DefaultRequestTrace( null ); assertSame( null, trace.getData() ); trace = new DefaultRequestTrace( this ); assertSame( this, trace.getData() ); } @Test public void testParentChaining() { RequestTrace trace1 = new DefaultRequestTrace( null ); RequestTrace trace2 = trace1.newChild( this ); assertSame( null, trace1.getParent() ); assertSame( null, trace1.getData() ); assertSame( trace1, trace2.getParent() ); assertSame( this, trace2.getData() ); } @Test public void testNewChildRequestTrace() { RequestTrace trace = DefaultRequestTrace.newChild( null, this ); assertNotNull( trace ); assertSame( null, trace.getParent() ); assertSame( this, trace.getData() ); } } aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/StringUtilsTest.java000066400000000000000000000015551167050556700306510ustar00rootroot00000000000000package org.sonatype.aether.util; /******************************************************************************* * 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 static org.junit.Assert.*; import org.junit.Test; /** * @author Benjamin Bentmann */ public class StringUtilsTest { @Test public void testIsEmpty() { assertTrue( StringUtils.isEmpty( null ) ); assertTrue( StringUtils.isEmpty( "" ) ); assertFalse( StringUtils.isEmpty( " " ) ); assertFalse( StringUtils.isEmpty( "test" ) ); } } aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/artifact/000077500000000000000000000000001167050556700264465ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/artifact/ArtifacIdUtilsTest.java000066400000000000000000000055471167050556700330330ustar00rootroot00000000000000package org.sonatype.aether.util.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 static org.junit.Assert.*; import org.junit.Test; import org.sonatype.aether.artifact.Artifact; /** * @author Benjamin Bentmann */ public class ArtifacIdUtilsTest { @Test public void testToIdArtifact() { Artifact artifact = null; assertSame( null, ArtifacIdUtils.toId( artifact ) ); artifact = new DefaultArtifact( "gid", "aid", "ext", "1.0-20110205.132618-23" ); assertEquals( "gid:aid:ext:1.0-20110205.132618-23", ArtifacIdUtils.toId( artifact ) ); artifact = new DefaultArtifact( "gid", "aid", "cls", "ext", "1.0-20110205.132618-23" ); assertEquals( "gid:aid:ext:cls:1.0-20110205.132618-23", ArtifacIdUtils.toId( artifact ) ); } @Test public void testToIdStrings() { assertEquals( ":::", ArtifacIdUtils.toId( null, null, null, null, null ) ); assertEquals( "gid:aid:ext:1", ArtifacIdUtils.toId( "gid", "aid", "ext", "", "1" ) ); assertEquals( "gid:aid:ext:cls:1", ArtifacIdUtils.toId( "gid", "aid", "ext", "cls", "1" ) ); } @Test public void testToBaseIdArtifact() { Artifact artifact = null; assertSame( null, ArtifacIdUtils.toBaseId( artifact ) ); artifact = new DefaultArtifact( "gid", "aid", "ext", "1.0-20110205.132618-23" ); assertEquals( "gid:aid:ext:1.0-SNAPSHOT", ArtifacIdUtils.toBaseId( artifact ) ); artifact = new DefaultArtifact( "gid", "aid", "cls", "ext", "1.0-20110205.132618-23" ); assertEquals( "gid:aid:ext:cls:1.0-SNAPSHOT", ArtifacIdUtils.toBaseId( artifact ) ); } @Test public void testToVersionlessIdArtifact() { Artifact artifact = null; assertSame( null, ArtifacIdUtils.toId( artifact ) ); artifact = new DefaultArtifact( "gid", "aid", "ext", "1" ); assertEquals( "gid:aid:ext", ArtifacIdUtils.toVersionlessId( artifact ) ); artifact = new DefaultArtifact( "gid", "aid", "cls", "ext", "1" ); assertEquals( "gid:aid:ext:cls", ArtifacIdUtils.toVersionlessId( artifact ) ); } @Test public void testToVersionlessIdStrings() { assertEquals( "::", ArtifacIdUtils.toVersionlessId( null, null, null, null ) ); assertEquals( "gid:aid:ext", ArtifacIdUtils.toVersionlessId( "gid", "aid", "ext", "" ) ); assertEquals( "gid:aid:ext:cls", ArtifacIdUtils.toVersionlessId( "gid", "aid", "ext", "cls" ) ); } } aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/artifact/DefaultArtifactTest.java000066400000000000000000000153351167050556700332220ustar00rootroot00000000000000package org.sonatype.aether.util.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 static org.junit.Assert.*; import java.io.File; import java.util.Collections; import java.util.HashMap; import java.util.Map; import org.junit.Test; import org.sonatype.aether.artifact.Artifact; /** * @author Benjamin Bentmann */ public class DefaultArtifactTest { @Test public void testDefaultArtifactString() { Artifact a; a = new DefaultArtifact( "gid:aid:ver" ); assertEquals( "gid", a.getGroupId() ); assertEquals( "aid", a.getArtifactId() ); assertEquals( "ver", a.getVersion() ); assertEquals( "jar", a.getExtension() ); assertEquals( "", a.getClassifier() ); a = new DefaultArtifact( "gid:aid:ext:ver" ); assertEquals( "gid", a.getGroupId() ); assertEquals( "aid", a.getArtifactId() ); assertEquals( "ver", a.getVersion() ); assertEquals( "ext", a.getExtension() ); assertEquals( "", a.getClassifier() ); a = new DefaultArtifact( "org.gid:foo-bar:jar:1.1-20101116.150650-3" ); assertEquals( "org.gid", a.getGroupId() ); assertEquals( "foo-bar", a.getArtifactId() ); assertEquals( "1.1-20101116.150650-3", a.getVersion() ); assertEquals( "jar", a.getExtension() ); assertEquals( "", a.getClassifier() ); a = new DefaultArtifact( "gid:aid:ext:cls:ver" ); assertEquals( "gid", a.getGroupId() ); assertEquals( "aid", a.getArtifactId() ); assertEquals( "ver", a.getVersion() ); assertEquals( "ext", a.getExtension() ); assertEquals( "cls", a.getClassifier() ); a = new DefaultArtifact( "gid:aid::cls:ver" ); assertEquals( "gid", a.getGroupId() ); assertEquals( "aid", a.getArtifactId() ); assertEquals( "ver", a.getVersion() ); assertEquals( "jar", a.getExtension() ); assertEquals( "cls", a.getClassifier() ); a = new DefaultArtifact( new DefaultArtifact( "gid:aid:ext:cls:ver" ).toString() ); assertEquals( "gid", a.getGroupId() ); assertEquals( "aid", a.getArtifactId() ); assertEquals( "ver", a.getVersion() ); assertEquals( "ext", a.getExtension() ); assertEquals( "cls", a.getClassifier() ); } @Test( expected = IllegalArgumentException.class ) public void testDefaultArtifactBadString() { new DefaultArtifact( "gid:aid" ); } @Test public void testImmutability() { Artifact a = new DefaultArtifact( "gid:aid:ext:cls:ver" ); assertNotSame( a, a.setFile( new File( "file" ) ) ); assertNotSame( a, a.setVersion( "otherVersion" ) ); assertNotSame( a, a.setProperties( Collections.singletonMap( "key", "value" ) ) ); } @Test public void testArtifactType() { DefaultArtifactType type = new DefaultArtifactType( "typeId", "typeExt", "typeCls", "typeLang", true, true ); Artifact a = new DefaultArtifact( "gid", "aid", null, null, null, null, type ); assertEquals( "typeExt", a.getExtension() ); assertEquals( "typeCls", a.getClassifier() ); assertEquals( "typeLang", a.getProperties().get( ArtifactProperties.LANGUAGE ) ); assertEquals( "typeId", a.getProperties().get( ArtifactProperties.TYPE ) ); assertEquals( "true", a.getProperties().get( ArtifactProperties.INCLUDES_DEPENDENCIES ) ); assertEquals( "true", a.getProperties().get( ArtifactProperties.CONSTITUTES_BUILD_PATH ) ); a = new DefaultArtifact( "gid", "aid", "cls", "ext", "ver", null, type ); assertEquals( "ext", a.getExtension() ); assertEquals( "cls", a.getClassifier() ); assertEquals( "typeLang", a.getProperties().get( ArtifactProperties.LANGUAGE ) ); assertEquals( "typeId", a.getProperties().get( ArtifactProperties.TYPE ) ); assertEquals( "true", a.getProperties().get( ArtifactProperties.INCLUDES_DEPENDENCIES ) ); assertEquals( "true", a.getProperties().get( ArtifactProperties.CONSTITUTES_BUILD_PATH ) ); Map props = new HashMap(); props.put( "someNonStandardProperty", "someNonStandardProperty" ); a = new DefaultArtifact( "gid", "aid", "cls", "ext", "ver", props, type ); assertEquals( "ext", a.getExtension() ); assertEquals( "cls", a.getClassifier() ); assertEquals( "typeLang", a.getProperties().get( ArtifactProperties.LANGUAGE ) ); assertEquals( "typeId", a.getProperties().get( ArtifactProperties.TYPE ) ); assertEquals( "true", a.getProperties().get( ArtifactProperties.INCLUDES_DEPENDENCIES ) ); assertEquals( "true", a.getProperties().get( ArtifactProperties.CONSTITUTES_BUILD_PATH ) ); assertEquals( "someNonStandardProperty", a.getProperties().get( "someNonStandardProperty" ) ); props = new HashMap(); props.put( "someNonStandardProperty", "someNonStandardProperty" ); props.put( ArtifactProperties.CONSTITUTES_BUILD_PATH, "rubbish" ); props.put( ArtifactProperties.INCLUDES_DEPENDENCIES, "rubbish" ); a = new DefaultArtifact( "gid", "aid", "cls", "ext", "ver", props, type ); assertEquals( "ext", a.getExtension() ); assertEquals( "cls", a.getClassifier() ); assertEquals( "typeLang", a.getProperties().get( ArtifactProperties.LANGUAGE ) ); assertEquals( "typeId", a.getProperties().get( ArtifactProperties.TYPE ) ); assertEquals( "rubbish", a.getProperties().get( ArtifactProperties.INCLUDES_DEPENDENCIES ) ); assertEquals( "rubbish", a.getProperties().get( ArtifactProperties.CONSTITUTES_BUILD_PATH ) ); assertEquals( "someNonStandardProperty", a.getProperties().get( "someNonStandardProperty" ) ); } @Test public void testPropertiesCopied() { Map props = new HashMap(); props.put( "key", "value1" ); Artifact a = new DefaultArtifact( "gid:aid:1", props ); assertEquals( "value1", a.getProperty( "key", null ) ); props.clear(); assertEquals( "value1", a.getProperty( "key", null ) ); props.put( "key", "value2" ); a = a.setProperties( props ); assertEquals( "value2", a.getProperty( "key", null ) ); props.clear(); assertEquals( "value2", a.getProperty( "key", null ) ); } } aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/artifact/SubArtifactTest.java000066400000000000000000000114621167050556700323640ustar00rootroot00000000000000package org.sonatype.aether.util.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 static org.junit.Assert.*; import java.io.File; import java.util.Collections; import java.util.HashMap; import java.util.Map; import org.junit.Test; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.util.artifact.SubArtifact; /** * @author Benjamin Bentmann */ public class SubArtifactTest { private Artifact newMainArtifact( String coords ) { return new DefaultArtifact( coords ); } @Test public void testMainArtifactFileNotRetained() { Artifact a = newMainArtifact( "gid:aid:ver" ).setFile( new File( "" ) ); assertNotNull( a.getFile() ); a = new SubArtifact( a, "", "pom" ); assertNull( a.getFile() ); } @Test public void testMainArtifactPropertiesNotRetained() { Artifact a = newMainArtifact( "gid:aid:ver" ).setProperties( Collections.singletonMap( "key", "value" ) ); assertEquals( 1, a.getProperties().size() ); a = new SubArtifact( a, "", "pom" ); assertEquals( 0, a.getProperties().size() ); assertSame( null, a.getProperty( "key", null ) ); } @Test( expected = IllegalArgumentException.class ) public void testMainArtifactMissing() { new SubArtifact( null, "", "pom" ); } @Test public void testEmptyClassifier() { Artifact main = newMainArtifact( "gid:aid:ext:cls:ver" ); Artifact sub = new SubArtifact( main, "", "pom" ); assertEquals( "", sub.getClassifier() ); sub = new SubArtifact( main, null, "pom" ); assertEquals( "", sub.getClassifier() ); } @Test public void testEmptyExtension() { Artifact main = newMainArtifact( "gid:aid:ext:cls:ver" ); Artifact sub = new SubArtifact( main, "tests", "" ); assertEquals( "", sub.getExtension() ); sub = new SubArtifact( main, "tests", null ); assertEquals( "", sub.getExtension() ); } @Test public void testSameClassifier() { Artifact main = newMainArtifact( "gid:aid:ext:cls:ver" ); Artifact sub = new SubArtifact( main, "*", "pom" ); assertEquals( "cls", sub.getClassifier() ); } @Test public void testSameExtension() { Artifact main = newMainArtifact( "gid:aid:ext:cls:ver" ); Artifact sub = new SubArtifact( main, "tests", "*" ); assertEquals( "ext", sub.getExtension() ); } @Test public void testDerivedClassifier() { Artifact main = newMainArtifact( "gid:aid:ext:cls:ver" ); Artifact sub = new SubArtifact( main, "*-tests", "pom" ); assertEquals( "cls-tests", sub.getClassifier() ); sub = new SubArtifact( main, "tests-*", "pom" ); assertEquals( "tests-cls", sub.getClassifier() ); main = newMainArtifact( "gid:aid:ext:ver" ); sub = new SubArtifact( main, "*-tests", "pom" ); assertEquals( "tests", sub.getClassifier() ); sub = new SubArtifact( main, "tests-*", "pom" ); assertEquals( "tests", sub.getClassifier() ); } @Test public void testDerivedExtension() { Artifact main = newMainArtifact( "gid:aid:ext:cls:ver" ); Artifact sub = new SubArtifact( main, "", "*.asc" ); assertEquals( "ext.asc", sub.getExtension() ); sub = new SubArtifact( main, "", "asc.*" ); assertEquals( "asc.ext", sub.getExtension() ); } @Test public void testImmutability() { Artifact a = new SubArtifact( newMainArtifact( "gid:aid:ver" ), "", "pom" ); assertNotSame( a, a.setFile( new File( "file" ) ) ); assertNotSame( a, a.setVersion( "otherVersion" ) ); assertNotSame( a, a.setProperties( Collections.singletonMap( "key", "value" ) ) ); } @Test public void testPropertiesCopied() { Map props = new HashMap(); props.put( "key", "value1" ); Artifact a = new SubArtifact( newMainArtifact( "gid:aid:ver" ), "", "pom", props, null ); assertEquals( "value1", a.getProperty( "key", null ) ); props.clear(); assertEquals( "value1", a.getProperty( "key", null ) ); props.put( "key", "value2" ); a = a.setProperties( props ); assertEquals( "value2", a.getProperty( "key", null ) ); props.clear(); assertEquals( "value2", a.getProperty( "key", null ) ); } } aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/filter/000077500000000000000000000000001167050556700261365ustar00rootroot00000000000000AbstractDependencyFilterTest.java000066400000000000000000000022721167050556700344750ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/filterpackage org.sonatype.aether.util.filter; /******************************************************************************* * 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.graph.DependencyFilter; import org.sonatype.aether.graph.DependencyNode; public abstract class AbstractDependencyFilterTest { protected DependencyFilter getAcceptFilter() { return new DependencyFilter() { public boolean accept( DependencyNode node, List parents ) { return true; } }; } protected DependencyFilter getDenyFilter() { return new DependencyFilter() { public boolean accept( DependencyNode node, List parents ) { return false; } }; } } aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/filter/AndDependencyFilterTest.java000066400000000000000000000073501167050556700335150ustar00rootroot00000000000000package org.sonatype.aether.util.filter; /******************************************************************************* * 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 static org.junit.Assert.*; import java.util.Collection; import java.util.LinkedList; import java.util.List; import org.junit.Test; import org.sonatype.aether.graph.DependencyFilter; import org.sonatype.aether.graph.DependencyNode; import org.sonatype.aether.test.util.NodeBuilder; public class AndDependencyFilterTest extends AbstractDependencyFilterTest { @Test public void acceptTest() { NodeBuilder builder = new NodeBuilder(); builder.artifactId( "test" ); List parents = new LinkedList(); // Empty AND assertTrue( new AndDependencyFilter().accept( builder.build() , parents) ); // Basic Boolean Input assertTrue( new AndDependencyFilter( getAcceptFilter() ).accept( builder.build() , parents) ); assertFalse( new AndDependencyFilter( getDenyFilter() ).accept( builder.build() , parents) ); assertFalse( new AndDependencyFilter( getDenyFilter(), getDenyFilter() ).accept( builder.build() , parents) ); assertFalse( new AndDependencyFilter( getDenyFilter(), getAcceptFilter() ).accept( builder.build() , parents) ); assertFalse( new AndDependencyFilter( getAcceptFilter(), getDenyFilter() ).accept( builder.build() , parents) ); assertTrue( new AndDependencyFilter( getAcceptFilter(), getAcceptFilter() ).accept( builder.build() , parents) ); assertFalse( new AndDependencyFilter( getDenyFilter(), getDenyFilter(), getDenyFilter() ).accept( builder.build() , parents) ); assertFalse( new AndDependencyFilter( getAcceptFilter(), getDenyFilter(), getDenyFilter() ).accept( builder.build() , parents) ); assertFalse( new AndDependencyFilter( getAcceptFilter(), getAcceptFilter(), getDenyFilter() ).accept( builder.build() , parents) ); assertTrue( new AndDependencyFilter( getAcceptFilter(), getAcceptFilter(), getAcceptFilter() ).accept( builder.build() , parents) ); // User another constructor Collection filters = new LinkedList(); filters.add( getDenyFilter() ); filters.add( getAcceptFilter() ); assertFalse( new AndDependencyFilter( filters ).accept( builder.build() , parents) ); filters = new LinkedList(); filters.add( getDenyFilter() ); filters.add( getDenyFilter() ); assertFalse( new AndDependencyFilter( filters ).accept( builder.build() , parents) ); filters = new LinkedList(); filters.add( getAcceptFilter() ); filters.add( getAcceptFilter() ); assertTrue( new AndDependencyFilter( filters ).accept( builder.build() , parents) ); // newInstance assertTrue( AndDependencyFilter.newInstance( getAcceptFilter(), getAcceptFilter() ).accept( builder.build() , parents) ); assertFalse( AndDependencyFilter.newInstance( getAcceptFilter(), getDenyFilter() ).accept( builder.build() , parents) ); assertFalse( AndDependencyFilter.newInstance( getDenyFilter(), null ).accept( builder.build() , parents) ); assertTrue( AndDependencyFilter.newInstance( getAcceptFilter(), null ).accept( builder.build() , parents) ); assertNull( AndDependencyFilter.newInstance( null, null ) ); } } DependencyFilterUtilsTest.java000066400000000000000000000133431167050556700340330ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/filterpackage org.sonatype.aether.util.filter; /******************************************************************************* * 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 static org.junit.Assert.*; import java.util.Collections; import java.util.List; import org.junit.Test; import org.sonatype.aether.graph.DependencyFilter; import org.sonatype.aether.graph.DependencyNode; import org.sonatype.aether.test.util.NodeBuilder; /** * @author Benjamin Bentmann */ public class DependencyFilterUtilsTest { private static List PARENTS = Collections.emptyList(); @Test public void testClasspathFilterCompile() { NodeBuilder builder = new NodeBuilder().artifactId( "aid" ); DependencyFilter filter = DependencyFilterUtils.classpathFilter( "compile" ); assertTrue( filter.accept( builder.scope( "compile" ).build(), PARENTS ) ); assertTrue( filter.accept( builder.scope( "system" ).build(), PARENTS ) ); assertTrue( filter.accept( builder.scope( "provided" ).build(), PARENTS ) ); assertFalse( filter.accept( builder.scope( "runtime" ).build(), PARENTS ) ); assertFalse( filter.accept( builder.scope( "test" ).build(), PARENTS ) ); } @Test public void testClasspathFilterRuntime() { NodeBuilder builder = new NodeBuilder().artifactId( "aid" ); DependencyFilter filter = DependencyFilterUtils.classpathFilter( "runtime" ); assertTrue( filter.accept( builder.scope( "compile" ).build(), PARENTS ) ); assertFalse( filter.accept( builder.scope( "system" ).build(), PARENTS ) ); assertFalse( filter.accept( builder.scope( "provided" ).build(), PARENTS ) ); assertTrue( filter.accept( builder.scope( "runtime" ).build(), PARENTS ) ); assertFalse( filter.accept( builder.scope( "test" ).build(), PARENTS ) ); } @Test public void testClasspathFilterTest() { NodeBuilder builder = new NodeBuilder().artifactId( "aid" ); DependencyFilter filter = DependencyFilterUtils.classpathFilter( "test" ); assertTrue( filter.accept( builder.scope( "compile" ).build(), PARENTS ) ); assertTrue( filter.accept( builder.scope( "system" ).build(), PARENTS ) ); assertTrue( filter.accept( builder.scope( "provided" ).build(), PARENTS ) ); assertTrue( filter.accept( builder.scope( "runtime" ).build(), PARENTS ) ); assertTrue( filter.accept( builder.scope( "test" ).build(), PARENTS ) ); } @Test public void testClasspathFilterCompileRuntime() { NodeBuilder builder = new NodeBuilder().artifactId( "aid" ); DependencyFilter filter = DependencyFilterUtils.classpathFilter( "compile", "runtime" ); assertTrue( filter.accept( builder.scope( "compile" ).build(), PARENTS ) ); assertTrue( filter.accept( builder.scope( "system" ).build(), PARENTS ) ); assertTrue( filter.accept( builder.scope( "provided" ).build(), PARENTS ) ); assertTrue( filter.accept( builder.scope( "runtime" ).build(), PARENTS ) ); assertFalse( filter.accept( builder.scope( "test" ).build(), PARENTS ) ); } @Test public void testClasspathFilterCompilePlusRuntime() { NodeBuilder builder = new NodeBuilder().artifactId( "aid" ); DependencyFilter filter = DependencyFilterUtils.classpathFilter( "compile+runtime" ); assertTrue( filter.accept( builder.scope( "compile" ).build(), PARENTS ) ); assertTrue( filter.accept( builder.scope( "system" ).build(), PARENTS ) ); assertTrue( filter.accept( builder.scope( "provided" ).build(), PARENTS ) ); assertTrue( filter.accept( builder.scope( "runtime" ).build(), PARENTS ) ); assertFalse( filter.accept( builder.scope( "test" ).build(), PARENTS ) ); } @Test public void testClasspathFilterRuntimeCommaSystem() { NodeBuilder builder = new NodeBuilder().artifactId( "aid" ); DependencyFilter filter = DependencyFilterUtils.classpathFilter( "runtime,system" ); assertTrue( filter.accept( builder.scope( "compile" ).build(), PARENTS ) ); assertTrue( filter.accept( builder.scope( "system" ).build(), PARENTS ) ); assertFalse( filter.accept( builder.scope( "provided" ).build(), PARENTS ) ); assertTrue( filter.accept( builder.scope( "runtime" ).build(), PARENTS ) ); assertFalse( filter.accept( builder.scope( "test" ).build(), PARENTS ) ); } @Test public void testClasspathFilterNull() { NodeBuilder builder = new NodeBuilder().artifactId( "aid" ); DependencyFilter filter = DependencyFilterUtils.classpathFilter( (String[]) null ); assertFalse( filter.accept( builder.scope( "compile" ).build(), PARENTS ) ); assertFalse( filter.accept( builder.scope( "system" ).build(), PARENTS ) ); assertFalse( filter.accept( builder.scope( "provided" ).build(), PARENTS ) ); assertFalse( filter.accept( builder.scope( "runtime" ).build(), PARENTS ) ); assertFalse( filter.accept( builder.scope( "test" ).build(), PARENTS ) ); } @Test public void testClasspathFilterUnknownScope() { NodeBuilder builder = new NodeBuilder().artifactId( "aid" ); DependencyFilter filter = DependencyFilterUtils.classpathFilter( "compile" ); assertTrue( filter.accept( builder.scope( "" ).build(), PARENTS ) ); assertTrue( filter.accept( builder.scope( "unknown" ).build(), PARENTS ) ); } } ExclusionDependencyFilterTest.java000066400000000000000000000036401167050556700347030ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/filterpackage org.sonatype.aether.util.filter; /******************************************************************************* * 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 static org.junit.Assert.*; import java.util.Arrays; import java.util.Collection; import java.util.LinkedList; import java.util.List; import org.junit.Test; import org.sonatype.aether.graph.DependencyNode; import org.sonatype.aether.test.util.NodeBuilder; public class ExclusionDependencyFilterTest { @Test public void acceptTest() { NodeBuilder builder = new NodeBuilder(); builder.groupId( "com.example.test" ).artifactId( "testArtifact" ); List parents = new LinkedList(); String[] excludes; excludes = new String[] { "com.example.test:testArtifact" }; assertFalse( new ExclusionsDependencyFilter( Arrays.asList( excludes ) ).accept( builder.build(), parents ) ); excludes = new String[] { "com.example.test:testArtifact", "com.foo:otherArtifact" }; assertFalse( new ExclusionsDependencyFilter( Arrays.asList( excludes ) ).accept( builder.build(), parents ) ); excludes = new String[] { "testArtifact" }; assertFalse( new ExclusionsDependencyFilter( Arrays.asList( excludes ) ).accept( builder.build(), parents ) ); excludes = new String[] { "otherArtifact" }; assertTrue( new ExclusionsDependencyFilter( Arrays.asList( excludes ) ).accept( builder.build(), parents ) ); assertTrue( new ExclusionsDependencyFilter( (Collection) null ).accept( builder.build(), parents ) ); } } aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/filter/OrDependencyFilterTest.java000066400000000000000000000101271167050556700333670ustar00rootroot00000000000000package org.sonatype.aether.util.filter; /******************************************************************************* * 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 static org.junit.Assert.*; import java.util.Collection; import java.util.LinkedList; import java.util.List; import org.junit.Test; import org.sonatype.aether.graph.DependencyFilter; import org.sonatype.aether.graph.DependencyNode; import org.sonatype.aether.test.util.NodeBuilder; public class OrDependencyFilterTest extends AbstractDependencyFilterTest { @Test public void acceptTest() { NodeBuilder builder = new NodeBuilder(); builder.artifactId( "test" ); List parents = new LinkedList(); // Empty OR assertFalse( new OrDependencyFilter().accept( builder.build(), parents ) ); // Basic Boolean Input assertTrue( new OrDependencyFilter( getAcceptFilter() ).accept( builder.build(), parents ) ); assertFalse( new OrDependencyFilter( getDenyFilter() ).accept( builder.build(), parents ) ); assertFalse( new OrDependencyFilter( getDenyFilter(), getDenyFilter() ).accept( builder.build(), parents ) ); assertTrue( new OrDependencyFilter( getDenyFilter(), getAcceptFilter() ).accept( builder.build(), parents ) ); assertTrue( new OrDependencyFilter( getAcceptFilter(), getDenyFilter() ).accept( builder.build(), parents ) ); assertTrue( new OrDependencyFilter( getAcceptFilter(), getAcceptFilter() ).accept( builder.build(), parents ) ); assertFalse( new OrDependencyFilter( getDenyFilter(), getDenyFilter(), getDenyFilter() ).accept( builder.build(), parents ) ); assertTrue( new OrDependencyFilter( getAcceptFilter(), getDenyFilter(), getDenyFilter() ).accept( builder.build(), parents ) ); assertTrue( new OrDependencyFilter( getAcceptFilter(), getAcceptFilter(), getDenyFilter() ).accept( builder.build(), parents ) ); assertTrue( new OrDependencyFilter( getAcceptFilter(), getAcceptFilter(), getAcceptFilter() ).accept( builder.build(), parents ) ); // User another constructor Collection filters = new LinkedList(); filters.add( getDenyFilter() ); filters.add( getAcceptFilter() ); assertTrue( new OrDependencyFilter( filters ).accept( builder.build(), parents ) ); filters = new LinkedList(); filters.add( getDenyFilter() ); filters.add( getDenyFilter() ); assertFalse( new OrDependencyFilter( filters ).accept( builder.build(), parents ) ); // newInstance assertTrue( AndDependencyFilter.newInstance( getAcceptFilter(), getAcceptFilter() ).accept( builder.build(), parents ) ); assertFalse( AndDependencyFilter.newInstance( getAcceptFilter(), getDenyFilter() ).accept( builder.build(), parents ) ); assertTrue( AndDependencyFilter.newInstance( getAcceptFilter(), null ).accept( builder.build(), parents ) ); assertFalse( AndDependencyFilter.newInstance( getDenyFilter(), null ).accept( builder.build(), parents ) ); assertNull( AndDependencyFilter.newInstance( null, null ) ); } } PatternExclusionsDependencyFilterTest.java000066400000000000000000000206571167050556700364330ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/filterpackage org.sonatype.aether.util.filter; /******************************************************************************* * 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 static org.junit.Assert.*; import java.util.LinkedList; import java.util.List; import org.junit.Test; import org.sonatype.aether.graph.DependencyNode; import org.sonatype.aether.test.util.NodeBuilder; import org.sonatype.aether.util.version.GenericVersionScheme; import org.sonatype.aether.version.VersionScheme; public class PatternExclusionsDependencyFilterTest { @Test public void acceptTestCornerCases() { NodeBuilder builder = new NodeBuilder(); builder.artifactId( "testArtifact" ); DependencyNode node = builder.build(); List parents = new LinkedList(); // Empty String, Empty List assertTrue( dontAccept( node, "" ) ); assertTrue( new PatternExclusionsDependencyFilter( new LinkedList() ).accept( node, parents ) ); assertTrue( new PatternExclusionsDependencyFilter( (String[]) null ).accept( node, parents ) ); assertTrue( new PatternExclusionsDependencyFilter( (VersionScheme) null, "[1,10]" ).accept( node, parents ) ); } @Test public void acceptTestMatches() { NodeBuilder builder = new NodeBuilder(); builder.groupId( "com.example.test" ).artifactId( "testArtifact" ).ext( "jar" ).version( "1.0.3" ); DependencyNode node = builder.build(); // full match assertEquals( "com.example.test:testArtifact:jar:1.0.3", true, dontAccept( node, "com.example.test:testArtifact:jar:1.0.3" ) ); // single wildcard assertEquals( "*:testArtifact:jar:1.0.3", true, dontAccept( node, "*:testArtifact:jar:1.0.3" ) ); assertEquals( "com.example.test:*:jar:1.0.3", true, dontAccept( node, "com.example.test:*:jar:1.0.3" ) ); assertEquals( "com.example.test:testArtifact:*:1.0.3", true, dontAccept( node, "com.example.test:testArtifact:*:1.0.3" ) ); assertEquals( "com.example.test:testArtifact:*:1.0.3", true, dontAccept( node, "com.example.test:testArtifact:*:1.0.3" ) ); // implicit wildcard assertEquals( ":testArtifact:jar:1.0.3", true, dontAccept( node, ":testArtifact:jar:1.0.3" ) ); assertEquals( "com.example.test::jar:1.0.3", true, dontAccept( node, "com.example.test::jar:1.0.3" ) ); assertEquals( "com.example.test:testArtifact::1.0.3", true, dontAccept( node, "com.example.test:testArtifact::1.0.3" ) ); assertEquals( "com.example.test:testArtifact:jar:", true, dontAccept( node, "com.example.test:testArtifact:jar:" ) ); // multi wildcards assertEquals( "*:*:jar:1.0.3", true, dontAccept( node, "*:*:jar:1.0.3" ) ); assertEquals( "com.example.test:*:*:1.0.3", true, dontAccept( node, "com.example.test:*:*:1.0.3" ) ); assertEquals( "com.example.test:testArtifact:*:*", true, dontAccept( node, "com.example.test:testArtifact:*:*" ) ); assertEquals( "*:testArtifact:jar:*", true, dontAccept( node, "*:testArtifact:jar:*" ) ); assertEquals( "*:*:jar:*", true, dontAccept( node, "*:*:jar:*" ) ); assertEquals( ":*:jar:", true, dontAccept( node, ":*:jar:" ) ); // partial wildcards assertEquals( "*.example.test:testArtifact:jar:1.0.3", true, dontAccept( node, "*.example.test:testArtifact:jar:1.0.3" ) ); assertEquals( "com.example.test:testArtifact:*ar:1.0.*", true, dontAccept( node, "com.example.test:testArtifact:*ar:1.0.*" ) ); assertEquals( "com.example.test:testArtifact:jar:1.0.*", true, dontAccept( node, "com.example.test:testArtifact:jar:1.0.*" ) ); assertEquals( "*.example.*:testArtifact:jar:1.0.3", true, dontAccept( node, "*.example.*:testArtifact:jar:1.0.3" ) ); // wildcard as empty string assertEquals( "com.example.test*:testArtifact:jar:1.0.3", true, dontAccept( node, "com.example.test*:testArtifact:jar:1.0.3" ) ); } @Test public void acceptTestLessToken() { NodeBuilder builder = new NodeBuilder(); builder.groupId( "com.example.test" ).artifactId( "testArtifact" ).ext( "jar" ).version( "1.0.3" ); DependencyNode node = builder.build(); assertEquals( "com.example.test:testArtifact:jar", true, dontAccept( node, "com.example.test:testArtifact:jar" ) ); assertEquals( "com.example.test:testArtifact", true, dontAccept( node, "com.example.test:testArtifact" ) ); assertEquals( "com.example.test", true, dontAccept( node, "com.example.test" ) ); assertEquals( "com.example.foo", false, dontAccept( node, "com.example.foo" ) ); } @Test public void acceptTestMissmatch() { NodeBuilder builder = new NodeBuilder(); builder.groupId( "com.example.test" ).artifactId( "testArtifact" ).ext( "jar" ).version( "1.0.3" ); DependencyNode node = builder.build(); assertEquals( "OTHER.GROUP.ID:testArtifact:jar:1.0.3", false, dontAccept( node, "OTHER.GROUP.ID:testArtifact:jar:1.0.3" ) ); assertEquals( "com.example.test:OTHER_ARTIFACT:jar:1.0.3", false, dontAccept( node, "com.example.test:OTHER_ARTIFACT:jar:1.0.3" ) ); assertEquals( "com.example.test:OTHER_ARTIFACT:jar:1.0.3", false, dontAccept( node, "com.example.test:OTHER_ARTIFACT:jar:1.0.3" ) ); assertEquals( "com.example.test:testArtifact:WAR:1.0.3", false, dontAccept( node, "com.example.test:testArtifact:WAR:1.0.3" ) ); assertEquals( "com.example.test:testArtifact:jar:SNAPSHOT", false, dontAccept( node, "com.example.test:testArtifact:jar:SNAPSHOT" ) ); assertEquals( "*:*:war:*", false, dontAccept( node, "*:*:war:*" ) ); assertEquals( "OTHER.GROUP.ID", false, dontAccept( node, "OTHER.GROUP.ID" ) ); } @Test public void acceptTestMoreToken() { NodeBuilder builder = new NodeBuilder(); builder.groupId( "com.example.test" ).artifactId( "testArtifact" ).ext( "jar" ).version( "1.0.3" ); DependencyNode node = builder.build(); assertEquals( "com.example.test:testArtifact:jar:1.0.3:foo", false, dontAccept( node, "com.example.test:testArtifact:jar:1.0.3:foo" ) ); } @Test public void acceptTestRange() { NodeBuilder builder = new NodeBuilder(); builder.groupId( "com.example.test" ).artifactId( "testArtifact" ).ext( "jar" ).version( "1.0.3" ); DependencyNode node = builder.build(); String prefix = "com.example.test:testArtifact:jar:"; assertTrue( prefix + "[1.0.3,1.0.4)", dontAcceptVersionRange( node, prefix + "[1.0.3,1.0.4)" ) ); assertTrue( prefix + "[1.0.3,)", dontAcceptVersionRange( node, prefix + "[1.0.3,)" ) ); assertTrue( prefix + "[1.0.3,]", dontAcceptVersionRange( node, prefix + "[1.0.3,]" ) ); assertTrue( prefix + "(,1.0.3]", dontAcceptVersionRange( node, prefix + "(,1.0.3]" ) ); assertTrue( prefix + "[1.0,]", dontAcceptVersionRange( node, prefix + "[1.0,]" ) ); assertTrue( prefix + "[1,4]", dontAcceptVersionRange( node, prefix + "[1,4]" ) ); assertTrue( prefix + "(1,4)", dontAcceptVersionRange( node, prefix + "(1,4)" ) ); assertTrue( prefix + "(1.0.2,1.0.3]", dontAcceptVersionRange( node, prefix + "(1.0.2,1.0.3]", prefix + "(1.1,)" ) ); assertFalse( prefix + "(1.0.3,2.0]", dontAcceptVersionRange( node, prefix + "(1.0.3,2.0]" ) ); assertFalse( prefix + "(1,1.0.2]", dontAcceptVersionRange( node, prefix + "(1,1.0.2]" ) ); assertFalse( prefix + "(1.0.2,1.0.3)", dontAcceptVersionRange( node, prefix + "(1.0.2,1.0.3)", prefix + "(1.0.3,)" ) ); } private boolean dontAccept( DependencyNode node, String expression ) { return !new PatternExclusionsDependencyFilter( expression ).accept( node, new LinkedList() ); } private boolean dontAcceptVersionRange( DependencyNode node, String... expression ) { return !new PatternExclusionsDependencyFilter( new GenericVersionScheme(), expression ).accept( node, new LinkedList() ); } } PatternInclusionsDependencyFilterTest.java000066400000000000000000000203661167050556700364220ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/filterpackage org.sonatype.aether.util.filter; /******************************************************************************* * 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 static org.junit.Assert.*; import java.util.LinkedList; import java.util.List; import org.junit.Test; import org.sonatype.aether.graph.DependencyNode; import org.sonatype.aether.test.util.NodeBuilder; import org.sonatype.aether.util.version.GenericVersionScheme; import org.sonatype.aether.version.VersionScheme; public class PatternInclusionsDependencyFilterTest extends AbstractDependencyFilterTest { @Test public void acceptTestCornerCases() { NodeBuilder builder = new NodeBuilder(); builder.artifactId( "testArtifact" ); DependencyNode node = builder.build(); List parents = new LinkedList(); // Empty String, Empty List assertTrue( accept( node, "" ) ); assertFalse( new PatternInclusionsDependencyFilter( new LinkedList() ).accept( node, parents ) ); assertFalse( new PatternInclusionsDependencyFilter( (String[]) null ).accept( node, parents ) ); assertFalse( new PatternInclusionsDependencyFilter( (VersionScheme) null, "[1,10]" ).accept( node, parents ) ); } @Test public void acceptTestMatches() { NodeBuilder builder = new NodeBuilder(); builder.groupId( "com.example.test" ).artifactId( "testArtifact" ).ext( "jar" ).version( "1.0.3" ); DependencyNode node = builder.build(); // full match assertEquals( "com.example.test:testArtifact:jar:1.0.3", true, accept( node, "com.example.test:testArtifact:jar:1.0.3" ) ); // single wildcard assertEquals( "*:testArtifact:jar:1.0.3", true, accept( node, "*:testArtifact:jar:1.0.3" ) ); assertEquals( "com.example.test:*:jar:1.0.3", true, accept( node, "com.example.test:*:jar:1.0.3" ) ); assertEquals( "com.example.test:testArtifact:*:1.0.3", true, accept( node, "com.example.test:testArtifact:*:1.0.3" ) ); assertEquals( "com.example.test:testArtifact:*:1.0.3", true, accept( node, "com.example.test:testArtifact:*:1.0.3" ) ); // implicit wildcard assertEquals( ":testArtifact:jar:1.0.3", true, accept( node, ":testArtifact:jar:1.0.3" ) ); assertEquals( "com.example.test::jar:1.0.3", true, accept( node, "com.example.test::jar:1.0.3" ) ); assertEquals( "com.example.test:testArtifact::1.0.3", true, accept( node, "com.example.test:testArtifact::1.0.3" ) ); assertEquals( "com.example.test:testArtifact:jar:", true, accept( node, "com.example.test:testArtifact:jar:" ) ); // multi wildcards assertEquals( "*:*:jar:1.0.3", true, accept( node, "*:*:jar:1.0.3" ) ); assertEquals( "com.example.test:*:*:1.0.3", true, accept( node, "com.example.test:*:*:1.0.3" ) ); assertEquals( "com.example.test:testArtifact:*:*", true, accept( node, "com.example.test:testArtifact:*:*" ) ); assertEquals( "*:testArtifact:jar:*", true, accept( node, "*:testArtifact:jar:*" ) ); assertEquals( "*:*:jar:*", true, accept( node, "*:*:jar:*" ) ); assertEquals( ":*:jar:", true, accept( node, ":*:jar:" ) ); // partial wildcards assertEquals( "*.example.test:testArtifact:jar:1.0.3", true, accept( node, "*.example.test:testArtifact:jar:1.0.3" ) ); assertEquals( "com.example.test:testArtifact:*ar:1.0.*", true, accept( node, "com.example.test:testArtifact:*ar:1.0.*" ) ); assertEquals( "com.example.test:testArtifact:jar:1.0.*", true, accept( node, "com.example.test:testArtifact:jar:1.0.*" ) ); assertEquals( "*.example.*:testArtifact:jar:1.0.3", true, accept( node, "*.example.*:testArtifact:jar:1.0.3" ) ); // wildcard as empty string assertEquals( "com.example.test*:testArtifact:jar:1.0.3", true, accept( node, "com.example.test*:testArtifact:jar:1.0.3" ) ); } @Test public void acceptTestLessToken() { NodeBuilder builder = new NodeBuilder(); builder.groupId( "com.example.test" ).artifactId( "testArtifact" ).ext( "jar" ).version( "1.0.3" ); DependencyNode node = builder.build(); assertEquals( "com.example.test:testArtifact:jar", true, accept( node, "com.example.test:testArtifact:jar" ) ); assertEquals( "com.example.test:testArtifact", true, accept( node, "com.example.test:testArtifact" ) ); assertEquals( "com.example.test", true, accept( node, "com.example.test" ) ); assertEquals( "com.example.foo", false, accept( node, "com.example.foo" ) ); } @Test public void acceptTestMissmatch() { NodeBuilder builder = new NodeBuilder(); builder.groupId( "com.example.test" ).artifactId( "testArtifact" ).ext( "jar" ).version( "1.0.3" ); DependencyNode node = builder.build(); assertEquals( "OTHER.GROUP.ID:testArtifact:jar:1.0.3", false, accept( node, "OTHER.GROUP.ID:testArtifact:jar:1.0.3" ) ); assertEquals( "com.example.test:OTHER_ARTIFACT:jar:1.0.3", false, accept( node, "com.example.test:OTHER_ARTIFACT:jar:1.0.3" ) ); assertEquals( "com.example.test:OTHER_ARTIFACT:jar:1.0.3", false, accept( node, "com.example.test:OTHER_ARTIFACT:jar:1.0.3" ) ); assertEquals( "com.example.test:testArtifact:WAR:1.0.3", false, accept( node, "com.example.test:testArtifact:WAR:1.0.3" ) ); assertEquals( "com.example.test:testArtifact:jar:SNAPSHOT", false, accept( node, "com.example.test:testArtifact:jar:SNAPSHOT" ) ); assertEquals( "*:*:war:*", false, accept( node, "*:*:war:*" ) ); assertEquals( "OTHER.GROUP.ID", false, accept( node, "OTHER.GROUP.ID" ) ); } @Test public void acceptTestMoreToken() { NodeBuilder builder = new NodeBuilder(); builder.groupId( "com.example.test" ).artifactId( "testArtifact" ).ext( "jar" ).version( "1.0.3" ); DependencyNode node = builder.build(); assertEquals( "com.example.test:testArtifact:jar:1.0.3:foo", false, accept( node, "com.example.test:testArtifact:jar:1.0.3:foo" ) ); } @Test public void acceptTestRange() { NodeBuilder builder = new NodeBuilder(); builder.groupId( "com.example.test" ).artifactId( "testArtifact" ).ext( "jar" ).version( "1.0.3" ); DependencyNode node = builder.build(); String prefix = "com.example.test:testArtifact:jar:"; assertTrue( prefix + "[1.0.3,1.0.4)", acceptVersionRange( node, prefix + "[1.0.3,1.0.4)" ) ); assertTrue( prefix + "[1.0.3,)", acceptVersionRange( node, prefix + "[1.0.3,)" ) ); assertTrue( prefix + "[1.0.3,]", acceptVersionRange( node, prefix + "[1.0.3,]" ) ); assertTrue( prefix + "(,1.0.3]", acceptVersionRange( node, prefix + "(,1.0.3]" ) ); assertTrue( prefix + "[1.0,]", acceptVersionRange( node, prefix + "[1.0,]" ) ); assertTrue( prefix + "[1,4]", acceptVersionRange( node, prefix + "[1,4]" ) ); assertTrue( prefix + "(1,4)", acceptVersionRange( node, prefix + "(1,4)" ) ); assertTrue( prefix + "(1.0.2,1.0.3]", acceptVersionRange( node, prefix + "(1.0.2,1.0.3]", prefix + "(1.1,)" ) ); assertFalse( prefix + "(1.0.3,2.0]", acceptVersionRange( node, prefix + "(1.0.3,2.0]" ) ); assertFalse( prefix + "(1,1.0.2]", acceptVersionRange( node, prefix + "(1,1.0.2]" ) ); assertFalse( prefix + "(1.0.2,1.0.3)", acceptVersionRange( node, prefix + "(1.0.2,1.0.3)", prefix + "(1.0.3,)" ) ); } public boolean accept( DependencyNode node, String expression ) { return new PatternInclusionsDependencyFilter( expression ).accept( node, new LinkedList() ); } public boolean acceptVersionRange( DependencyNode node, String... expression ) { return new PatternInclusionsDependencyFilter( new GenericVersionScheme(), expression ).accept( node, new LinkedList() ); } } ScopeDependencyFilterTest.java000066400000000000000000000045151167050556700340050ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/filterpackage org.sonatype.aether.util.filter; /******************************************************************************* * 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 static org.junit.Assert.*; import java.util.Arrays; import java.util.LinkedList; import java.util.List; import org.junit.Test; import org.sonatype.aether.graph.DependencyNode; import org.sonatype.aether.test.util.NodeBuilder; public class ScopeDependencyFilterTest extends AbstractDependencyFilterTest { @Test public void acceptTest() { NodeBuilder builder = new NodeBuilder(); builder.scope( "compile" ).artifactId( "test" ); List parents = new LinkedList(); // null or empty assertTrue( new ScopeDependencyFilter( null, null ).accept( builder.build(), parents ) ); assertTrue( new ScopeDependencyFilter( new LinkedList(), new LinkedList() ).accept( builder.build(), parents ) ); assertTrue( new ScopeDependencyFilter( (String[]) null ).accept( builder.build(), parents ) ); //only excludes assertTrue( new ScopeDependencyFilter( "test" ).accept( builder.build(), parents )); assertFalse( new ScopeDependencyFilter( "compile" ).accept( builder.build(), parents )); assertFalse( new ScopeDependencyFilter( "compile", "test" ).accept( builder.build(), parents )); //Both String[] excludes1 = {"provided"}; String[] includes1 = {"compile","test"}; assertTrue( new ScopeDependencyFilter( Arrays.asList( includes1 ), Arrays.asList( excludes1 ) ).accept( builder.build() , parents )); assertTrue( new ScopeDependencyFilter( Arrays.asList( includes1 ), null ).accept( builder.build() , parents )); //exclude wins String[] excludes2 = {"compile"}; String[] includes2 = {"compile"}; assertFalse( new ScopeDependencyFilter( Arrays.asList( includes2 ), Arrays.asList( excludes2 ) ).accept( builder.build() , parents )); } } aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/graph/000077500000000000000000000000001167050556700257525ustar00rootroot00000000000000FilteringDependencyVisitorTest.java000066400000000000000000000034631167050556700347060ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/graphpackage org.sonatype.aether.util.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 static org.junit.Assert.*; import java.util.List; import org.junit.Test; import org.sonatype.aether.graph.DependencyFilter; import org.sonatype.aether.graph.DependencyNode; import org.sonatype.aether.test.util.DependencyGraphParser; public class FilteringDependencyVisitorTest { private DependencyNode parse( String resource ) throws Exception { return new DependencyGraphParser( "visitor/filtering/" ).parse( resource ); } @Test public void testFilterCalledWithProperParentStack() throws Exception { DependencyNode root = parse( "parents.txt" ); final StringBuilder buffer = new StringBuilder( 256 ); DependencyFilter filter = new DependencyFilter() { public boolean accept( DependencyNode node, List parents ) { for ( DependencyNode parent : parents ) { buffer.append( parent.getDependency().getArtifact().getArtifactId() ); } buffer.append( "," ); return false; } }; FilteringDependencyVisitor visitor = new FilteringDependencyVisitor( new PreorderNodeListGenerator(), filter ); root.accept( visitor ); assertEquals( ",a,ba,cba,a,ea,", buffer.toString() ); } } PathRecordingDependencyVisitorTest.java000066400000000000000000000100731167050556700355070ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/graphpackage org.sonatype.aether.util.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 static org.junit.Assert.*; import java.util.List; import org.junit.Test; import org.sonatype.aether.graph.DependencyFilter; import org.sonatype.aether.graph.DependencyNode; import org.sonatype.aether.test.util.DependencyGraphParser; public class PathRecordingDependencyVisitorTest { private DependencyNode parse( String resource ) throws Exception { return new DependencyGraphParser( "visitor/path-recorder/" ).parse( resource ); } private void assertPath( List actual, String... expected ) { assertEquals( actual.toString(), expected.length, actual.size() ); for ( int i = 0; i < expected.length; i++ ) { DependencyNode node = actual.get( i ); assertEquals( actual.toString(), expected[i], node.getDependency().getArtifact().getArtifactId() ); } } @Test public void testGetPaths_RecordsMatchesBeneathUnmatchedParents() throws Exception { DependencyNode root = parse( "simple.txt" ); PathRecordingDependencyVisitor visitor = new PathRecordingDependencyVisitor( new ArtifactMatcher() ); root.accept( visitor ); List> paths = visitor.getPaths(); assertEquals( paths.toString(), 2, paths.size() ); assertPath( paths.get( 0 ), "a", "b", "x" ); assertPath( paths.get( 1 ), "a", "x" ); } @Test public void testGetPaths_DoesNotRecordMatchesBeneathMatchedParents() throws Exception { DependencyNode root = parse( "nested.txt" ); PathRecordingDependencyVisitor visitor = new PathRecordingDependencyVisitor( new ArtifactMatcher() ); root.accept( visitor ); List> paths = visitor.getPaths(); assertEquals( paths.toString(), 1, paths.size() ); assertPath( paths.get( 0 ), "x" ); } @Test public void testGetPaths_RecordsMatchesBeneathMatchedParentsIfRequested() throws Exception { DependencyNode root = parse( "nested.txt" ); PathRecordingDependencyVisitor visitor = new PathRecordingDependencyVisitor( new ArtifactMatcher(), false ); root.accept( visitor ); List> paths = visitor.getPaths(); assertEquals( paths.toString(), 3, paths.size() ); assertPath( paths.get( 0 ), "x" ); assertPath( paths.get( 1 ), "x", "a", "y" ); assertPath( paths.get( 2 ), "x", "y" ); } @Test public void testFilterCalledWithProperParentStack() throws Exception { DependencyNode root = parse( "parents.txt" ); final StringBuilder buffer = new StringBuilder( 256 ); DependencyFilter filter = new DependencyFilter() { public boolean accept( DependencyNode node, List parents ) { for ( DependencyNode parent : parents ) { buffer.append( parent.getDependency().getArtifact().getArtifactId() ); } buffer.append( "," ); return false; } }; PathRecordingDependencyVisitor visitor = new PathRecordingDependencyVisitor( filter ); root.accept( visitor ); assertEquals( ",a,ba,cba,a,ea,", buffer.toString() ); } private static class ArtifactMatcher implements DependencyFilter { public boolean accept( DependencyNode node, List parents ) { return node.getDependency() != null && node.getDependency().getArtifact().getGroupId().equals( "match" ); } } } PostorderNodeListGeneratorTest.java000066400000000000000000000036531167050556700346770ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/graphpackage org.sonatype.aether.util.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 static org.junit.Assert.*; import java.util.List; import org.junit.Test; import org.sonatype.aether.graph.DependencyNode; import org.sonatype.aether.test.util.DependencyGraphParser; public class PostorderNodeListGeneratorTest { private DependencyNode parse( String resource ) throws Exception { return new DependencyGraphParser( "visitor/ordered-list/" ).parse( resource ); } private void assertSequence( List actual, String... expected ) { assertEquals( actual.toString(), expected.length, actual.size() ); for ( int i = 0; i < expected.length; i++ ) { DependencyNode node = actual.get( i ); assertEquals( actual.toString(), expected[i], node.getDependency().getArtifact().getArtifactId() ); } } @Test public void testOrdering() throws Exception { DependencyNode root = parse( "simple.txt" ); PostorderNodeListGenerator visitor = new PostorderNodeListGenerator(); root.accept( visitor ); assertSequence( visitor.getNodes(), "c", "b", "e", "d", "a" ); } @Test public void testDuplicateSuppression() throws Exception { DependencyNode root = parse( "cycles.txt" ); PostorderNodeListGenerator visitor = new PostorderNodeListGenerator(); root.accept( visitor ); assertSequence( visitor.getNodes(), "c", "b", "e", "d", "a" ); } } PreorderNodeListGeneratorTest.java000066400000000000000000000036461167050556700345020ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/graphpackage org.sonatype.aether.util.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 static org.junit.Assert.*; import java.util.List; import org.junit.Test; import org.sonatype.aether.graph.DependencyNode; import org.sonatype.aether.test.util.DependencyGraphParser; public class PreorderNodeListGeneratorTest { private DependencyNode parse( String resource ) throws Exception { return new DependencyGraphParser( "visitor/ordered-list/" ).parse( resource ); } private void assertSequence( List actual, String... expected ) { assertEquals( actual.toString(), expected.length, actual.size() ); for ( int i = 0; i < expected.length; i++ ) { DependencyNode node = actual.get( i ); assertEquals( actual.toString(), expected[i], node.getDependency().getArtifact().getArtifactId() ); } } @Test public void testOrdering() throws Exception { DependencyNode root = parse( "simple.txt" ); PreorderNodeListGenerator visitor = new PreorderNodeListGenerator(); root.accept( visitor ); assertSequence( visitor.getNodes(), "a", "b", "c", "d", "e" ); } @Test public void testDuplicateSuppression() throws Exception { DependencyNode root = parse( "cycles.txt" ); PreorderNodeListGenerator visitor = new PreorderNodeListGenerator(); root.accept( visitor ); assertSequence( visitor.getNodes(), "a", "b", "c", "d", "e" ); } } TreeDependencyVisitorTest.java000066400000000000000000000035351167050556700336620ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/graphpackage org.sonatype.aether.util.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 static org.junit.Assert.*; import org.junit.Test; import org.sonatype.aether.graph.DependencyNode; import org.sonatype.aether.graph.DependencyVisitor; import org.sonatype.aether.test.util.DependencyGraphParser; public class TreeDependencyVisitorTest { private DependencyNode parse( String resource ) throws Exception { return new DependencyGraphParser( "visitor/tree/" ).parse( resource ); } @Test public void testDuplicateSuppression() throws Exception { DependencyNode root = parse( "cycles.txt" ); RecordingVisitor rec = new RecordingVisitor(); TreeDependencyVisitor visitor = new TreeDependencyVisitor( rec ); root.accept( visitor ); assertEquals( ">a >b >c d ' ).append( node.getDependency().getArtifact().getArtifactId() ).append( ' ' ); return true; } public boolean visitLeave( DependencyNode node ) { buffer.append( '<' ).append( node.getDependency().getArtifact().getArtifactId() ).append( ' ' ); return true; } } } aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/graph/transformer/000077500000000000000000000000001167050556700303145ustar00rootroot00000000000000AbstractDependencyGraphTransformerTest.java000066400000000000000000000043241167050556700407120ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/graph/transformerpackage org.sonatype.aether.util.graph.transformer; /******************************************************************************* * 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.LinkedList; import java.util.List; import org.junit.After; import org.junit.Before; import org.sonatype.aether.collection.DependencyGraphTransformationContext; import org.sonatype.aether.graph.DependencyNode; import org.sonatype.aether.test.util.NodeBuilder; /** * @author Benjamin Bentmann */ public abstract class AbstractDependencyGraphTransformerTest { protected NodeBuilder builder; protected DependencyGraphTransformationContext context; protected DependencyGraphTransformationContext newContext() { return new SimpleDependencyGraphTransformationContext(); } protected List find( DependencyNode node, String id ) { LinkedList trail = new LinkedList(); find( trail, node, id ); return trail; } private boolean find( LinkedList trail, DependencyNode node, String id ) { trail.addFirst( node ); if ( isMatch( node, id ) ) { return true; } for ( DependencyNode child : node.getChildren() ) { if ( find( trail, child, id ) ) { return true; } } trail.removeFirst(); return false; } private boolean isMatch( DependencyNode node, String id ) { if ( node.getDependency() == null ) { return false; } return id.equals( node.getDependency().getArtifact().getArtifactId() ); } @Before public void setUp() { builder = new NodeBuilder(); context = newContext(); } @After public void tearDown() { builder = null; context = null; } } ConflictIdSorterTest.java000066400000000000000000000070111167050556700351540ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/graph/transformerpackage org.sonatype.aether.util.graph.transformer; /******************************************************************************* * 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 static org.junit.Assert.*; import java.util.LinkedList; import java.util.List; import java.util.Queue; import org.junit.Before; import org.junit.Test; import org.sonatype.aether.collection.DependencyGraphTransformationContext; import org.sonatype.aether.graph.DependencyNode; import org.sonatype.aether.test.util.DependencyGraphParser; /** * @author Benjamin Hanzelmann */ public class ConflictIdSorterTest { private ConflictIdSorter sorter; private DependencyGraphTransformationContext ctx; private DependencyGraphParser parser; @Before public void setup() { sorter = new ConflictIdSorter(); ctx = new SimpleDependencyGraphTransformationContext(); parser = new DependencyGraphParser( "transformer/conflict-id-sorter/" ); } private void expectOrder( List sorted, String... ids ) { Queue queue = new LinkedList( sorted ); for ( int i = 0; i < ids.length; i++ ) { String item = queue.poll(); assertNotNull( String.format( "not enough conflict groups (no match for '%s'", ids[i] ), item ); if ( !"*".equals( ids[i] ) ) { assertEquals( ids[i], item ); } } assertTrue( String.format( "leftover conflict groups (remaining: '%s')", queue ), queue.isEmpty() ); } private void expectOrder( String... id ) { @SuppressWarnings( "unchecked" ) List sorted = (List) ctx.get( TransformationContextKeys.SORTED_CONFLICT_IDS ); expectOrder( sorted, id ); } private void expectCycle( boolean cycle ) { assertEquals( Boolean.valueOf( cycle ), ctx.get( TransformationContextKeys.CYCLIC_CONFLICT_IDS ) ); } public DependencyNode transform( DependencyNode node ) throws Exception { node = new SimpleConflictMarker().transformGraph( node, ctx ); node = sorter.transformGraph( node, ctx ); return node; } @Test public void testSimple() throws Exception { DependencyNode node = parser.parse( "simple.txt" ); transform( node ); expectOrder( "gid2:aid::ext", "gid:aid::ext", "gid:aid2::ext" ); expectCycle( false ); } @Test public void testCycle() throws Exception { DependencyNode node = parser.parse( "cycle.txt" ); transform( node ); expectOrder( "gid:aid::ext", "gid2:aid::ext" ); expectCycle( true ); } @Test public void testCycles() throws Exception { DependencyNode node = parser.parse( "cycles.txt" ); transform( node ); expectOrder( "*", "*", "*", "gid:aid::ext" ); expectCycle( true ); } @Test public void testNoConflicts() throws Exception { DependencyNode node = parser.parse( "no-conflicts.txt" ); transform( node ); expectOrder( "gid:aid::ext", "gid3:aid::ext", "gid2:aid::ext", "gid4:aid::ext" ); expectCycle( false ); } } ConflictMarkerTest.java000066400000000000000000000114521167050556700346460ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/graph/transformerpackage org.sonatype.aether.util.graph.transformer; /******************************************************************************* * 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 static org.junit.Assert.*; import java.util.Map; import org.junit.Test; import org.sonatype.aether.collection.DependencyGraphTransformationContext; import org.sonatype.aether.graph.DependencyNode; import org.sonatype.aether.test.util.NodeBuilder; import org.sonatype.aether.util.graph.transformer.ConflictMarker; /** * @author Benjamin Bentmann */ public class ConflictMarkerTest { private DependencyGraphTransformationContext newContext() { return new SimpleDependencyGraphTransformationContext(); } @Test public void testSimple() throws Exception { NodeBuilder builder = new NodeBuilder(); DependencyNode root = builder.build(); root.getChildren().add( builder.artifactId( "a" ).build() ); root.getChildren().add( builder.artifactId( "b" ).build() ); DependencyGraphTransformationContext context = newContext(); assertSame( root, new ConflictMarker().transformGraph( root, context ) ); Map ids = (Map) context.get( TransformationContextKeys.CONFLICT_IDS ); assertNotNull( ids ); assertNull( ids.get( root ) ); assertNotNull( ids.get( root.getChildren().get( 0 ) ) ); assertNotNull( ids.get( root.getChildren().get( 1 ) ) ); assertNotSame( ids.get( root.getChildren().get( 0 ) ), ids.get( root.getChildren().get( 1 ) ) ); assertFalse( ids.get( root.getChildren().get( 0 ) ).equals( ids.get( root.getChildren().get( 1 ) ) ) ); } @Test public void testRelocation1() throws Exception { NodeBuilder builder = new NodeBuilder(); DependencyNode root = builder.build(); root.getChildren().add( builder.artifactId( "a" ).build() ); root.getChildren().add( builder.artifactId( "a" ).reloc( "reloc" ).build() ); DependencyGraphTransformationContext context = newContext(); assertSame( root, new ConflictMarker().transformGraph( root, context ) ); Map ids = (Map) context.get( TransformationContextKeys.CONFLICT_IDS ); assertNotNull( ids ); assertNull( ids.get( root ) ); assertNotNull( ids.get( root.getChildren().get( 0 ) ) ); assertNotNull( ids.get( root.getChildren().get( 1 ) ) ); assertSame( ids.get( root.getChildren().get( 0 ) ), ids.get( root.getChildren().get( 1 ) ) ); } @Test public void testRelocation2() throws Exception { NodeBuilder builder = new NodeBuilder(); DependencyNode root = builder.build(); root.getChildren().add( builder.artifactId( "a" ).reloc( "reloc" ).build() ); root.getChildren().add( builder.artifactId( "a" ).build() ); DependencyGraphTransformationContext context = newContext(); assertSame( root, new ConflictMarker().transformGraph( root, context ) ); Map ids = (Map) context.get( TransformationContextKeys.CONFLICT_IDS ); assertNotNull( ids ); assertNull( ids.get( root ) ); assertNotNull( ids.get( root.getChildren().get( 0 ) ) ); assertNotNull( ids.get( root.getChildren().get( 1 ) ) ); assertSame( ids.get( root.getChildren().get( 0 ) ), ids.get( root.getChildren().get( 1 ) ) ); } @Test public void testRelocation3() throws Exception { NodeBuilder builder = new NodeBuilder(); DependencyNode root = builder.build(); root.getChildren().add( builder.artifactId( "a" ).build() ); root.getChildren().add( builder.artifactId( "b" ).build() ); root.getChildren().add( builder.artifactId( "c" ).reloc( "a" ).reloc( "b" ).build() ); DependencyGraphTransformationContext context = newContext(); assertSame( root, new ConflictMarker().transformGraph( root, context ) ); Map ids = (Map) context.get( TransformationContextKeys.CONFLICT_IDS ); assertNotNull( ids ); assertNull( ids.get( root ) ); assertNotNull( ids.get( root.getChildren().get( 0 ) ) ); assertNotNull( ids.get( root.getChildren().get( 1 ) ) ); assertNotNull( ids.get( root.getChildren().get( 2 ) ) ); assertSame( ids.get( root.getChildren().get( 0 ) ), ids.get( root.getChildren().get( 1 ) ) ); assertSame( ids.get( root.getChildren().get( 1 ) ), ids.get( root.getChildren().get( 2 ) ) ); } } JavaDependencyContextRefinerTest.java000066400000000000000000000073161167050556700375070ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/graph/transformerpackage org.sonatype.aether.util.graph.transformer; /******************************************************************************* * 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 static org.junit.Assert.*; import java.io.IOException; import org.junit.Before; import org.junit.Test; import org.sonatype.aether.RepositoryException; import org.sonatype.aether.graph.DependencyNode; import org.sonatype.aether.test.util.DependencyGraphParser; /** * @author Benjamin Hanzelmann * */ public class JavaDependencyContextRefinerTest { private JavaDependencyContextRefiner refiner; private DependencyGraphParser parser; private SimpleDependencyGraphTransformationContext context; @Before public void setUp() { refiner = new JavaDependencyContextRefiner(); parser = new DependencyGraphParser(); context = new SimpleDependencyGraphTransformationContext(); } @Test public void testDoNotRefineOtherContext() throws IOException, RepositoryException { DependencyNode node = parser.parseLiteral( "gid:aid:ext:cls:ver" ); node.setRequestContext( "otherContext" ); DependencyNode refinedNode = refiner.transformGraph( node, context ); assertEquals( node, refinedNode ); } @Test public void testRefineToCompile() throws IOException, RepositoryException { String expected = "project/compile"; DependencyNode node = parser.parseLiteral( "gid:aid:ext:ver:compile" ); node.setRequestContext( "project" ); DependencyNode refinedNode = refiner.transformGraph( node, context ); assertEquals( expected, refinedNode.getRequestContext() ); node = parser.parseLiteral( "gid:aid:ext:ver:system" ); node.setRequestContext( "project" ); refinedNode = refiner.transformGraph( node, context ); assertEquals( expected, refinedNode.getRequestContext() ); node = parser.parseLiteral( "gid:aid:ext:ver:provided" ); node.setRequestContext( "project" ); refinedNode = refiner.transformGraph( node, context ); assertEquals( expected, refinedNode.getRequestContext() ); } @Test public void testRefineToTest() throws IOException, RepositoryException { String expected = "project/test"; DependencyNode node = parser.parseLiteral( "gid:aid:ext:ver:test" ); node.setRequestContext( "project" ); DependencyNode refinedNode = refiner.transformGraph( node, context ); assertEquals( expected, refinedNode.getRequestContext() ); } @Test public void testRefineToRuntime() throws IOException, RepositoryException { String expected = "project/runtime"; DependencyNode node = parser.parseLiteral( "gid:aid:ext:ver:runtime" ); node.setRequestContext( "project" ); DependencyNode refinedNode = refiner.transformGraph( node, context ); assertEquals( expected, refinedNode.getRequestContext() ); } @Test public void testDoNotRefineUnknownScopes() throws IOException, RepositoryException { String expected = "project"; DependencyNode node = parser.parseLiteral( "gid:aid:ext:ver:unknownScope" ); node.setRequestContext( "project" ); DependencyNode refinedNode = refiner.transformGraph( node, context ); assertEquals( expected, refinedNode.getRequestContext() ); } } JavaEffectiveScopeCalculatorTest.java000066400000000000000000000214331167050556700374510ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/graph/transformerpackage org.sonatype.aether.util.graph.transformer; /******************************************************************************* * 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 static org.junit.Assert.*; import java.io.IOException; import java.util.Arrays; import java.util.Locale; import org.junit.Before; import org.junit.Test; import org.sonatype.aether.RepositoryException; import org.sonatype.aether.graph.DependencyNode; import org.sonatype.aether.test.util.DependencyGraphParser; public class JavaEffectiveScopeCalculatorTest { private DependencyGraphParser parser; private SimpleDependencyGraphTransformationContext ctx; private enum Scope { TEST, PROVIDED, RUNTIME, COMPILE; @Override public String toString() { return super.name().toLowerCase( Locale.ENGLISH ); } } @Before public void setup() { parser = new DependencyGraphParser( "transformer/scope-calculator/" ); ctx = new SimpleDependencyGraphTransformationContext(); } private DependencyNode parse( String name, String... substitutions ) throws IOException { parser.setSubstitutions( Arrays.asList( substitutions ) ); return parser.parse( name ); } private void expectScope( String expected, DependencyNode root, int... coords ) { expectScope( null, expected, root, coords ); } private void expectScope( String msg, String expected, DependencyNode root, int... coords ) { if ( msg == null ) { msg = ""; } try { DependencyNode node = root; node = path( node, coords ); assertEquals( msg + "\nculprit: " + node.toString() + "\n", expected, node.getDependency().getScope() ); } catch ( IndexOutOfBoundsException e ) { throw new IllegalArgumentException( "Illegal coordinates for child", e ); } catch ( NullPointerException e ) { throw new IllegalArgumentException( "Illegal coordinates for child", e ); } } private DependencyNode path( DependencyNode node, int... coords ) { for ( int i = 0; i < coords.length; i++ ) { node = node.getChildren().get( coords[i] ); } return node; } private DependencyNode transform( DependencyNode root ) throws RepositoryException { root = new SimpleConflictMarker().transformGraph( root, ctx ); root = new JavaEffectiveScopeCalculator().transformGraph( root, ctx ); return root; } @Test public void testScopeInheritanceProvided() throws IOException, RepositoryException { String resource = "inheritance.txt"; String expected = "provided"; int[] coords = new int[] { 0, 0 }; expectScope( expected, transform( parse( resource, "provided", "test" ) ), coords ); } @Test public void testConflictWinningScopeGetsUsedForInheritance() throws Exception { DependencyNode root = parser.parse( "conflict-and-inheritance.txt" ); root = transform( root ); expectScope( "compile", root, 0, 0 ); expectScope( "compile", root, 0, 0, 0 ); } @Test public void testScopeOfDirectDependencyWinsConflictAndGetsUsedForInheritanceToChildrenEverywhereInGraph() throws Exception { DependencyNode root = parser.parse( "direct-with-conflict-and-inheritance.txt" ); root = transform( root ); expectScope( "test", root, 0, 0 ); expectScope( "test", root, 1, 0, 0 ); } @Test public void testCycleA() throws Exception { DependencyNode root = parser.parse( "cycle-a.txt" ); root = transform( root ); expectScope( "compile", root, 0 ); expectScope( "runtime", root, 0, 0 ); expectScope( "runtime", root, 1 ); expectScope( "compile", root, 1, 0 ); } @Test public void testCycleB() throws Exception { DependencyNode root = parser.parse( "cycle-b.txt" ); root = transform( root ); expectScope( "runtime", root, 0 ); expectScope( "compile", root, 0, 0 ); expectScope( "compile", root, 1 ); expectScope( "runtime", root, 1, 0 ); } @Test public void testCycleC() throws Exception { DependencyNode root = parser.parse( "cycle-c.txt" ); root = transform( root ); expectScope( "runtime", root, 0 ); expectScope( "runtime", root, 0, 0 ); expectScope( "runtime", root, 0, 0, 0 ); expectScope( "runtime", root, 1 ); expectScope( "runtime", root, 1, 0 ); expectScope( "runtime", root, 1, 0, 0 ); } @Test public void testCycleD() throws Exception { DependencyNode root = parser.parse( "cycle-d.txt" ); root = transform( root ); expectScope( "compile", root, 0 ); expectScope( "compile", root, 0, 0 ); expectScope( "compile", root, 0, 0, 0 ); } @Test public void testDirectNodesAlwaysWin() throws IOException, RepositoryException { for ( Scope directScope : Scope.values() ) { String direct = directScope.toString(); parser.setSubstitutions( direct ); DependencyNode root = parser.parse( "direct-nodes-winning.txt" ); String msg = String.format( "direct node should be setting scope ('%s') for all nodes.\n" + parser.dump( root ), direct ); root = transform( root ); msg += "\ntransformed:\n" + parser.dump( root ); expectScope( msg, direct, root, 0 ); expectScope( msg, direct, root, 1, 0 ); expectScope( msg, direct, root, 2, 0 ); expectScope( msg, direct, root, 3, 0 ); expectScope( msg, direct, root, 4, 0 ); } } @Test public void testNonDirectMultipleInheritance() throws RepositoryException, IOException { for ( Scope scope1 : Scope.values() ) { for ( Scope scope2 : Scope.values() ) { parser.setSubstitutions( scope1.toString(), scope2.toString() ); DependencyNode root = parser.parse( "multiple-inheritance.txt" ); String expected = scope1.compareTo( scope2 ) >= 0 ? scope1.toString() : scope2.toString(); String msg = String.format( "expected '%s' to win\n" + parser.dump( root ), expected ); root = transform( root ); msg += "\ntransformed:\n" + parser.dump( root ); expectScope( msg, expected, root, 0, 0 ); expectScope( msg, expected, root, 1, 0 ); } } } @Test public void testConflictScopeOrdering() throws RepositoryException, IOException { for ( Scope scope1 : Scope.values() ) { for ( Scope scope2 : Scope.values() ) { parser.setSubstitutions( scope1.toString(), scope2.toString() ); DependencyNode root = parser.parse( "dueling-scopes.txt" ); String expected = scope1.compareTo( scope2 ) >= 0 ? scope1.toString() : scope2.toString(); String msg = String.format( "expected '%s' to win\n" + parser.dump( root ), expected ); root = transform( root ); msg += "\ntransformed:\n" + parser.dump( root ); expectScope( msg, expected, root, 0, 0 ); expectScope( msg, expected, root, 1, 0 ); } } } /** * obscure case (illegal maven POM). Current behavior: last mentioned wins. */ @Test public void testConflictingDirectNodes() throws RepositoryException, IOException { for ( Scope scope1 : Scope.values() ) { for ( Scope scope2 : Scope.values() ) { parser.setSubstitutions( scope1.toString(), scope2.toString() ); DependencyNode root = parser.parse( "conflicting-direct-nodes.txt" ); String expected = scope2.toString(); String msg = String.format( "expected '%s' to win\n" + parser.dump( root ), expected ); root = transform( root ); msg += "\ntransformed:\n" + parser.dump( root ); expectScope( msg, expected, root, 0 ); expectScope( msg, expected, root, 1 ); } } } } NearestVersionConflictResolverTest.java000066400000000000000000000376751167050556700401350ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/graph/transformerpackage org.sonatype.aether.util.graph.transformer; /******************************************************************************* * 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 static org.junit.Assert.*; import java.util.IdentityHashMap; import java.util.List; import java.util.Map; import org.junit.Test; import org.sonatype.aether.collection.UnsolvableVersionConflictException; import org.sonatype.aether.graph.DependencyNode; import org.sonatype.aether.test.util.DependencyGraphParser; /** * @author Benjamin Bentmann */ public class NearestVersionConflictResolverTest extends AbstractDependencyGraphTransformerTest { @Test public void testSelectHighestVersionFromMultipleVersionsAtSameLevel() throws Exception { // root // +- a:1 // +- a:3 // \- a:2 DependencyNode a1 = builder.artifactId( "a" ).version( "1" ).build(); DependencyNode a2 = builder.artifactId( "a" ).version( "2" ).build(); DependencyNode a3 = builder.artifactId( "a" ).version( "3" ).build(); DependencyNode root = builder.artifactId( null ).build(); root.getChildren().add( a1 ); root.getChildren().add( a3 ); root.getChildren().add( a2 ); Map conflictIds = new IdentityHashMap(); conflictIds.put( a1, "a" ); conflictIds.put( a2, "a" ); conflictIds.put( a3, "a" ); context.put( TransformationContextKeys.CONFLICT_IDS, conflictIds ); NearestVersionConflictResolver transformer = new NearestVersionConflictResolver(); root = transformer.transformGraph( root, context ); assertEquals( 1, root.getChildren().size() ); assertSame( a3, root.getChildren().iterator().next() ); } @Test public void testSelectedVersionAtDeeperLevelThanOriginallySeen() throws Exception { // root // +- a // | \- b:1 # will be removed in favor of b:2 // | \- j:1 # nearest version of j in dirty tree // +- c // | \- d // | \- e // | \- j:1 // \- b:2 DependencyNode j = builder.artifactId( "j" ).build(); DependencyNode b1 = builder.artifactId( "b" ).version( "1" ).build(); b1.getChildren().add( j ); DependencyNode a = builder.artifactId( "a" ).build(); a.getChildren().add( b1 ); DependencyNode e = builder.artifactId( "e" ).build(); e.getChildren().add( j ); DependencyNode d = builder.artifactId( "d" ).build(); d.getChildren().add( e ); DependencyNode c = builder.artifactId( "c" ).build(); c.getChildren().add( d ); DependencyNode b2 = builder.artifactId( "b" ).version( "2" ).build(); DependencyNode root = builder.artifactId( null ).build(); root.getChildren().add( a ); root.getChildren().add( c ); root.getChildren().add( b2 ); Map conflictIds = new IdentityHashMap(); conflictIds.put( j, "j" ); conflictIds.put( a, "a" ); conflictIds.put( b1, "b" ); conflictIds.put( b2, "b" ); conflictIds.put( c, "c" ); conflictIds.put( d, "d" ); conflictIds.put( e, "e" ); context.put( TransformationContextKeys.CONFLICT_IDS, conflictIds ); NearestVersionConflictResolver transformer = new NearestVersionConflictResolver(); root = transformer.transformGraph( root, context ); List trail = find( root, "j" ); assertEquals( 5, trail.size() ); } @Test public void testNearestDirtyVersionUnderneathRemovedNode() throws Exception { // root // +- a // | \- b:1 # will be removed in favor of b:2 // | \- j:1 # nearest version of j in dirty tree // +- c // | \- d // | \- e // | \- j:2 // \- b:2 DependencyNode j1 = builder.artifactId( "j" ).version( "1" ).build(); DependencyNode j2 = builder.artifactId( "j" ).version( "2" ).build(); DependencyNode b1 = builder.artifactId( "b" ).version( "1" ).build(); b1.getChildren().add( j1 ); DependencyNode a = builder.artifactId( "a" ).build(); a.getChildren().add( b1 ); DependencyNode e = builder.artifactId( "e" ).build(); e.getChildren().add( j2 ); DependencyNode d = builder.artifactId( "d" ).build(); d.getChildren().add( e ); DependencyNode c = builder.artifactId( "c" ).build(); c.getChildren().add( d ); DependencyNode b2 = builder.artifactId( "b" ).version( "2" ).build(); DependencyNode root = builder.artifactId( null ).build(); root.getChildren().add( a ); root.getChildren().add( c ); root.getChildren().add( b2 ); Map conflictIds = new IdentityHashMap(); conflictIds.put( j1, "j" ); conflictIds.put( j2, "j" ); conflictIds.put( a, "a" ); conflictIds.put( b1, "b" ); conflictIds.put( b2, "b" ); conflictIds.put( c, "c" ); conflictIds.put( d, "d" ); conflictIds.put( e, "e" ); context.put( TransformationContextKeys.CONFLICT_IDS, conflictIds ); NearestVersionConflictResolver transformer = new NearestVersionConflictResolver(); root = transformer.transformGraph( root, context ); List trail = find( root, "j" ); assertEquals( 5, trail.size() ); } @Test public void testViolationOfHardConstraintFallsBackToNearestSeenNotFirstSeen() throws Exception { // root // +- x:1 // +- a:1 // | \- b:1 // | \- x:3 // +- c:1 // | \- x:2 // \- d:1 // \- e:1 // \- x:[2,) # forces rejection of x:1, should fallback to nearest and not first-seen, i.e. x:2 and not x:3 DependencyNode x1 = builder.artifactId( "x" ).version( "1" ).build(); DependencyNode x2 = builder.artifactId( "x" ).version( "2" ).build(); DependencyNode x3 = builder.artifactId( "x" ).version( "3" ).build(); DependencyNode x2r = builder.artifactId( "x" ).version( "2" ).range( "[2,)" ).build(); DependencyNode b = builder.artifactId( "b" ).version( "1" ).build(); b.getChildren().add( x3 ); DependencyNode a = builder.artifactId( "a" ).build(); a.getChildren().add( b ); DependencyNode c = builder.artifactId( "c" ).build(); c.getChildren().add( x2 ); DependencyNode e = builder.artifactId( "e" ).build(); e.getChildren().add( x2r ); DependencyNode d = builder.artifactId( "d" ).build(); d.getChildren().add( e ); DependencyNode root = builder.artifactId( null ).build(); root.getChildren().add( x1 ); root.getChildren().add( a ); root.getChildren().add( c ); root.getChildren().add( d ); Map conflictIds = new IdentityHashMap(); conflictIds.put( x1, "x" ); conflictIds.put( x2, "x" ); conflictIds.put( x3, "x" ); conflictIds.put( x2r, "x" ); conflictIds.put( a, "a" ); conflictIds.put( b, "b" ); conflictIds.put( c, "c" ); conflictIds.put( d, "d" ); conflictIds.put( e, "e" ); context.put( TransformationContextKeys.CONFLICT_IDS, conflictIds ); NearestVersionConflictResolver transformer = new NearestVersionConflictResolver(); root = transformer.transformGraph( root, context ); List trail = find( root, "x" ); assertEquals( 3, trail.size() ); assertSame( x2, trail.get( 0 ) ); } @Test public void testCyclicConflictIdGraph() throws Exception { // root // +- a:1 // | \- b:1 // \- b:2 // \- a:2 DependencyNode a1 = builder.artifactId( "a" ).version( "1" ).build(); DependencyNode a2 = builder.artifactId( "a" ).version( "2" ).build(); DependencyNode b1 = builder.artifactId( "b" ).version( "1" ).build(); DependencyNode b2 = builder.artifactId( "b" ).version( "2" ).build(); a1.getChildren().add( b1 ); b2.getChildren().add( a2 ); DependencyNode root = builder.artifactId( null ).build(); root.getChildren().add( a1 ); root.getChildren().add( b2 ); Map conflictIds = new IdentityHashMap(); conflictIds.put( a1, "a" ); conflictIds.put( a2, "a" ); conflictIds.put( b1, "b" ); conflictIds.put( b2, "b" ); context.put( TransformationContextKeys.CONFLICT_IDS, conflictIds ); NearestVersionConflictResolver transformer = new NearestVersionConflictResolver(); root = transformer.transformGraph( root, context ); assertEquals( 2, root.getChildren().size() ); assertSame( a1, root.getChildren().get( 0 ) ); assertSame( b2, root.getChildren().get( 1 ) ); assertTrue( a1.getChildren().isEmpty() ); assertTrue( b2.getChildren().isEmpty() ); } @Test( expected = UnsolvableVersionConflictException.class ) public void testUnsolvableRangeConflictBetweenHardConstraints() throws Exception { // root // +- b:1 // | \- a:[1] // \- c:1 // \- a:[2] DependencyNode a1 = builder.artifactId( "a" ).version( "1" ).range( "[1]" ).build(); DependencyNode a2 = builder.artifactId( "a" ).version( "2" ).range( "[2]" ).build(); DependencyNode b = builder.artifactId( "b" ).version( "1" ).build(); DependencyNode c = builder.artifactId( "c" ).version( "1" ).build(); b.getChildren().add( a1 ); c.getChildren().add( a2 ); DependencyNode root = builder.artifactId( null ).build(); root.getChildren().add( b ); root.getChildren().add( c ); Map conflictIds = new IdentityHashMap(); conflictIds.put( a1, "a" ); conflictIds.put( a2, "a" ); conflictIds.put( b, "b" ); conflictIds.put( c, "c" ); context.put( TransformationContextKeys.CONFLICT_IDS, conflictIds ); NearestVersionConflictResolver transformer = new NearestVersionConflictResolver(); root = transformer.transformGraph( root, context ); } @Test public void testSolvableConflictBetweenHardConstraints() throws Exception { // root // +- b:1 // | \- a:[2] // \- c:1 // +- a:1-[1,3] // +- a:2-[1,3] // \- a:3-[1,3] DependencyNode a1 = builder.artifactId( "a" ).version( "2" ).range( "[2]" ).build(); DependencyNode a2 = builder.artifactId( "a" ).version( "1" ).range( "[1,3]" ).build(); DependencyNode a3 = builder.artifactId( "a" ).version( "2" ).range( "[1,3]" ).build(); DependencyNode a4 = builder.artifactId( "a" ).version( "3" ).range( "[1,3]" ).build(); DependencyNode b = builder.artifactId( "b" ).version( "1" ).build(); DependencyNode c = builder.artifactId( "c" ).version( "1" ).build(); b.getChildren().add( a1 ); c.getChildren().add( a2 ); c.getChildren().add( a3 ); c.getChildren().add( a4 ); DependencyNode root = builder.artifactId( null ).build(); root.getChildren().add( b ); root.getChildren().add( c ); Map conflictIds = new IdentityHashMap(); conflictIds.put( a1, "a" ); conflictIds.put( a2, "a" ); conflictIds.put( a3, "a" ); conflictIds.put( a4, "a" ); conflictIds.put( b, "b" ); conflictIds.put( c, "c" ); context.put( TransformationContextKeys.CONFLICT_IDS, conflictIds ); NearestVersionConflictResolver transformer = new NearestVersionConflictResolver(); root = transformer.transformGraph( root, context ); } @Test public void testConflictGroupCompletelyDroppedFromResolvedTree() throws Exception { // root // +- a:1 // | \- b:1 // | \- c:1 # conflict group c will completely vanish from resolved tree // \- b:2 DependencyNode a = builder.artifactId( "a" ).version( "1" ).build(); DependencyNode b1 = builder.artifactId( "b" ).version( "1" ).build(); DependencyNode b2 = builder.artifactId( "b" ).version( "2" ).build(); DependencyNode c = builder.artifactId( "c" ).version( "1" ).build(); b1.getChildren().add( c ); a.getChildren().add( b1 ); DependencyNode root = builder.artifactId( null ).build(); root.getChildren().add( a ); root.getChildren().add( b2 ); Map conflictIds = new IdentityHashMap(); conflictIds.put( a, "a" ); conflictIds.put( b1, "b" ); conflictIds.put( b2, "b" ); conflictIds.put( c, "c" ); context.put( TransformationContextKeys.CONFLICT_IDS, conflictIds ); NearestVersionConflictResolver transformer = new NearestVersionConflictResolver(); root = transformer.transformGraph( root, context ); assertEquals( 2, root.getChildren().size() ); assertSame( a, root.getChildren().get( 0 ) ); assertSame( b2, root.getChildren().get( 1 ) ); assertTrue( a.getChildren().isEmpty() ); assertTrue( b2.getChildren().isEmpty() ); } @Test public void testNearestSoftVersionPrunedByFartherRange() throws Exception { // root // +- a:1 // | \- c:2 // \- b:1 // \- c:[1] DependencyNode a = builder.artifactId( "a" ).version( "1" ).build(); DependencyNode b = builder.artifactId( "b" ).version( "1" ).build(); DependencyNode c1 = builder.artifactId( "c" ).version( "1" ).range( "[1]" ).build(); DependencyNode c2 = builder.artifactId( "c" ).version( "2" ).build(); a.getChildren().add( c2 ); b.getChildren().add( c1 ); DependencyNode root = builder.artifactId( null ).build(); root.getChildren().add( a ); root.getChildren().add( b ); Map conflictIds = new IdentityHashMap(); conflictIds.put( a, "a" ); conflictIds.put( b, "b" ); conflictIds.put( c1, "c" ); conflictIds.put( c2, "c" ); context.put( TransformationContextKeys.CONFLICT_IDS, conflictIds ); NearestVersionConflictResolver transformer = new NearestVersionConflictResolver(); root = transformer.transformGraph( root, context ); assertEquals( 2, root.getChildren().size() ); assertSame( a, root.getChildren().get( 0 ) ); assertSame( b, root.getChildren().get( 1 ) ); assertTrue( a.getChildren().isEmpty() ); assertEquals( 1, b.getChildren().size() ); } @Test public void testCyclicGraph() throws Exception { DependencyNode root = new DependencyGraphParser( "transformer/version-resolver/" ).parse( "cycle.txt" ); root = new SimpleConflictMarker().transformGraph( root, context ); root = new NearestVersionConflictResolver().transformGraph( root, context ); assertEquals( 2, root.getChildren().size() ); assertEquals( 1, root.getChildren().get( 0 ).getChildren().size() ); assertEquals( 0, root.getChildren().get( 0 ).getChildren().get( 0 ).getChildren().size() ); assertEquals( 0, root.getChildren().get( 1 ).getChildren().size() ); } } RootQueueTest.java000066400000000000000000000056761167050556700337060ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/graph/transformerpackage org.sonatype.aether.util.graph.transformer; /******************************************************************************* * 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 static org.junit.Assert.*; import org.junit.Test; import org.sonatype.aether.util.graph.transformer.ConflictIdSorter.ConflictId; import org.sonatype.aether.util.graph.transformer.ConflictIdSorter.RootQueue; public class RootQueueTest { @Test public void testIsEmpty() { ConflictId id = new ConflictId( "a", 0 ); RootQueue queue = new RootQueue( 10 ); assertTrue( queue.isEmpty() ); queue.add( id ); assertFalse( queue.isEmpty() ); assertSame( id, queue.remove() ); assertTrue( queue.isEmpty() ); } @Test public void testAddSortsByDepth() { ConflictId id1 = new ConflictId( "a", 0 ); ConflictId id2 = new ConflictId( "b", 1 ); ConflictId id3 = new ConflictId( "c", 2 ); ConflictId id4 = new ConflictId( "d", 3 ); RootQueue queue = new RootQueue( 10 ); queue.add( id1 ); queue.add( id2 ); queue.add( id3 ); queue.add( id4 ); assertSame( id1, queue.remove() ); assertSame( id2, queue.remove() ); assertSame( id3, queue.remove() ); assertSame( id4, queue.remove() ); queue = new RootQueue( 10 ); queue.add( id4 ); queue.add( id3 ); queue.add( id2 ); queue.add( id1 ); assertSame( id1, queue.remove() ); assertSame( id2, queue.remove() ); assertSame( id3, queue.remove() ); assertSame( id4, queue.remove() ); } @Test public void testAddWithArrayCompact() { ConflictId id = new ConflictId( "a", 0 ); RootQueue queue = new RootQueue( 10 ); assertTrue( queue.isEmpty() ); queue.add( id ); assertFalse( queue.isEmpty() ); assertSame( id, queue.remove() ); assertTrue( queue.isEmpty() ); queue.add( id ); assertFalse( queue.isEmpty() ); assertSame( id, queue.remove() ); assertTrue( queue.isEmpty() ); } @Test public void testAddMinimumAfterSomeRemoves() { ConflictId id1 = new ConflictId( "a", 0 ); ConflictId id2 = new ConflictId( "b", 1 ); ConflictId id3 = new ConflictId( "c", 2 ); RootQueue queue = new RootQueue( 10 ); queue.add( id2 ); queue.add( id3 ); assertSame( id2, queue.remove() ); queue.add( id1 ); assertSame( id1, queue.remove() ); assertSame( id3, queue.remove() ); assertTrue( queue.isEmpty() ); } } SimpleConflictMarker.java000066400000000000000000000045411167050556700351610ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/graph/transformerpackage org.sonatype.aether.util.graph.transformer; /******************************************************************************* * 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.IdentityHashMap; import java.util.Map; import org.sonatype.aether.RepositoryException; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.collection.DependencyGraphTransformationContext; import org.sonatype.aether.collection.DependencyGraphTransformer; import org.sonatype.aether.graph.Dependency; import org.sonatype.aether.graph.DependencyNode; /** * Set "groupId:artId:classifier:extension" as conflict marker for every node. * * @author Benjamin Hanzelmann */ class SimpleConflictMarker implements DependencyGraphTransformer { public DependencyNode transformGraph( DependencyNode node, DependencyGraphTransformationContext context ) throws RepositoryException { @SuppressWarnings( "unchecked" ) Map conflictIds = (Map) context.get( TransformationContextKeys.CONFLICT_IDS ); if ( conflictIds == null ) { conflictIds = new IdentityHashMap(); context.put( TransformationContextKeys.CONFLICT_IDS, conflictIds ); } mark( node, conflictIds ); return node; } private void mark( DependencyNode node, Map conflictIds ) { Dependency dependency = node.getDependency(); if ( dependency != null ) { Artifact artifact = dependency.getArtifact(); String key = String.format( "%s:%s:%s:%s", artifact.getGroupId(), artifact.getArtifactId(), artifact.getClassifier(), artifact.getExtension() ); if ( conflictIds.put( node, key ) != null ) { return; } } for ( DependencyNode child : node.getChildren() ) { mark( child, conflictIds ); } } } SimpleDependencyGraphTransformationContext.java000066400000000000000000000022111167050556700416020ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/graph/transformerpackage org.sonatype.aether.util.graph.transformer; /******************************************************************************* * 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.HashMap; import java.util.Map; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.collection.DependencyGraphTransformationContext; /** * @author Benjamin Bentmann */ class SimpleDependencyGraphTransformationContext implements DependencyGraphTransformationContext { private Map map = new HashMap(); public RepositorySystemSession getSession() { return null; } public Object get( Object key ) { return map.get( key ); } public Object put( Object key, Object value ) { return map.put( key, value ); } } aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/layout/000077500000000000000000000000001167050556700261665ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/layout/MavenDefaultLayoutTest.java000066400000000000000000000024321167050556700334430ustar00rootroot00000000000000package org.sonatype.aether.util.layout; /******************************************************************************* * 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 static org.junit.Assert.*; import java.net.URI; import org.junit.Test; import org.sonatype.aether.test.util.impl.StubArtifact; /** * @author Benjamin Bentmann */ public class MavenDefaultLayoutTest { @Test public void testArtifactPath() { MavenDefaultLayout layout = new MavenDefaultLayout(); URI uri = layout.getPath( new StubArtifact( "g.i.d", "a-i.d", "cls", "ext", "1.0" ) ); assertEquals( "g/i/d/a-i.d/1.0/a-i.d-1.0-cls.ext", uri.getPath() ); uri = layout.getPath( new StubArtifact( "g.i.d", "aid", "", "ext", "1.0" ) ); assertEquals( "g/i/d/aid/1.0/aid-1.0.ext", uri.getPath() ); uri = layout.getPath( new StubArtifact( "g.i.d", "aid", "", "", "1.0" ) ); assertEquals( "g/i/d/aid/1.0/aid-1.0", uri.getPath() ); } } aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/listener/000077500000000000000000000000001167050556700264765ustar00rootroot00000000000000ChainedRepositoryListenerTest.java000066400000000000000000000021261167050556700352640ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/listenerpackage org.sonatype.aether.util.listener; /******************************************************************************* * 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 static org.junit.Assert.*; import java.lang.reflect.Method; import org.junit.Test; import org.sonatype.aether.RepositoryListener; /** * @author Benjamin Bentmann */ public class ChainedRepositoryListenerTest { @Test public void testAllEventTypesHandled() throws Exception { for ( Method method : RepositoryListener.class.getMethods() ) { assertNotNull( ChainedRepositoryListener.class.getDeclaredMethod( method.getName(), method.getParameterTypes() ) ); } } } ChainedTransferListenerTest.java000066400000000000000000000021251167050556700346700ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/listenerpackage org.sonatype.aether.util.listener; /******************************************************************************* * 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 static org.junit.Assert.*; import java.lang.reflect.Method; import org.junit.Test; import org.sonatype.aether.transfer.TransferListener; /** * @author Benjamin Bentmann */ public class ChainedTransferListenerTest { @Test public void testAllEventTypesHandled() throws Exception { for ( Method method : TransferListener.class.getMethods() ) { assertNotNull( ChainedTransferListener.class.getDeclaredMethod( method.getName(), method.getParameterTypes() ) ); } } } DefaultTransferEventTest.java000066400000000000000000000041361167050556700342210ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/listenerpackage org.sonatype.aether.util.listener; /******************************************************************************* * 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 static org.junit.Assert.*; import java.nio.ByteBuffer; import org.junit.Test; /** * @author Benjamin Hanzelmann */ public class DefaultTransferEventTest { @Test public void testByteArrayConversion() { DefaultTransferEvent event = new DefaultTransferEvent(); byte[] buffer = new byte[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; int length = buffer.length - 2; int offset = 1; event.setDataBuffer( buffer, offset, length ); ByteBuffer bb = event.getDataBuffer(); byte[] dst = new byte[bb.remaining()]; bb.get( dst ); byte[] expected = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8 }; assertArrayEquals( expected, dst ); } @Test public void testRepeatableReadingOfDataBuffer() { byte[] data = { 0, 1, 2, 3, 4, 5, 6, 7 }; ByteBuffer buffer = ByteBuffer.wrap( data ); DefaultTransferEvent event = new DefaultTransferEvent(); event.setDataBuffer( buffer ); assertEquals( 8, event.getDataLength() ); ByteBuffer eventBuffer = event.getDataBuffer(); assertNotNull( eventBuffer ); assertEquals( 8, eventBuffer.remaining() ); byte[] eventData = new byte[8]; eventBuffer.get( eventData ); assertArrayEquals( data, eventData ); assertEquals( 0, eventBuffer.remaining() ); assertEquals( 8, event.getDataLength() ); eventBuffer = event.getDataBuffer(); assertNotNull( eventBuffer ); assertEquals( 8, eventBuffer.remaining() ); eventBuffer.get( eventData ); assertArrayEquals( data, eventData ); } } aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/repository/000077500000000000000000000000001167050556700270705ustar00rootroot00000000000000DefaultProxySelectorTest.java000066400000000000000000000030621167050556700346440ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/repositorypackage org.sonatype.aether.util.repository; /******************************************************************************* * 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 static org.junit.Assert.*; import org.junit.Test; /** * @author Benjamin Bentmann */ public class DefaultProxySelectorTest { private boolean isNonProxyHosts( String host, String nonProxyHosts ) { return DefaultProxySelector.isNonProxyHosts( host, nonProxyHosts ); } @Test public void testIsNonProxyHosts() { assertFalse( isNonProxyHosts( "www.sonatype.org", null ) ); assertFalse( isNonProxyHosts( "www.sonatype.org", "" ) ); assertTrue( isNonProxyHosts( "www.sonatype.org", "*" ) ); assertTrue( isNonProxyHosts( "www.sonatype.org", "*.org" ) ); assertTrue( isNonProxyHosts( "www.sonatype.org", "www.*" ) ); assertTrue( isNonProxyHosts( "www.sonatype.org", "www.*.org" ) ); assertFalse( isNonProxyHosts( "www.sonatype.org", "www.sonatype.com" ) ); assertFalse( isNonProxyHosts( "www.sonatype.org", "*.com" ) ); assertFalse( isNonProxyHosts( "www.sonatype.org", "sonatype.org" ) ); assertTrue( isNonProxyHosts( "www.sonatype.org", "*.com|*.org" ) ); } } aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/version/000077500000000000000000000000001167050556700263365ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/version/AbstractVersionTest.java000066400000000000000000000050631167050556700331560ustar00rootroot00000000000000package org.sonatype.aether.util.version; /******************************************************************************* * 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 static org.junit.Assert.assertEquals; import org.sonatype.aether.version.Version; abstract class AbstractVersionTest { protected static final int X_LT_Y = -1; protected static final int X_EQ_Y = 0; protected static final int X_GT_Y = 1; protected abstract Version newVersion( String version ); protected void assertOrder( int expected, String version1, String version2 ) { Version v1 = newVersion( version1 ); Version v2 = newVersion( version2 ); if ( expected > 0 ) { assertEquals( "expected " + v1 + " > " + v2, 1, Integer.signum( v1.compareTo( v2 ) ) ); assertEquals( "expected " + v2 + " < " + v1, -1, Integer.signum( v2.compareTo( v1 ) ) ); assertEquals( "expected " + v1 + " != " + v2, false, v1.equals( v2 ) ); assertEquals( "expected " + v2 + " != " + v1, false, v2.equals( v1 ) ); } else if ( expected < 0 ) { assertEquals( "expected " + v1 + " < " + v2, -1, Integer.signum( v1.compareTo( v2 ) ) ); assertEquals( "expected " + v2 + " > " + v1, 1, Integer.signum( v2.compareTo( v1 ) ) ); assertEquals( "expected " + v1 + " != " + v2, false, v1.equals( v2 ) ); assertEquals( "expected " + v2 + " != " + v1, false, v2.equals( v1 ) ); } else { assertEquals( "expected " + v1 + " == " + v2, 0, v1.compareTo( v2 ) ); assertEquals( "expected " + v2 + " == " + v1, 0, v2.compareTo( v1 ) ); assertEquals( "expected " + v1 + " == " + v2, true, v1.equals( v2 ) ); assertEquals( "expected " + v2 + " == " + v1, true, v2.equals( v1 ) ); assertEquals( "expected #(" + v1 + ") == #(" + v1 + ")", v1.hashCode(), v2.hashCode() ); } } protected void assertSequence( String... versions ) { for ( int i = 0; i < versions.length - 1; i++ ) { for ( int j = i + 1; j < versions.length; j++ ) { assertOrder( X_LT_Y, versions[i], versions[j] ); } } } } GenericVersionRangeTest.java000066400000000000000000000100231167050556700336550ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/versionpackage org.sonatype.aether.util.version; /******************************************************************************* * 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 static org.junit.Assert.*; import org.junit.Test; import org.sonatype.aether.version.InvalidVersionSpecificationException; import org.sonatype.aether.version.Version; import org.sonatype.aether.version.VersionRange; public class GenericVersionRangeTest { private Version newVersion( String version ) { return new GenericVersion( version ); } private VersionRange parseValid( String range ) { try { return new GenericVersionRange( range ); } catch ( InvalidVersionSpecificationException e ) { AssertionError error = new AssertionError( range + " should be valid but failed to parse due to: " + e.getMessage() ); error.initCause( e ); throw error; } } private void parseInvalid( String range ) { try { new GenericVersionRange( range ); fail( range + " should be invalid" ); } catch ( InvalidVersionSpecificationException e ) { assertTrue( true ); } } private void assertContains( VersionRange range, String version ) { assertTrue( range + " should contain " + version, range.containsVersion( newVersion( version ) ) ); } private void assertNotContains( VersionRange range, String version ) { assertFalse( range + " should not contain " + version, range.containsVersion( newVersion( version ) ) ); } @Test public void testLowerBoundInclusiveUpperBoundInclusive() { VersionRange range = parseValid( "[1,2]" ); assertContains( range, "1" ); assertContains( range, "1.1-SNAPSHOT" ); assertContains( range, "2" ); assertEquals( range, parseValid( range.toString() ) ); } @Test public void testLowerBoundInclusiveUpperBoundExclusive() { VersionRange range = parseValid( "[1.2.3.4.5,1.2.3.4.6)" ); assertContains( range, "1.2.3.4.5" ); assertNotContains( range, "1.2.3.4.6" ); assertEquals( range, parseValid( range.toString() ) ); } @Test public void testLowerBoundExclusiveUpperBoundInclusive() { VersionRange range = parseValid( "(1a,1b]" ); assertNotContains( range, "1a" ); assertContains( range, "1b" ); assertEquals( range, parseValid( range.toString() ) ); } @Test public void testLowerBoundExclusiveUpperBoundExclusive() { VersionRange range = parseValid( "(1,3)" ); assertNotContains( range, "1" ); assertContains( range, "2-SNAPSHOT" ); assertNotContains( range, "3" ); assertEquals( range, parseValid( range.toString() ) ); } @Test public void testSingleVersion() { VersionRange range = parseValid( "[1]" ); assertContains( range, "1" ); assertEquals( range, parseValid( range.toString() ) ); range = parseValid( "[1,1]" ); assertContains( range, "1" ); assertEquals( range, parseValid( range.toString() ) ); } @Test public void testMissingOpenCloseDelimiter() { parseInvalid( "1.0" ); } @Test public void testMissingOpenDelimiter() { parseInvalid( "1.0]" ); parseInvalid( "1.0)" ); } @Test public void testMissingCloseDelimiter() { parseInvalid( "[1.0" ); parseInvalid( "(1.0" ); } @Test public void testTooManyVersions() { parseInvalid( "[1,2,3]" ); parseInvalid( "(1,2,3)" ); parseInvalid( "[1,2,3)" ); } } GenericVersionSchemeTest.java000066400000000000000000000063441167050556700340400ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/versionpackage org.sonatype.aether.util.version; /******************************************************************************* * 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 static org.junit.Assert.*; import org.junit.Before; import org.junit.Test; import org.sonatype.aether.version.InvalidVersionSpecificationException; import org.sonatype.aether.version.VersionConstraint; /** * @author Benjamin Hanzelmann */ public class GenericVersionSchemeTest { private GenericVersionScheme scheme; @Before public void setUp() throws Exception { scheme = new GenericVersionScheme(); } private InvalidVersionSpecificationException parseInvalid( String constraint ) { try { scheme.parseVersionConstraint( constraint ); fail( "expected exception for constraint " + constraint ); return null; } catch ( InvalidVersionSpecificationException e ) { return e; } } @Test public void testEnumeratedVersions() throws InvalidVersionSpecificationException { VersionConstraint c = scheme.parseVersionConstraint( "1.0" ); assertEquals( "1.0", c.getVersion().toString() ); assertTrue( c.containsVersion( new GenericVersion( "1.0" ) ) ); c = scheme.parseVersionConstraint( "[1.0]" ); assertEquals( null, c.getVersion() ); assertTrue( c.containsVersion( new GenericVersion( "1.0" ) ) ); c = scheme.parseVersionConstraint( "[1.0],[2.0]" ); assertTrue( c.containsVersion( new GenericVersion( "1.0" ) ) ); assertTrue( c.containsVersion( new GenericVersion( "2.0" ) ) ); c = scheme.parseVersionConstraint( "[1.0],[2.0],[3.0]" ); assertContains( c, "1.0", "2.0", "3.0" ); assertNotContains( c, "1.5" ); c = scheme.parseVersionConstraint( "[1,3),(3,5)" ); assertContains( c, "1", "2", "4" ); assertNotContains( c, "3", "5" ); c = scheme.parseVersionConstraint( "[1,3),(3,)" ); assertContains( c, "1", "2", "4" ); assertNotContains( c, "3" ); } private void assertNotContains( VersionConstraint c, String... versions ) { assertContains( String.format( "%s: %%s should not be contained\n", c.toString() ), c, false, versions ); } private void assertContains( String msg, VersionConstraint c, boolean b, String... versions ) { for ( String v : versions ) { assertEquals( String.format( msg, v ), b, c.containsVersion( new GenericVersion( v ) ) ); } } private void assertContains( VersionConstraint c, String... versions ) { assertContains( String.format( "%s: %%s should be contained\n", c.toString() ), c, true, versions ); } @Test public void testInvalid() { parseInvalid( "[1," ); parseInvalid( "[1,2],(3," ); parseInvalid( "[1,2],3" ); } } aether-1.13.1/aether-util/src/test/java/org/sonatype/aether/util/version/GenericVersionTest.java000066400000000000000000000246271167050556700327760ustar00rootroot00000000000000package org.sonatype.aether.util.version; /******************************************************************************* * 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.Locale; import org.junit.Test; import org.sonatype.aether.util.version.GenericVersion; import org.sonatype.aether.version.Version; /** */ public class GenericVersionTest extends AbstractVersionTest { protected Version newVersion( String version ) { return new GenericVersion( version ); } @Test public void testEmptyVersion() { assertOrder( X_EQ_Y, "0", "" ); } @Test public void testNumericOrdering() { assertOrder( X_LT_Y, "2", "10" ); assertOrder( X_LT_Y, "1.2", "1.10" ); assertOrder( X_LT_Y, "1.0.2", "1.0.10" ); assertOrder( X_LT_Y, "1.0.0.2", "1.0.0.10" ); assertOrder( X_LT_Y, "1.0-20101206.111434-1", "1.0-20101206.111435-1" ); assertOrder( X_LT_Y, "1.0-20101206.111434-2", "1.0-20101206.111434-10" ); } @Test public void testLeadingZerosAreSemanticallyIrrelevant() { assertOrder( X_EQ_Y, "1", "01" ); assertOrder( X_EQ_Y, "1.2", "1.002" ); assertOrder( X_EQ_Y, "1.2.3", "1.2.0003" ); assertOrder( X_EQ_Y, "1.2.3.4", "1.2.3.00004" ); } @Test public void testTrailingZerosAreSemanticallyIrrelevant() { assertOrder( X_EQ_Y, "1", "1.0.0.0.0.0.0.0.0.0.0.0.0.0" ); assertOrder( X_EQ_Y, "1", "1-0-0-0-0-0-0-0-0-0-0-0-0-0" ); assertOrder( X_EQ_Y, "1", "1.0-0.0-0.0-0.0-0.0-0.0-0.0" ); assertOrder( X_EQ_Y, "1", "1.0000000000000" ); assertOrder( X_EQ_Y, "1.0", "1.0.0" ); } @Test public void testTrailingZerosBeforeQualifierAreSemanticallyIrrelevant() { assertOrder( X_EQ_Y, "1.0-ga", "1.0.0-ga" ); assertOrder( X_EQ_Y, "1.0.ga", "1.0.0.ga" ); assertOrder( X_EQ_Y, "1.0ga", "1.0.0ga" ); assertOrder( X_EQ_Y, "1.0-alpha", "1.0.0-alpha" ); assertOrder( X_EQ_Y, "1.0.alpha", "1.0.0.alpha" ); assertOrder( X_EQ_Y, "1.0alpha", "1.0.0alpha" ); assertOrder( X_EQ_Y, "1.0-alpha-snapshot", "1.0.0-alpha-snapshot" ); assertOrder( X_EQ_Y, "1.0.alpha.snapshot", "1.0.0.alpha.snapshot" ); assertOrder( X_EQ_Y, "1.x.0-alpha", "1.x.0.0-alpha" ); assertOrder( X_EQ_Y, "1.x.0.alpha", "1.x.0.0.alpha" ); assertOrder( X_EQ_Y, "1.x.0-alpha-snapshot", "1.x.0.0-alpha-snapshot" ); assertOrder( X_EQ_Y, "1.x.0.alpha.snapshot", "1.x.0.0.alpha.snapshot" ); } @Test public void testTrailingDelimitersAreSemanticallyIrrelevant() { assertOrder( X_EQ_Y, "1", "1............." ); assertOrder( X_EQ_Y, "1", "1-------------" ); assertOrder( X_EQ_Y, "1.0", "1............." ); assertOrder( X_EQ_Y, "1.0", "1-------------" ); } @Test public void testInitialDelimiters() { assertOrder( X_EQ_Y, "0.1", ".1" ); assertOrder( X_EQ_Y, "0.0.1", "..1" ); assertOrder( X_EQ_Y, "0.1", "-1" ); assertOrder( X_EQ_Y, "0.0.1", "--1" ); } @Test public void testConsecutiveDelimiters() { assertOrder( X_EQ_Y, "1.0.1", "1..1" ); assertOrder( X_EQ_Y, "1.0.0.1", "1...1" ); assertOrder( X_EQ_Y, "1.0.1", "1--1" ); assertOrder( X_EQ_Y, "1.0.0.1", "1---1" ); } @Test public void testUnlimitedNumberOfVersionComponents() { assertOrder( X_GT_Y, "1.0.1.2.3.4.5.6.7.8.9.0.1.2.10", "1.0.1.2.3.4.5.6.7.8.9.0.1.2.3" ); } @Test public void testUnlimitedNumberOfDigitsInNumericComponent() { assertOrder( X_GT_Y, "1.1234567890123456789012345678901", "1.123456789012345678901234567891" ); } @Test public void testTransitionFromDigitToLetterAndViceVersaIsEqualivantToDelimiter() { assertOrder( X_EQ_Y, "1alpha10", "1.alpha.10" ); assertOrder( X_EQ_Y, "1alpha10", "1-alpha-10" ); assertOrder( X_GT_Y, "1.alpha10", "1.alpha2" ); assertOrder( X_GT_Y, "10alpha", "1alpha" ); } @Test public void testWellKnownQualifierOrdering() { assertOrder( X_EQ_Y, "1-alpha1", "1-a1" ); assertOrder( X_LT_Y, "1-alpha", "1-beta" ); assertOrder( X_EQ_Y, "1-beta1", "1-b1" ); assertOrder( X_LT_Y, "1-beta", "1-milestone" ); assertOrder( X_EQ_Y, "1-milestone1", "1-m1" ); assertOrder( X_LT_Y, "1-milestone", "1-rc" ); assertOrder( X_EQ_Y, "1-rc", "1-cr" ); assertOrder( X_LT_Y, "1-rc", "1-snapshot" ); assertOrder( X_LT_Y, "1-snapshot", "1" ); assertOrder( X_EQ_Y, "1", "1-ga" ); assertOrder( X_EQ_Y, "1", "1.ga.0.ga" ); assertOrder( X_EQ_Y, "1.0", "1-ga" ); assertOrder( X_EQ_Y, "1", "1-ga.ga" ); assertOrder( X_EQ_Y, "1", "1-ga-ga" ); assertOrder( X_EQ_Y, "A", "A.ga.ga" ); assertOrder( X_EQ_Y, "A", "A-ga-ga" ); assertOrder( X_EQ_Y, "1", "1-final" ); assertOrder( X_LT_Y, "1", "1-sp" ); assertOrder( X_LT_Y, "A.rc.1", "A.ga.1" ); assertOrder( X_GT_Y, "A.sp.1", "A.ga.1" ); assertOrder( X_LT_Y, "A.rc.x", "A.ga.x" ); assertOrder( X_GT_Y, "A.sp.x", "A.ga.x" ); } @Test public void testWellKnownQualifierVersusUnknownQualifierOrdering() { assertOrder( X_GT_Y, "1-abc", "1-alpha" ); assertOrder( X_GT_Y, "1-abc", "1-beta" ); assertOrder( X_GT_Y, "1-abc", "1-milestone" ); assertOrder( X_GT_Y, "1-abc", "1-rc" ); assertOrder( X_GT_Y, "1-abc", "1-snapshot" ); assertOrder( X_GT_Y, "1-abc", "1" ); assertOrder( X_GT_Y, "1-abc", "1-sp" ); } @Test public void testWellKnownSingleCharQualifiersOnlyRecognizedIfImmediatelyFollowedByNumber() { assertOrder( X_GT_Y, "1.0a", "1.0" ); assertOrder( X_GT_Y, "1.0-a", "1.0" ); assertOrder( X_GT_Y, "1.0.a", "1.0" ); assertOrder( X_GT_Y, "1.0b", "1.0" ); assertOrder( X_GT_Y, "1.0-b", "1.0" ); assertOrder( X_GT_Y, "1.0.b", "1.0" ); assertOrder( X_GT_Y, "1.0m", "1.0" ); assertOrder( X_GT_Y, "1.0-m", "1.0" ); assertOrder( X_GT_Y, "1.0.m", "1.0" ); assertOrder( X_LT_Y, "1.0a1", "1.0" ); assertOrder( X_LT_Y, "1.0-a1", "1.0" ); assertOrder( X_LT_Y, "1.0.a1", "1.0" ); assertOrder( X_LT_Y, "1.0b1", "1.0" ); assertOrder( X_LT_Y, "1.0-b1", "1.0" ); assertOrder( X_LT_Y, "1.0.b1", "1.0" ); assertOrder( X_LT_Y, "1.0m1", "1.0" ); assertOrder( X_LT_Y, "1.0-m1", "1.0" ); assertOrder( X_LT_Y, "1.0.m1", "1.0" ); assertOrder( X_GT_Y, "1.0a.1", "1.0" ); assertOrder( X_GT_Y, "1.0a-1", "1.0" ); assertOrder( X_GT_Y, "1.0b.1", "1.0" ); assertOrder( X_GT_Y, "1.0b-1", "1.0" ); assertOrder( X_GT_Y, "1.0m.1", "1.0" ); assertOrder( X_GT_Y, "1.0m-1", "1.0" ); } @Test public void testUnknownQualifierOrdering() { assertOrder( X_LT_Y, "1-abc", "1-abcd" ); assertOrder( X_LT_Y, "1-abc", "1-bcd" ); assertOrder( X_GT_Y, "1-abc", "1-aac" ); } @Test public void testCaseInsensitiveOrderingOfQualifiers() { assertOrder( X_EQ_Y, "1.alpha", "1.ALPHA" ); assertOrder( X_EQ_Y, "1.alpha", "1.Alpha" ); assertOrder( X_EQ_Y, "1.beta", "1.BETA" ); assertOrder( X_EQ_Y, "1.beta", "1.Beta" ); assertOrder( X_EQ_Y, "1.milestone", "1.MILESTONE" ); assertOrder( X_EQ_Y, "1.milestone", "1.Milestone" ); assertOrder( X_EQ_Y, "1.rc", "1.RC" ); assertOrder( X_EQ_Y, "1.rc", "1.Rc" ); assertOrder( X_EQ_Y, "1.cr", "1.CR" ); assertOrder( X_EQ_Y, "1.cr", "1.Cr" ); assertOrder( X_EQ_Y, "1.snapshot", "1.SNAPSHOT" ); assertOrder( X_EQ_Y, "1.snapshot", "1.Snapshot" ); assertOrder( X_EQ_Y, "1.ga", "1.GA" ); assertOrder( X_EQ_Y, "1.ga", "1.Ga" ); assertOrder( X_EQ_Y, "1.final", "1.FINAL" ); assertOrder( X_EQ_Y, "1.final", "1.Final" ); assertOrder( X_EQ_Y, "1.sp", "1.SP" ); assertOrder( X_EQ_Y, "1.sp", "1.Sp" ); assertOrder( X_EQ_Y, "1.unknown", "1.UNKNOWN" ); assertOrder( X_EQ_Y, "1.unknown", "1.Unknown" ); } @Test public void testCaseInsensitiveOrderingOfQualifiersIsLocaleIndependent() { Locale orig = Locale.getDefault(); try { Locale[] locales = { Locale.ENGLISH, new Locale( "tr" ) }; for ( Locale locale : locales ) { Locale.setDefault( locale ); assertOrder( X_EQ_Y, "1-abcdefghijklmnopqrstuvwxyz", "1-ABCDEFGHIJKLMNOPQRSTUVWXYZ" ); } } finally { Locale.setDefault( orig ); } } @Test public void testQualifierVersusNumberOrdering() { assertOrder( X_LT_Y, "1-ga", "1-1" ); assertOrder( X_LT_Y, "1.ga", "1.1" ); assertOrder( X_EQ_Y, "1-ga", "1.0" ); assertOrder( X_EQ_Y, "1.ga", "1.0" ); assertOrder( X_LT_Y, "1-ga-1", "1-0-1" ); assertOrder( X_LT_Y, "1.ga.1", "1.0.1" ); assertOrder( X_GT_Y, "1.sp", "1.0" ); assertOrder( X_LT_Y, "1.sp", "1.1" ); assertOrder( X_LT_Y, "1-abc", "1-1" ); assertOrder( X_LT_Y, "1.abc", "1.1" ); assertOrder( X_LT_Y, "1-xyz", "1-1" ); assertOrder( X_LT_Y, "1.xyz", "1.1" ); } @Test public void testVersionEvolution() { assertSequence( "0.9.9-SNAPSHOT", "0.9.9", "0.9.10-SNAPSHOT", "0.9.10", "1.0-alpha-2-SNAPSHOT", "1.0-alpha-2", "1.0-alpha-10-SNAPSHOT", "1.0-alpha-10", "1.0-beta-1-SNAPSHOT", "1.0-beta-1", "1.0-rc-1-SNAPSHOT", "1.0-rc-1", "1.0-SNAPSHOT", "1.0", "1.0-sp-1-SNAPSHOT", "1.0-sp-1", "1.0.1-alpha-1-SNAPSHOT", "1.0.1-alpha-1", "1.0.1-beta-1-SNAPSHOT", "1.0.1-beta-1", "1.0.1-rc-1-SNAPSHOT", "1.0.1-rc-1", "1.0.1-SNAPSHOT", "1.0.1", "1.1-SNAPSHOT", "1.1" ); assertSequence( "1.0-alpha", "1.0", "1.0-1" ); assertSequence( "1.0.alpha", "1.0", "1.0-1" ); assertSequence( "1.0-alpha", "1.0", "1.0.1" ); assertSequence( "1.0.alpha", "1.0", "1.0.1" ); } } aether-1.13.1/aether-util/src/test/resources/000077500000000000000000000000001167050556700210645ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/resources/transformer/000077500000000000000000000000001167050556700234265ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/resources/transformer/conflict-id-sorter/000077500000000000000000000000001167050556700271355ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/resources/transformer/conflict-id-sorter/cycle.txt000066400000000000000000000001321167050556700307710ustar00rootroot00000000000000(null) +- gid:aid:ext:ver | \- gid2:aid:ext:ver \- gid2:aid:ext:ver \- gid:aid:ext:veraether-1.13.1/aether-util/src/test/resources/transformer/conflict-id-sorter/cycles.txt000066400000000000000000000004421167050556700311600ustar00rootroot00000000000000(null) +- gid1:aid:ext:ver | \- gid2:aid:ext:ver | \- gid:aid:ext:ver +- gid2:aid:ext:ver | \- gid1:aid:ext:ver +- gid1:aid:ext:ver | \- gid3:aid:ext:ver +- gid3:aid:ext:ver | \- gid1:aid:ext:ver +- gid2:aid:ext:ver | \- gid3:aid:ext:ver \- gid3:aid:ext:ver \- gid2:aid:ext:ver aether-1.13.1/aether-util/src/test/resources/transformer/conflict-id-sorter/no-conflicts.txt000066400000000000000000000001331167050556700322710ustar00rootroot00000000000000(null) +- gid:aid:ext:ver | \- gid2:aid:ext:ver \- gid3:aid:ext:ver \- gid4:aid:ext:veraether-1.13.1/aether-util/src/test/resources/transformer/conflict-id-sorter/simple.txt000066400000000000000000000002071167050556700311660ustar00rootroot00000000000000# simple test case for the ConflictIdSorter (null) +- gid:aid:ext:ver | \- gid:aid2:ext:ver \- gid2:aid:ext:ver \- gid:aid:ext:veraether-1.13.1/aether-util/src/test/resources/transformer/scope-calculator/000077500000000000000000000000001167050556700266665ustar00rootroot00000000000000conflict-and-inheritance.txt000066400000000000000000000007301167050556700342000ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/resources/transformer/scope-calculator# Another scenario to check that scope inheritance considers the effective scopes of parent nodes as determined during # scope conflict resolution. In this example, gid:x:jar:1 should end up in compile scope (and not runtime) because its # parent gid:c:jar:2 will be promoted to compile scope due to a conflict with gid:c:jar:1. gid:root:jar:1 +- gid:a:jar:1:compile | \- gid:c:jar:2:runtime | \- gid:x:jar:1:compile \- gid:b:jar:1:compile \- gid:c:jar:1:compile conflicting-direct-nodes.txt000066400000000000000000000001251167050556700342230ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/resources/transformer/scope-calculator# unlikely case, e.g. illegal POM (null) +- gid:aid:ext:ver:%s \- gid:aid:ext:ver:%saether-1.13.1/aether-util/src/test/resources/transformer/scope-calculator/cycle-a.txt000066400000000000000000000004671167050556700307530ustar00rootroot00000000000000# Checks for graceful handling of cycles in the graph of conflict groups. Below, the group {a:1, a:2} depends on # {b:1, b:2} and vice versa. Additionally, each group contains a direct dependency. gid:root:jar:1 +- gid:a:jar:1:compile | \- gid:b:jar:1:compile \- gid:b:jar:2:runtime \- gid:a:jar:2:runtime aether-1.13.1/aether-util/src/test/resources/transformer/scope-calculator/cycle-b.txt000066400000000000000000000003021167050556700307400ustar00rootroot00000000000000# Variation of cycle-a where the order of direct dependencies has been changed. gid:root:jar:1 +- gid:b:jar:2:runtime | \- gid:a:jar:2:runtime \- gid:a:jar:1:compile \- gid:b:jar:1:compile aether-1.13.1/aether-util/src/test/resources/transformer/scope-calculator/cycle-c.txt000066400000000000000000000005641167050556700307530ustar00rootroot00000000000000# Checks for graceful handling of cycles in the graph of conflict groups. Below, the group {a:1} depends on # {b:1} and vice versa. The conflicting groups consist entirely of non-direct dependencies. gid:root:jar:1 +- gid:x:jar:1:runtime | \- gid:a:jar:1:compile | \- gid:b:jar:1:compile \- gid:y:jar:1:runtime \- gid:b:jar:1:compile \- gid:a:jar:1:compile aether-1.13.1/aether-util/src/test/resources/transformer/scope-calculator/cycle-d.txt000066400000000000000000000002731167050556700307510ustar00rootroot00000000000000# Checks for graceful handling of cycles in the graph of dependency nodes. gid:root:jar:1 \- gid:a:jar:1:compile \- (b)gid:b:jar:1:compile \- gid:a:jar:1:runtime \- ^b aether-1.13.1/aether-util/src/test/resources/transformer/scope-calculator/direct-nodes-winning.txt000066400000000000000000000003421167050556700334550ustar00rootroot00000000000000(null) +- gid:aid:ext:ver:%s +- gid:aid2:ext:ver | \- gid:aid:ext:ver:provided +- gid:aid3:ext:ver | \- gid:aid:ext:ver:runtime +- gid:aid3:ext:ver | \- gid:aid:ext:ver:test \- gid:aid3:ext:ver \- gid:aid:ext:ver:compiledirect-with-conflict-and-inheritance.txt000066400000000000000000000010301167050556700364130ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/resources/transformer/scope-calculator# When a direct dependency scope conflicts with a transitive dependency scope, the direct dependency scope always wins. # When the scope of the transitive dependency is updated, this update needs to be considered by scope inheritance. # In the graph below gid:a:jar:1 has a conflict, after its resolution to test scope, gid:x:jar:1 should end up in # test scope as well, everywhere in the graph. gid:root:jar:1 +- gid:a:jar:1:test | \- gid:x:jar:1:compile \- gid:b:jar:1:compile \- gid:a:jar:1:compile \- gid:x:jar:1:compile aether-1.13.1/aether-util/src/test/resources/transformer/scope-calculator/dueling-scopes.txt000066400000000000000000000002271167050556700323510ustar00rootroot00000000000000# pattern to test scope mediation in conflict groups (null) +- gid:aid2:ext:ver | \- gid:aid:ext:ver:%s \- gid:aid3:ext:ver \- gid:aid:ext:ver:%s aether-1.13.1/aether-util/src/test/resources/transformer/scope-calculator/inheritance.txt000066400000000000000000000000771167050556700317240ustar00rootroot00000000000000root:aid:ext:ver \- gid:aid:ext:ver:%s \- gid:aid:ext:ver:%saether-1.13.1/aether-util/src/test/resources/transformer/scope-calculator/multiple-inheritance.txt000066400000000000000000000001361167050556700335510ustar00rootroot00000000000000(null) +- gid:aid:ext:ver:%s | \- (1)gid2:aid:ext:ver:compile \- gid3:aid:ext:ver:%s \- ^1aether-1.13.1/aether-util/src/test/resources/transformer/scope-calculator/system-1.txt000066400000000000000000000001001167050556700311000ustar00rootroot00000000000000gid:aid:jar:1 +- gid:aid2:jar:2:compile \- gid:aid2:jar:3:systemaether-1.13.1/aether-util/src/test/resources/transformer/scope-calculator/system-2.txt000066400000000000000000000001001167050556700311010ustar00rootroot00000000000000gid:aid:jar:1 +- gid:aid2:jar:2:system \- gid:aid2:jar:3:compileaether-1.13.1/aether-util/src/test/resources/transformer/version-resolver/000077500000000000000000000000001167050556700267525ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/resources/transformer/version-resolver/cycle.txt000066400000000000000000000003011167050556700306040ustar00rootroot00000000000000cycle:root:jar:1 +- cycle:a:jar:1:compile | \- (b)cycle:b:jar:1:compile | \- cycle:c:jar:1:compile | \- (a)cycle:a:jar:1:compile | \- ^b \- cycle:c:jar:1:compile \- ^a aether-1.13.1/aether-util/src/test/resources/visitor/000077500000000000000000000000001167050556700225635ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/resources/visitor/filtering/000077500000000000000000000000001167050556700245465ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/resources/visitor/filtering/parents.txt000066400000000000000000000002131167050556700267570ustar00rootroot00000000000000gid:a:jar:1 +- gid:b:jar:1:compile | \- gid:c:jar:1:compile | \- gid:d:jar:1:compile \- gid:e:jar:1:compile \- gid:f:jar:1:compile aether-1.13.1/aether-util/src/test/resources/visitor/ordered-list/000077500000000000000000000000001167050556700251605ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/resources/visitor/ordered-list/cycles.txt000066400000000000000000000002061167050556700272010ustar00rootroot00000000000000gid:a:jar:1 +- (1)gid:b:jar:1:compile | \- gid:c:jar:1:compile | \- ^1 \- gid:d:jar:1:compile +- ^1 \- gid:e:jar:1:compile aether-1.13.1/aether-util/src/test/resources/visitor/ordered-list/simple.txt000066400000000000000000000001561167050556700272140ustar00rootroot00000000000000gid:a:jar:1 +- gid:b:jar:1:compile | \- gid:c:jar:1:compile \- gid:d:jar:1:compile \- gid:e:jar:1:compile aether-1.13.1/aether-util/src/test/resources/visitor/path-recorder/000077500000000000000000000000001167050556700253225ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/resources/visitor/path-recorder/nested.txt000066400000000000000000000001321167050556700273410ustar00rootroot00000000000000match:x:jar:1 +- gid:a:jar:1:compile | \- match:y:jar:2:compile \- match:y:jar:2:compile aether-1.13.1/aether-util/src/test/resources/visitor/path-recorder/parents.txt000066400000000000000000000002131167050556700275330ustar00rootroot00000000000000gid:a:jar:1 +- gid:b:jar:1:compile | \- gid:c:jar:1:compile | \- gid:d:jar:1:compile \- gid:e:jar:1:compile \- gid:f:jar:1:compile aether-1.13.1/aether-util/src/test/resources/visitor/path-recorder/simple.txt000066400000000000000000000001301167050556700273460ustar00rootroot00000000000000gid:a:jar:1 +- gid:b:jar:1:compile | \- match:x:jar:1:compile \- match:x:jar:2:compile aether-1.13.1/aether-util/src/test/resources/visitor/tree/000077500000000000000000000000001167050556700235225ustar00rootroot00000000000000aether-1.13.1/aether-util/src/test/resources/visitor/tree/cycles.txt000066400000000000000000000001541167050556700255450ustar00rootroot00000000000000gid:a:jar:1 +- (1)gid:b:jar:1:compile | \- gid:c:jar:1:compile | \- ^1 \- gid:d:jar:1:compile \- ^1 aether-1.13.1/pom.xml000066400000000000000000000231451167050556700144030ustar00rootroot00000000000000 4.0.0 org.sonatype.forge forge-parent 10 org.sonatype.aether aether 1.13.1 pom Aether The parent and aggregator for the repository system. http://aether.sonatype.org/ 2010 Aether Developers List aether-dev-subscribe@sonatype.org aether-dev-unsubscribe@sonatype.org aether-dev@sonatype.org Aether Users List aether-user-subscribe@sonatype.org aether-user-unsubscribe@sonatype.org aether-user@sonatype.org Aether Commits List aether-scm-subscribe@sonatype.org aether-scm-unsubscribe@sonatype.org scm:git:git@github.com:sonatype/sonatype-aether.git scm:git:git@github.com:sonatype/sonatype-aether.git http://github.com/sonatype/sonatype-aether jira https://issues.sonatype.org/browse/AETHER Hudson https://builds.sonatype.org/job/aether/ Eclipse Public License, Version 1.0 http://www.eclipse.org/legal/epl-v10.html repo aether-api aether-spi aether-util aether-impl aether-test-util aether-connector-file aether-connector-wagon aether-connector-asynchttpclient true org.sonatype.aether aether-api ${project.version} org.sonatype.aether aether-spi ${project.version} org.sonatype.aether aether-util ${project.version} org.sonatype.aether aether-impl ${project.version} org.sonatype.aether aether-connector-file ${project.version} org.sonatype.aether aether-connector-wagon ${project.version} org.sonatype.aether aether-connector-asynchttpclient ${project.version} org.sonatype.aether aether-test-util ${project.version} test junit junit 4.8.2 test org.codehaus.plexus plexus-component-annotations 1.5.5 provided org.sonatype.sisu sisu-inject-plexus 2.2.3 org.apache.maven.plugins maven-javadoc-plugin 2.5 http://download.oracle.com/javase/6/docs/api/ org.apache.maven.plugins maven-release-plugin 2.1 true org.apache.maven.plugins maven-surefire-plugin 2.9 -Xmx128m ${surefire.redirectTestOutputToFile} ${project.build.directory}/surefire-tmp org.codehaus.mojo animal-sniffer-maven-plugin 1.7 org.codehaus.mojo.signature java15 1.0 check-java-1.5-compat process-classes check org.codehaus.mojo clirr-maven-plugin 2.3 check-api-compat verify check-no-fork org.codehaus.plexus plexus-component-metadata 1.5.5 generate-components-xml generate-metadata demo aether-demo release org.apache.maven.plugins maven-assembly-plugin org.apache.apache.resources apache-source-release-assembly-descriptor 1.0.2 attach-source-release-distro package single true source-release gnu snapshot-sources org.apache.maven.plugins maven-source-plugin attach-sources jar-no-fork