[
https://issues.apache.org/jira/browse/MNG-7924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17784389#comment-17784389
]
ASF GitHub Bot commented on MNG-7924:
-------------------------------------
cstamas commented on PR #1299:
URL: https://github.com/apache/maven/pull/1299#issuecomment-1803653059
Type is part of Maven DNA, and let me try to explain why:
When you are on "resolver level" (so no Maven in vicinity, like MIMA or
Resolver "demos" runs), you are dealing with "artifacts", that are really just
"named files" or "files with coordinates", and coordinates are needed to lay
these files out in some "space" (layout). There is NO whatsoever assumption
about "what those files are". At this level resolver merely cares about getting
you these files and publishing these files for you.
When you hop abstraction level higher, at Maven level, you do not deal
(never!) with "artifacts" anymore, but you attribute the usage (or role) to
artifact, so in Maven you deal with:
* artifact that is the project
* artifact that is the parent POM
* artifact that is maven-plugin
* artifact that is a dependency
* etc
(so, "artifact" is superset of ALL things Maven uses, but in Maven universe
you KNOW and TELL (implicitly or explicitly) what you want that artifact for).
And while you have "implied types" (parent POM, maven-plugin, extension, etc
are "implied types"), for dependencies you need something "extra" to express
"what it is" (or "what I want with it"), and the type serves that purpose.
We could add "flags" to dependencies, but that would make Maven very very
"low level", and would trigger a huge cognitive load on end users IMHO. Rather
move "baby steps" with improvements, and we will see where it gets us.
> Better control over and better integration with Resolver
> --------------------------------------------------------
>
> Key: MNG-7924
> URL: https://issues.apache.org/jira/browse/MNG-7924
> Project: Maven
> Issue Type: Task
> Components: Artifacts and Repositories
> Reporter: Tamas Cservenak
> Priority: Major
> Fix For: 4.0.0-alpha-9
>
>
> Integrate better and obtain better control over Resolver. These changes did
> stem from "[JPMS module
> experiment|https://cwiki.apache.org/confluence/display/MAVEN/Experiment+-+Explicit+JPMS+support]"
> and are considered improvement but *does not implement any functionality*
> related to JPMS module support.
> Changes:
> * Maven4 should stop "disconnected coexistence" of two type systems
> (ArtifactHandlers and Resolver ArtifactTypeRegistry), it should unify them.
> * Maven4 Core should provide generic and extensible means to introduce new
> artifact types (fully in extension, and extension should get extended data
> via "roundtrip" in core/resolver)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)