Permalink
Browse files

Bug 358749 - Initial contribution

  • Loading branch information...
0 parents commit cf84cfb78f3d488a83d974f485a6551bdee20bf9 @bentmann bentmann committed Oct 26, 2011
Showing 1,003 changed files with 64,342 additions and 0 deletions.
@@ -0,0 +1,8 @@
+target/
+.project
+.classpath
+.settings/
+.idea
+*.iml
+*.ipr
+*.iws
@@ -0,0 +1,35 @@
+Homepage
+========
+<http://www.eclipse.org/aether/>
+
+Wiki
+====
+<https://docs.sonatype.org/display/AETHER/Home>
+
+Issue Tracker
+=============
+<https://bugs.eclipse.org/bugs/buglist.cgi?query_format=specific&order=relevance+desc&bug_status=__open__&product=Aether>
+
+Mailing Lists
+=============
+- Development of Aether:
+ <aether-dev@eclipse.org> to post mails
+ <https://dev.eclipse.org/mailman/listinfo/aether-dev> to subscribe to the list or unsubscribe from it
+- Usage of Aether:
+ <aether-users@eclipse.org> to post mails
+ <https://dev.eclipse.org/mailman/listinfo/aether-users> to subscribe to the list or unsubscribe from it
+
+Contribution
+============
+As required by the Eclipse IP process, all contributions need to be submitted in form of patches attached to a
+[Bugzilla entry](https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Aether), thereby being subject to the
+[Eclipse Terms of Use](http://www.eclipse.org/legal/termsofuse.php). For clarity, patches should be provided as
+standalone files attached to the issue, not as text embedded in the issue description or a comment.
+
+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.
+
+License
+=======
+- [Eclipse Public License, v1.0](http://www.eclipse.org/legal/epl-v10.html)
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ ~ Copyright (c) 2010, 2011 Sonatype, Inc.
+ ~ All rights reserved. This program and the accompanying materials
+ ~ are made available under the terms of the Eclipse Public License v1.0
+ ~ which accompanies this distribution, and is available at
+ ~ http://www.eclipse.org/legal/epl-v10.html
+ ~
+ ~ Contributors:
+ ~ Sonatype, Inc. - initial API and implementation
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.aether</groupId>
+ <artifactId>aether</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>aether-api</artifactId>
+
+ <name>Aether :: API</name>
+ <description>
+ The application programming interface for the repository system.
+ </description>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>animal-sniffer-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>clirr-maven-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+</project>
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2010, 2011 Sonatype, Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sonatype, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.aether;
+
+
+/**
+ * A skeleton implementation for custom repository listeners. The callback methods in this class do nothing.
+ */
+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 )
+ {
+ }
+
+}
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * Copyright (c) 2010, 2011 Sonatype, Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sonatype, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.aether;
+
+
+/**
+ * The keys and defaults for common configuration properties.
+ * @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<String, String>}, 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 .<repoId>} 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 .<repoId>} 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
+ }
+
+}
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2010, 2011 Sonatype, Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sonatype, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.aether;
+
+
+/**
+ * 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. <strong>Note:</strong>
+ * Actual cache implementations must be thread-safe.
+ */
+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.
+ * <strong>Warning:</strong> 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. <strong>Warning:</strong> 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 );
+
+}
Oops, something went wrong.

0 comments on commit cf84cfb

Please sign in to comment.