Jump to: navigation, search

Aether/Getting 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:

<project>
  ...
  <properties>
    <aetherVersion>0.9.0.M2</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-file</artifactId>
      <version>${aetherVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.aether</groupId>
      <artifactId>aether-connector-asynchttpclient</artifactId>
      <version>${aetherVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.aether</groupId>
      <artifactId>aether-connector-wagon</artifactId>
      <version>${aetherVersion}</version>
    </dependency>
    <dependency>
      <groupId>io.tesla.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-file
    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 file: URLs.
  • aether-connector-asynchttpclient
    This connector enables access to http: and https: based Maven repositories.
  • aether-connector-wagon
    This connector is based on Maven Wagon and can employ any existing Wagon providers to access Maven repositories.
  • 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.
  • wagon-ssh
    This dependency 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.

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.