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
Filter by
Sorted by
Tagged with
2 votes
0 answers
116 views

Dealing with quarantined jars in maven

I have an internal jfrog artifactory which contains artifacts from various maven repos. There are some jars that are quarantined as they have high CVE vulnerabilities. I want to get the dependency ...
himanshu_mps's user avatar
0 votes
0 answers
181 views

maven plugin that download dependencies but failed to attach them to project compile scope in intellij (maven 3.9.0)

We have a requirement to write a maven plugin that downloads dependencies add them to the compile class-path of project download dependency logic is working as expected. But, when the project is ...
mogli's user avatar
  • 1,579
0 votes
1 answer
208 views

Creating RepositorySystemSession using Aether

I'm trying to get all transitive dependencies of a maven project in a List of Artifacts. I found the documentation of Aether with some example code to set up the process. One part of it is the ...
Caliburns's user avatar
3 votes
1 answer
610 views

How can I use Maven Artifact Resolver to list transitive dependencies?

I am working on an application for my company which needs to resolve dependencies for a maven project. This is a standalone application, not a maven plugin. The only thing I am trying to do at the ...
Cardinal System's user avatar
0 votes
0 answers
30 views

Can I use org.eclipse.aether in Android app?

Background I am trying to develop an Android App for coding,for which I want to parse gradle files and download the repositories which users needs.However,I install my app only to see an error which ...
Xiue's user avatar
  • 1
1 vote
1 answer
296 views

How can I get all plugins from java code including default plugins? Maven

When I build an effective model using help:effective-pom I get such plugins <plugins> <plugin> <artifactId>maven-checkstyle-plugin</artifactId> <...
oliaaa_s's user avatar
2 votes
0 answers
102 views

How to exclude dependencies in aether collectDependencies

I want to build something similar to mvn dependency:tree. If a dependency has an exclusions tag, then its transitive dependencies will not be shown in the resolved result. However, I try to have ...
sleeping's user avatar
1 vote
0 answers
168 views

aether: how to collect all dependencies including parent

There are a fair amount of questions online involving how to use Maven / Aether to download dependencies for a given artifact. I am however stumped as to downloading the parent poms. I have similar ...
Setheron's user avatar
  • 3,670
2 votes
0 answers
128 views

Given a pom.xml how to get list of remote repository URL & checksums

Wouldn't mind some help with the aether API which starts with a given pom.xml I would like to then figure out the transitive closure for the whole project and emit: The remote repository URI for each ...
Setheron's user avatar
  • 3,670
0 votes
0 answers
34 views

Transitively resolve download URLs of artifacts across multiple maven repositories

Given a list of repository URLs, a group, a name, and a version number, is there a simple way to resolve the download URLs for the artifact and all of its dependencies including transitive ...
Kirby Gaming's user avatar
0 votes
1 answer
4k views

Exception org.eclipse.aether.resolution.DependencyResolutionException: Failed to read artifact descriptor for ch.qos.logback:logback-classic:jar:1.2.3

I'm trying to get all maven dependencies of a given artifact by programmatically as mentioned in this solution [1]. I'm trying to get dependencies of ch.qos.logback:logback-classic:1.2.3. public ...
Pramodya Mendis's user avatar
1 vote
0 answers
93 views

How to download dll from maven repo in runtime?

I use eclipse-aether for downloading jars in runtime, but now I need to download dll from maven. I tried a lot different things but failed. One of them DefaultArtifact defaultArtifact = new ...
Иван Гладуш's user avatar
0 votes
1 answer
470 views

How to resolve maven dependency and get all the transitive dependencies using Maven Artifact Resolver?

I have a maven project and I am trying to get all the transitive dependencies of direct dependency using Artifact resolver APIs.How to attain this programmatically? The same functionality I am able ...
Sharanya M.'s user avatar
0 votes
1 answer
713 views

The artifact was found in the local repository but you have explicitly stated that it should be downloaded from a remote one"

I have consumer project, which has spring cloud contract tests verifier,which needs to talk to the stubs jar in the remote repo. The setup for stubsMode: LOCAL works fine, but for remote it throws the ...
Santosh Ravi Teja's user avatar
0 votes
1 answer
2k views

Download maven dependencies programmatically

I have been trying to download all maven dependencies programmatically via aether. I can get all the transitive dependencies (courtesy of the code from https://github.com/apache/maven-resolver/blob/...
Joseph's user avatar
  • 53
8 votes
2 answers
2k views

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 ...
Sahil Muthoo's user avatar
  • 12.3k
0 votes
1 answer
368 views

Custom maven plugin execution fails with classnotfound

I am writing what is essentially my first maven plugin, so this might just be a lack of google skills, but here goes. I am using the maven-plugin-plugin to create a plugin <plugin> ...
Martin Nielsen's user avatar
1 vote
1 answer
108 views

Retrieving artifact release date using Aether Eclipse

I am new to the Aether eclipse plugin, and I am wondering if there is a way (or a XXXRequest) that is able to retrieve the release date of a Maven artifact? Any pointers would be much appreciated! ...
Amine Ben's user avatar
2 votes
0 answers
38 views

What is the difference between a maven root dependency and a direct dependency?

In the aether docs it says that there are three ways to build a dependency graph, to specify a root dependency or a list of direct dependencies. What is the differences between specifying a root ...
zcaudate's user avatar
  • 14.1k
0 votes
0 answers
34 views

When writing a maven plugin, how can I get the Artifacts based on a modified pom?

I am working on enhancing the versions-maven-plugin. I want to tentatively modify the pom.xml files for a project, then look at the version conflicts of the modified pom.xml to decide what ...
Eric Pabst's user avatar
0 votes
0 answers
47 views

Find type of Dependency in Aether

When I analyse Maven dependencies with Aether, I often get objects of class org.eclipse.aether.graph.Dependency I want to extract all dependency information (as in the pom) from this object. This is ...
J Fabian Meier's user avatar
2 votes
0 answers
108 views

Determine parent pom of given pom through maven/Aether

Given a pom.xml file, what would be a reliable way to determine the GAV of the parent? At the moment, I am parsing the XML, but this means that terms like ${some.number} need to be resolved by hand. ...
J Fabian Meier's user avatar
1 vote
0 answers
54 views

How to search a artifact without groupid in maven repo using aether

The issue is like I have two maven remote repository. Repo A and Repo B. My task is to find out all the artifact that is available in Repo A but not in repo B. The artifact may have different groupid ...
Sourav's user avatar
  • 11
1 vote
1 answer
116 views

Specify maven profile to use by aether

I have packed karaf container in docker image, that should be used in test and production. There are different nexus repositories used (the artifacts for production repository are first deployed after ...
9ilsdx 9rvj 0lo's user avatar
1 vote
1 answer
910 views

Eclipse Aether download artifact from https repository

I using Eclipse Aether and I have a problem with downloading artifact from https repository. (For example: https://jitpack.io). Following code: RepositorySystem system = Booter....
Weax Me's user avatar
  • 21
0 votes
1 answer
504 views

Spring Cloud Contract : not able to resolve latest version of stubs in local repo

I'm using Spring Cloud Contract 1.0.2.RELEASE and I'm able to publish the stucs in my local Maven repo. On the consumer side, I then configure my test with : @AutoConfigureStubRunner(ids = {"com....
Vincent F's user avatar
  • 6,943
9 votes
1 answer
13k views

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 ...
Puce's user avatar
  • 37.8k
0 votes
0 answers
133 views

Programmatically Downloading Maven Articats (Aether vs.

I would like to write a small application which downloads an artifact and its transitive dependencies from an m2-format repository. There are two obvious choices for this; Eclipse Aether or Apache ...
jwa's user avatar
  • 3,271
1 vote
0 answers
228 views

Programmatically move an artifact from one repo to another

I need to write a Java program that takes an artifact from a given Nexus repository, including the pom and all side artifacts (like sources, javadoc, whatever) and moves it to a different repository. ...
J Fabian Meier's user avatar
2 votes
1 answer
810 views

Can you get plugin configuration from a POM using aether?

I have a requirement to read plugin configurations in Java. I have used the aether library to get run time dependencies, compile time dependencies etc. But can I use aether to read plugin ...
user_mda's user avatar
  • 18.8k
1 vote
1 answer
492 views

List available versions from sonatype nexus with aether-api

my goal is to develop an internal tool for artifact deploying. The artifacts are located in a local repository management system (sonatype nexus). After researching, I tried to implement the task, ...
bhlx's user avatar
  • 15
0 votes
1 answer
864 views

How to say aether not to fail for dependencies which are not in repository?

I'm trying to collect dependencies of artifacts using eclipse-aether, doing the following: Artifact artifact = ... DependencyVisitor dependencySaver = ... ArtifactDescriptorRequest descriptorRequest ...
Martoon's user avatar
  • 381
1 vote
1 answer
309 views

Eclipse Aether not resolving `LATEST` correctly

Eclipse Aether doesn't seem to return the correct release when I try to resolve a LATEST version: val artifact = DefaultArtifact("org.testng:testng:LATEST") val versionResult = system.resolveVrsion(...
Cedric Beust's user avatar
  • 15.5k
5 votes
2 answers
2k views

How can you find the latest version of a maven artifact from Java using aether?

Their documentation is really slim and I was unable to figure it out. I found a partial answer here, but it doesn't have all the code. How can you find the latest version of a maven artifact from ...
javydreamercsw's user avatar
6 votes
1 answer
3k views

Using Maven3.1, RepositorySystemSession and RepositorySystem are not injected and remain null

My question is very much related to this one But I can't get it working. Hopefully some more eyes on it will help My environment Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-...
kane's user avatar
  • 5,757
3 votes
1 answer
1k views

Aether, how to get dependencies with hierarchy

I'm using eather to re-create the same structure of maven dependency:tree within my code. Following the documentation I found this useful example which correctly list the same depdendencys as the ...
Michele Sacchetti's user avatar
0 votes
1 answer
720 views

spring-cloud-dataflow register custom module from local repository

I have a jar with parent spring-cloud-dataflow-parent, which I register using my local repository --coordinates. But once I execute module info on it, I receive this error: java.lang.RuntimeException: ...
MattEnergy's user avatar
0 votes
1 answer
531 views

What is the difference between Sonatype.Aether and Eclipse.Aether

Currently I am working with 'Aether'. But I am confusing which is the most suitable 'Aether' library. And which one is the most suitable for maven plugin development. Thank you!
Janitha Madushan's user avatar
4 votes
1 answer
2k views

Resolving custom dependencies in maven plugin programmatically

I have a custom maven plugin. In order to retrieve project's dependencies I use jcabi-aether library. It works fine for getting the project-scope dependencies. But what I need is to resolve plugin-...
nKognito's user avatar
  • 6,343
0 votes
1 answer
208 views

How search RemoteRepositories with Aether in Java?

How can I search a specific artifact in Aether? Dependency dependency = new Dependency( new DefaultArtifact( "com.google.code.gson:gson:war:sources:2.5" ), "compile" ); RemoteRepository central = ...
HamedFathi's user avatar
  • 3,809
2 votes
1 answer
527 views

How to use aether to get the latest timestamped snapshot dependency?

I am using aether to resolve dependencies. But in case of a snapshot dependencies where there are multiple timestamps for the same version, it does not honor the timestamps but picks the first ...
user_mda's user avatar
  • 18.8k
0 votes
0 answers
2k views

How do I force Grails to refresh dependencies using my local Maven repository?

I have 2 code bases, a Gradle managed Groovy project and a Grails (2.4) Web app project. The Grails app uses the Groovy project as a dependency. My problem right now is that the Grails app can't seem ...
Psycho Punch's user avatar
  • 6,600
1 vote
1 answer
314 views

Downloading dependencies from pom.xml with Aether

I need to download all dependencies from a given pom.xml in my java programm. In Aether examples I can see only examples of resolving and downloading artifacts by maven coordinates, so I have to parse ...
Vladislav's user avatar
  • 119
0 votes
0 answers
202 views

Why is the path to the artifact in aether-ant messed up on my Windows Slave?

I'm using aether-ant to resolve dependencies from a pom.xml file. When running the script on my jenkins master, then the path to the artifacts looks like: stomp pl: C:\m2\be\mips\stomp-windows\1.0-...
Lieven Cardoen's user avatar
1 vote
3 answers
2k views

Java Code to get Maven Dependency Graph

One of the requirements for a program I am working on is that I need to be able to look through the Maven dependencies of several artifacts in a repository so I can create dependency graphs for them. ...
Dragonfiremalus's user avatar
1 vote
1 answer
966 views

How to check if a maven artifact exists in remote repository

How can I check a maven artifact is exists or not in a remote repository using Java. Is there any options provided in Aether APIs?
ѕтƒ's user avatar
  • 3,597
1 vote
0 answers
67 views

How to set up Aether to also resolve SNAPSHOT dependencies? [duplicate]

I am using the following snippet (from the aether examples) to resolve maven dependencies using Aether. BUt it fails for the snapshot dependencies. Is there a way I can set up the configuration to ...
user_mda's user avatar
  • 18.8k
1 vote
1 answer
201 views

How to get programmatically the highest version for a Maven artifact from my local repository?

in many posts I saw that the Aether project helps in working with artifact repositories. What I would like is to retrieve the highest version for a specified groupId and artifactId only. In Aether ...
Kilátó's user avatar
  • 413
0 votes
0 answers
461 views

How to mock a maven repository?

I am using Aether to manage and control maven dependencies of my project. I need to add unit tests that need maven dependency resolution. How do I achieve this without talking to the real maven repo ...
user_mda's user avatar
  • 18.8k
0 votes
1 answer
462 views

How to make sure Aether 'downloads' all dependencies in your local repo?

I am trying to resolve direct dependencies for a project, basically the run time and compile time dependencies in its POM and also the transitives. For this I have the following code public class ...
user_mda's user avatar
  • 18.8k