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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to