Questions tagged [aether]

Aether is a Java library that provides a foundation of standards and best practices for tools and systems that need to interact with software artifact libraries. Integrated into Apache Maven, Sonatype Nexus, and Eclipse m2eclipse, the Aether library is used by millions of developers every day to download and upload artifacts.

Aether is a Java library that provides a foundation of standards and best practices for tools and systems that need to interact with software artifact libraries. Integrated into Apache Maven, Sonatype Nexus, and Eclipse m2eclipse, the Aether library is used by millions of developers every day to download and upload artifacts.

104 questions
42
votes
7 answers

How to get access to Maven's dependency hierarchy within a plugin

In my plugin I need to process the dependency hierarchy and get information (groupId, artifactId, version etc) about each dependency and if it was excluded. What is the best way to do this?
talk to frank
  • 1,821
  • 4
  • 20
  • 21
21
votes
3 answers

java.lang.ClassNotFoundException: org.sonatype.aether.version.InvalidVersionSpecificationException

I am using the maven indexer to fetch the maven index from the maven central repository. Since I updated from org.sonatype.aether to org.eclipse.aether and from maven 3.0.5 to maven 3.1.0 I am getting this Exception. Caused by:…
Robert Reiz
  • 4,243
  • 2
  • 30
  • 43
15
votes
6 answers

Programmatically resolving Maven dependencies outside of a plugin - get RepositorySystemSession and RepositorySystem

Maybe this is going to be a larger task than I had originally thought, but regardless, I'm trying to load a MavenProject from a file and then resolve its dependencies. I've got the code for both bits but I'm missing some object references that I…
Ed .
  • 6,373
  • 8
  • 62
  • 82
15
votes
4 answers

Fetching Maven artifacts programmatically

I'm looking for a Java API which can be used to retreive Maven artifacts from a remote repository. I've found Eclipse Ather so far but it looks over complicated for my needs so i'm seeking for something more simple. What i need is: I have to…
NagyI
  • 5,907
  • 8
  • 55
  • 83
10
votes
4 answers

How to get local repository location from Maven 3.0 plugin?

How to get local repository location (URI) from within Maven 3.x plugin?
yegor256
  • 102,010
  • 123
  • 446
  • 597
9
votes
1 answer

Maven: get all dependencies programmatically

How can I programmatically get all dependencies of a Maven module outside a Maven execution environment? So far I have: via maven-core: Path pomPath = ...; MavenXpp3Reader reader = new MavenXpp3Reader(); try (InputStream is =…
Puce
  • 37,247
  • 13
  • 80
  • 152
9
votes
1 answer

Can a maven mojo relying on Aether be compatible with Maven 3.0.x and 3.1.x?

The 3.1.0 release of Maven relies on Eclipse Aether (org.eclipse.aether) instead of Sonatype Aether (org.sonatype.aether). This seems to break compatibility for plugins relying on Sonatype aether : try running such plugins and you'll run into…
Anthony Dahanne
  • 4,823
  • 2
  • 40
  • 39
9
votes
3 answers

Retrieving Maven Artifact from Repository using Maven Java API

If I have a Maven Artifact information (GroupId, ArtifactId, Version) how can I programmatically (using Java) retrieve that Artifact from my local repository? Specifically, I need to be able to connect to the Maven Repository and create/retrieve a…
davdic
  • 249
  • 3
  • 10
8
votes
2 answers

Programatically getting an effective POM using Maven Resolver Provider

What do I want to do? Given a POM file on the local filesystem. I want to programmatically obtain the effective POM of that POM file. Specifically I want to do the following: Resolve the POMs dependencies Ensure that all parent POMs are…
Sahil Muthoo
  • 12,033
  • 2
  • 29
  • 38
8
votes
2 answers

Multiple SLF4J bindings with Play 2.3.8

I use Play Framework 2.3.8 (for Java) with Scala 2.11. I get this warning: SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in…
8
votes
1 answer

How to download dependencies inside a maven plugin?

What's the best way to download remote maven artifact from within a maven plugin while also supporting maven 2.2.x1), 3.0.x, 3.1.x and newer? Aether seems a good candidate but it changed package namespace between 3.0.5 and 3.1 breaking…
Johan Sjöberg
  • 47,929
  • 21
  • 130
  • 148
8
votes
1 answer

Error injecting DefaultRepositorySystem in maven-plugin-testing-harness

I am trying to create a new maven (3.0.3) plugin based on an existing (2.0) plugin, and facilitating aether to pickup some dependencies. I tried to create a simple test to load the mojo using the maven-plugin-testing-harness (version 2.0.1), but…
Niels Bech Nielsen
  • 4,777
  • 1
  • 21
  • 44
7
votes
1 answer

How to externalise Maven credentials in Grails 2.4

I'm trying to migrate from using Ivy to using the Aether resolver in a Grails 2.4 project. The issue I am having is in relation to externalising the credentials. Info related to this can be found in the Grails manual here:…
James Xabregas
  • 726
  • 7
  • 22
7
votes
2 answers

How to programmatically list all transitive dependencies, including overridden ones in Maven using DependencyGraphBuilder?

This is similar to other questions (like this), but I want to be able to do this with the latest API's. The maven-dependency-plugin:tree verbose option has been deprecated and does nothing in the latest (2.5.1) code, so there is no good example of…
Ben
  • 4,785
  • 3
  • 27
  • 39
7
votes
2 answers

How do I download a jar using maven programatically

I am writing an application that requires me to download a jar given the mavens groupid/artifactid/version. I currently start with public Model pomToModel(String pomUrl) throws Exception { URL url = new URL(pomUrl); InputStream stream =…
Phil Rice
  • 151
  • 1
  • 6
1
2 3 4 5 6 7