ArtifactMetadataSource

18 views
Skip to first unread message

Andrzej Jarmoniuk

unread,
Nov 19, 2022, 4:12:23 PM11/19/22
to mojohaus-dev
Hi all,

I'd like to move away from using maven-compat for versions-maven-plugin, and especially from using ArtifactMetadataSource. I've come across this guide,


but it seems to be unclear what the new API might be. Is it RepositoryMetadataManager, which is used internally by ArtifactMetadataSource, or is the target API going to be Maven Resolver (which has been mentioned by in the guide I linked to)?

Best regards
Andrzej

Slawomir Jaranowski

unread,
Nov 20, 2022, 3:19:57 AM11/20/22
to mojoha...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "mojohaus-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mojohaus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mojohaus-dev/d1f48926-e0a2-40cb-9676-6de004ec8631n%40googlegroups.com.


--
Sławomir Jaranowski

Andrzej Jarmoniuk

unread,
Nov 20, 2022, 11:28:50 AM11/20/22
to mojohaus-dev
Thanks. I'm looking into that. I see some adapting between org.eclipse.aether and org.maven is needed. Do you know of any readily available adapters?

Op zondag 20 november 2022 om 09:19:57 UTC+1 schreef s.jara...@gmail.com:

Slawomir Jaranowski

unread,
Nov 20, 2022, 4:26:39 PM11/20/22
to mojoha...@googlegroups.com
niedz., 20 lis 2022 o 17:28 Andrzej Jarmoniuk <a.jar...@gmail.com> napisał(a):
Thanks. I'm looking into that. I see some adapting between org.eclipse.aether and org.maven is needed. Do you know of any readily available adapters?


We only use one method retrieveAvailableVersions from ArtifactMetadataSource.

There is example how to find all versions:

There are no adapters - we can use the resolver API directly, it has the org.eclipse.aether package for historical reasons.

 
Op zondag 20 november 2022 om 09:19:57 UTC+1 schreef s.jara...@gmail.com:

sob., 19 lis 2022 o 22:12 Andrzej Jarmoniuk <a.jar...@gmail.com> napisał(a):
Hi all,

I'd like to move away from using maven-compat for versions-maven-plugin, and especially from using ArtifactMetadataSource. I've come across this guide,


but it seems to be unclear what the new API might be. Is it RepositoryMetadataManager, which is used internally by ArtifactMetadataSource, or is the target API going to be Maven Resolver (which has been mentioned by in the guide I linked to)?

Best regards
Andrzej

--
You received this message because you are subscribed to the Google Groups "mojohaus-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mojohaus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mojohaus-dev/d1f48926-e0a2-40cb-9676-6de004ec8631n%40googlegroups.com.


--
Sławomir Jaranowski

--
You received this message because you are subscribed to the Google Groups "mojohaus-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mojohaus-dev...@googlegroups.com.

Andrzej Jarmoniuk

unread,
Nov 21, 2022, 12:41:11 AM11/21/22
to mojohaus-dev
Thank you. I did see those examples. The reason I'm asking this is that, e.g. the VersionRequest class, which is used as an argument for VersionResolver.resolveVersion, takes org.eclipse.aether.artifact.Artifact and a list of org.eclipse.aether.repository.RemoteRepository (which a child of org.eclipse.aether.repository.ArtifactRepository) as argumens. These, while similar, do require some adapting. I was asking if there already exist some utilities to map those. If not, I'll simply do it on my own :)

Best regards
Andrzej

Op zondag 20 november 2022 om 22:26:39 UTC+1 schreef s.jara...@gmail.com:

Slawomir Jaranowski

unread,
Nov 21, 2022, 1:35:41 AM11/21/22
to mojoha...@googlegroups.com
pon., 21 lis 2022 o 06:41 Andrzej Jarmoniuk <a.jar...@gmail.com> napisał(a):
Thank you. I did see those examples. The reason I'm asking this is that, e.g. the VersionRequest class, which is used as an argument for VersionResolver.resolveVersion, takes org.eclipse.aether.artifact.Artifact and a list of org.eclipse.aether.repository.RemoteRepository (which a child of org.eclipse.aether.repository.ArtifactRepository) as argumens. These, while similar, do require some adapting. I was asking if there already exist some utilities to map those. If not, I'll simply do it on my own :)


There is org.apache.maven.RepositoryUtils from maven-core
 
Reply all
Reply to author
Forward
0 new messages