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)


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