Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Aether/Getting Aether
< Aether
Revision as of 19:11, 4 February 2012 by Bentmann.sonatype.com (Talk | contribs) (Added page about 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>1.13.1</aetherVersion> <mavenVersion>3.0.3</mavenVersion> <wagonVersion>1.0</wagonVersion> </properties> ... <dependencies> <dependency> <groupId>org.sonatype.aether</groupId> <artifactId>aether-api</artifactId> <version>${aetherVersion}</version> </dependency> <dependency> <groupId>org.sonatype.aether</groupId> <artifactId>aether-util</artifactId> <version>${aetherVersion}</version> </dependency> <dependency> <groupId>org.sonatype.aether</groupId> <artifactId>aether-impl</artifactId> <version>${aetherVersion}</version> </dependency> <dependency> <groupId>org.sonatype.aether</groupId> <artifactId>aether-connector-file</artifactId> <version>${aetherVersion}</version> </dependency> <dependency> <groupId>org.sonatype.aether</groupId> <artifactId>aether-connector-asynchttpclient</artifactId> <version>${aetherVersion}</version> </dependency> <dependency> <groupId>org.sonatype.aether</groupId> <artifactId>aether-connector-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.sonatype.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.