Skip to main content
Jump to: navigation, search

Difference between revisions of "Aether/Getting Aether"

(Added page about getting Aether)
 
m
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{Warning|For the time being, this article actually refers to Sonatype Aether, i.e. the predecessor of Eclipse Aether. While the artifact coordinates and class names mentioned below differ slightly from those of Eclipse Aether, the general concept for usage of Aether will remain the same once the Maven Aether Provider has adopted Eclipse Aether.}}
 
 
 
 
If you would like to take Aether for a test drive, the easiest way is probably to setup a simple Maven project. These are the XML bits for your POM to get Aether onto your class path:
 
If you would like to take Aether for a test drive, the easiest way is probably to setup a simple Maven project. These are the XML bits for your POM to get Aether onto your class path:
 
<source lang="xml">
 
<source lang="xml">
Line 7: Line 4:
 
   ...
 
   ...
 
   <properties>
 
   <properties>
     <aetherVersion>1.13.1</aetherVersion>
+
     <aetherVersion>1.0.0.v20140518</aetherVersion>
     <mavenVersion>3.0.3</mavenVersion>
+
     <mavenVersion>3.1.0</mavenVersion>
 
     <wagonVersion>1.0</wagonVersion>
 
     <wagonVersion>1.0</wagonVersion>
 
   </properties>
 
   </properties>
Line 14: Line 11:
 
   <dependencies>
 
   <dependencies>
 
     <dependency>
 
     <dependency>
       <groupId>org.sonatype.aether</groupId>
+
       <groupId>org.eclipse.aether</groupId>
 
       <artifactId>aether-api</artifactId>
 
       <artifactId>aether-api</artifactId>
 
       <version>${aetherVersion}</version>
 
       <version>${aetherVersion}</version>
 
     </dependency>
 
     </dependency>
 
     <dependency>
 
     <dependency>
       <groupId>org.sonatype.aether</groupId>
+
       <groupId>org.eclipse.aether</groupId>
 
       <artifactId>aether-util</artifactId>
 
       <artifactId>aether-util</artifactId>
 
       <version>${aetherVersion}</version>
 
       <version>${aetherVersion}</version>
 
     </dependency>
 
     </dependency>
 
     <dependency>
 
     <dependency>
       <groupId>org.sonatype.aether</groupId>
+
       <groupId>org.eclipse.aether</groupId>
 
       <artifactId>aether-impl</artifactId>
 
       <artifactId>aether-impl</artifactId>
 
       <version>${aetherVersion}</version>
 
       <version>${aetherVersion}</version>
 
     </dependency>
 
     </dependency>
 
     <dependency>
 
     <dependency>
       <groupId>org.sonatype.aether</groupId>
+
       <groupId>org.eclipse.aether</groupId>
       <artifactId>aether-connector-file</artifactId>
+
       <artifactId>aether-connector-basic</artifactId>
 
       <version>${aetherVersion}</version>
 
       <version>${aetherVersion}</version>
 
     </dependency>
 
     </dependency>
 
     <dependency>
 
     <dependency>
       <groupId>org.sonatype.aether</groupId>
+
       <groupId>org.eclipse.aether</groupId>
       <artifactId>aether-connector-asynchttpclient</artifactId>
+
       <artifactId>aether-transport-file</artifactId>
 
       <version>${aetherVersion}</version>
 
       <version>${aetherVersion}</version>
 
     </dependency>
 
     </dependency>
 
     <dependency>
 
     <dependency>
       <groupId>org.sonatype.aether</groupId>
+
       <groupId>org.eclipse.aether</groupId>
       <artifactId>aether-connector-wagon</artifactId>
+
       <artifactId>aether-transport-http</artifactId>
 +
      <version>${aetherVersion}</version>
 +
    </dependency>
 +
    <dependency>
 +
      <groupId>org.eclipse.aether</groupId>
 +
      <artifactId>aether-transport-wagon</artifactId>
 
       <version>${aetherVersion}</version>
 
       <version>${aetherVersion}</version>
 
     </dependency>
 
     </dependency>
Line 59: Line 61:
  
 
Let's have a closer look at these dependencies and what they are used for:
 
Let's have a closer look at these dependencies and what they are used for:
* <tt>aether-api</tt><br/>This JAR contains the application programming interfaces that clients of Aether use. The entry point to the system is <tt>org.sonatype.aether.RepositorySystem</tt>.
+
* <tt>aether-api</tt><br/>This JAR contains the application programming interfaces that clients of Aether use. The entry point to the system is <tt>org.eclipse.aether.RepositorySystem</tt>.
 
* <tt>aether-util</tt><br/>Here are various utility classes and ready-made components of the repository system collected.
 
* <tt>aether-util</tt><br/>Here are various utility classes and ready-made components of the repository system collected.
 
* <tt>aether-impl</tt><br/>This archive hosts many actual implementation classes of the repository system. Unless one intents to customize internals of the system or needs to manually wire it together, clients should not access any classes from this JAR directly.
 
* <tt>aether-impl</tt><br/>This archive hosts many actual implementation classes of the repository system. Unless one intents to customize internals of the system or needs to manually wire it together, clients should not access any classes from this JAR directly.
* <tt>aether-connector-file</tt><br/>The transport layer that handles the uploads/downloads of artifacts is realized by so called repository connectors. This particular connector adds support for transfers to and from Maven repositories using <tt>file:</tt> URLs.
+
* <tt>aether-connector-basic</tt><br/>The uploads and downloads of artifacts to remote repositories are realized by so called repository connectors. This particular connector is somewhat generic and delegates part of the work to pluggable transport protocols and repository layouts. So to be clear, by itself, this connector can't access any repository, one always needs to include one or more transport modules to get a functioning system.
* <tt>aether-connector-asynchttpclient</tt><br/>This connector enables access to <tt>http:</tt> and <tt>https:</tt> based Maven repositories.
+
* <tt>aether-transport-file</tt><br/>A transport module that adds support to access repositories using <tt>file:</tt> URLs.
* <tt>aether-connector-wagon</tt><br/>This connector is based on [http://maven.apache.org/wagon/ Maven Wagon] and can employ any existing Wagon providers to access Maven repositories.
+
* <tt>aether-transport-http</tt><br/>This module enables access to <tt>http:</tt> and <tt>https:</tt> based repositories.
 +
* <tt>aether-transport-wagon</tt><br/>This transport module is based on [http://maven.apache.org/wagon/ Maven Wagon] and can employ any existing Wagon providers to access repositories.
 +
* <tt>wagon-ssh</tt><br/>This dependency complements the previously mentioned <tt>aether-transport-wagon</tt> and adds support for tranfers using the <tt>scp:</tt> and <tt>sftp:</tt> schemes. Its inclusion in the above POM snippet is merely an example, use whatever Wagon providers fit your needs or none at all, in which case one can also drop <tt>aether-transport-wagon</tt> from the list.
 
* <tt>maven-aether-provider</tt><br/>This dependency provides the pieces to employ Maven POMs as artifact descriptors and extract dependency information from them. Furthermore, it provides the handling of the other metadata files used in a Maven repository.
 
* <tt>maven-aether-provider</tt><br/>This dependency provides the pieces to employ Maven POMs as artifact descriptors and extract dependency information from them. Furthermore, it provides the handling of the other metadata files used in a Maven repository.
* <tt>wagon-ssh</tt><br/>This dependency adds support for tranfers using the <tt>scp:</tt> and <tt>sftp:</tt> schemes. Its inclusion in the above POM snippet is merely an example, use whatever Wagon providers fit your needs or none at all.
 
  
 
''Note:'' Aether targets Java 1.5+ so be sure to set your compiler settings accordingly.
 
''Note:'' Aether targets Java 1.5+ so be sure to set your compiler settings accordingly.
  
 
Now that you have the dependencies of your toy project together, you likely want to know how to go about {{AetherLink|Setting Aether Up}}.
 
Now that you have the dependencies of your toy project together, you likely want to know how to go about {{AetherLink|Setting Aether Up}}.
 +
 +
[[Category:Aether]]

Latest revision as of 01:41, 10 July 2014

If you would like to take Aether for a test drive, the easiest way is probably to setup a simple Maven project. These are the XML bits for your POM to get Aether onto your class path:

<project>
  ...
  <properties>
    <aetherVersion>1.0.0.v20140518</aetherVersion>
    <mavenVersion>3.1.0</mavenVersion>
    <wagonVersion>1.0</wagonVersion>
  </properties>
  ...
  <dependencies>
    <dependency>
      <groupId>org.eclipse.aether</groupId>
      <artifactId>aether-api</artifactId>
      <version>${aetherVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.aether</groupId>
      <artifactId>aether-util</artifactId>
      <version>${aetherVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.aether</groupId>
      <artifactId>aether-impl</artifactId>
      <version>${aetherVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.aether</groupId>
      <artifactId>aether-connector-basic</artifactId>
      <version>${aetherVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.aether</groupId>
      <artifactId>aether-transport-file</artifactId>
      <version>${aetherVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.aether</groupId>
      <artifactId>aether-transport-http</artifactId>
      <version>${aetherVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.aether</groupId>
      <artifactId>aether-transport-wagon</artifactId>
      <version>${aetherVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-aether-provider</artifactId>
      <version>${mavenVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.wagon</groupId>
      <artifactId>wagon-ssh</artifactId>
      <version>${wagonVersion}</version>
    </dependency>
  </dependencies>
  ...
</project>

Let's have a closer look at these dependencies and what they are used for:

  • aether-api
    This JAR contains the application programming interfaces that clients of Aether use. The entry point to the system is org.eclipse.aether.RepositorySystem.
  • aether-util
    Here are various utility classes and ready-made components of the repository system collected.
  • aether-impl
    This archive hosts many actual implementation classes of the repository system. Unless one intents to customize internals of the system or needs to manually wire it together, clients should not access any classes from this JAR directly.
  • aether-connector-basic
    The uploads and downloads of artifacts to remote repositories are realized by so called repository connectors. This particular connector is somewhat generic and delegates part of the work to pluggable transport protocols and repository layouts. So to be clear, by itself, this connector can't access any repository, one always needs to include one or more transport modules to get a functioning system.
  • aether-transport-file
    A transport module that adds support to access repositories using file: URLs.
  • aether-transport-http
    This module enables access to http: and https: based repositories.
  • aether-transport-wagon
    This transport module is based on Maven Wagon and can employ any existing Wagon providers to access repositories.
  • wagon-ssh
    This dependency complements the previously mentioned aether-transport-wagon and adds support for tranfers using the scp: and sftp: schemes. Its inclusion in the above POM snippet is merely an example, use whatever Wagon providers fit your needs or none at all, in which case one can also drop aether-transport-wagon from the list.
  • maven-aether-provider
    This dependency provides the pieces to employ Maven POMs as artifact descriptors and extract dependency information from them. Furthermore, it provides the handling of the other metadata files used in a Maven repository.

Note: Aether targets Java 1.5+ so be sure to set your compiler settings accordingly.

Now that you have the dependencies of your toy project together, you likely want to know how to go about Setting Aether Up.

Back to the top