[ 
https://issues.apache.org/jira/browse/MNG-7924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17784405#comment-17784405
 ] 

ASF GitHub Bot commented on MNG-7924:
-------------------------------------

cstamas commented on PR #1299:
URL: https://github.com/apache/maven/pull/1299#issuecomment-1803688709

   Another important thing people forget is that `type != packaging`, and due 
this bias/assumption they come up with wrong conclusions...
   
   Type is NOT packaging, but they CAN be equal. Think about "producer" 
(project producing artifact) and "consumer" (project that consumes produced 
artifact). And let's stick with "jar artifact" for simplicity.
   
   Producer can produce jar in several ways:
   * packaging=jar the most ordinary way
   * packaging=takari-jar very common
   * packaging=my-supercool-jar (ie. I come up with some my own flavour of 
packaging for JARs)
   * etc
   
   As you see, technically "endless" options for producing JARs (technically, 
while in reality few people will care to introduce new packaging, but is not 
uncommon).
   
   Consumer can consume these jars above in several ways:
   * dependency type=jar the most ordinary way
   * dependency type=takari-jar very uncommon, but here you must have 
takari-lifecycle extension present. In fact, this is semantically wrong, and 
shows my pet-peeve, even sonatype does it wrong
   * dependency type=my-supercool-jar ditto, you need extension
   
   So as you see, not that packaging != type but they are actually `n:m` or 
unsure, how to express it...
   
   Sonatype does it wrong:
   
https://search.maven.org/artifact/io.takari.maven.plugins/takari-lifecycle-plugin/2.1.1/takari-maven-plugin
   
   They recommend to "consume" this plugin as:
   ```
   <dependency>
     <groupId>io.takari.maven.plugins</groupId>
     <artifactId>takari-lifecycle-plugin</artifactId>
     <version>2.1.1</version>
     <type>takari-maven-plugin</type>
   </dependency>
   ```
   
   Which is wrong, as to make Maven understand `takari-maven-plugin` you need 
takari-lifecycle-plugin :smile: 
   
   Simply put, Sonatype search suffers from [this 
issue](https://issues.apache.org/jira/browse/MNG-7373?focusedCommentId=17769743&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17769743)




> 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)

Reply via email to