Skip to content

Conversation

@kwin
Copy link
Member

@kwin kwin commented May 18, 2024

(with a related artifact handler)

@kwin kwin requested review from cstamas and hboutemy May 18, 2024 15:09
@kwin kwin force-pushed the feature/clarify-dependency-types branch from 827787d to 87229d3 Compare May 18, 2024 15:10
see {{{/ref/current/maven-core/artifact-handlers.html}default artifact handlers}} for a list. New types can be
defined by plugins that set <<<extensions>>> to true, so this is not a complete list.

In case there is an artifact handler defined there are <two> different ways of referencing the same dependency:
Copy link
Member

@cstamas cstamas May 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find this very much mixed up and not quite comprehensive. @hboutemy

Issues:

  • by removal of "filename", the term "extension" is suddenly changing it's meaning (maven extension? this was my first thought while trying to comprehend the message)
  • did you maybe mix up the "former and latter"?
  • I find this very confusing all in all. Type is type, why do you want to mixin here file extension?

Copy link
Member Author

@kwin kwin May 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

by removal of "filename", the term "extension" is suddenly changing it's meaning (maven extension? this was my first thought while trying to comprehend the message)

you kind of said the opposite in apache/maven#1466 (comment). This is the extension of the artifact which is not necessarily the extension of the filename!

The depensency extension is told by type. Deoendency is never "anywhere on disk", it may come from repo only.

or in apache/maven#1466 (comment)

It is artifact that you need to inspect, not the backing file.
yes, good catch will fix.

I find this very confusing all in all. Type is type, why do you want to mixin here file extension

First of all, there was a mention of file extension before this PR, with this PR I only refer to artifact extension (do you find this part confusing???). This PR rather clarifies that there may be two ways to reference the same artifact, examples:

  1. <dependency>
      <groupId>org.project</groupId>
      <artifactId>reusable-test-support</artifactId>
      <version>1.0</version>
      <classifier>tests</classifier>
    </dependency>
    
    vs.
    <dependency>
      <groupId>org.project</groupId>
      <artifactId>reusable-test-support</artifactId>
      <version>1.0</version>
      <type>test-jar</type>
    </dependency>
    
  2. <dependency>
      <groupId>org.project</groupId>
      <artifactId>my-osgi-bundle</artifactId>
      <version>1.0</version>
    </dependency>
    
    vs.
    <dependency>
      <groupId>org.project</groupId>
      <artifactId>my-osgi-bundle</artifactId>
      <version>1.0</version>
      <type>bundle</type> <!-- defined by artifact handler in maven-bundle-plugin -->
    </dependency>
    
    
  3.  <dependency>
       <groupId>org.project</groupId>
       <artifactId>my-content-package</artifactId>
       <version>1.0</version>
       <type>zip</type>
     </dependency>
    
    vs.
    <dependency>
      <groupId>org.project</groupId>
      <artifactId>my-content-package</artifactId>
      <version>1.0</version>
      <type>content-package</type> <!-- defined by artifact handler in filevault-package-maven-plugin -->
    </dependency>
    
    

Please be more concise with your criticism so that I am able to address it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cstamas Could you please have another look, so we can move on with this PR - thank you!

defined by plugins that set <<<extensions>>> to true, so this is not a complete list.

In case there is an artifact handler defined there are <two> different ways of referencing the same dependency:
By using the artifact's <extension> or by using the registered <type> value. The latter considers all attributes from the artifact handler, while the former
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sentence fragment


In case there is an artifact handler defined there are <two> different ways of referencing the same dependency:
By using the artifact's <extension> or by using the registered <type> value. The latter considers all attributes from the artifact handler, while the former
never adds the dependency to the classpath nor includes its dependencies. Further information in
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in --> can be found in

see {{{/ref/current/maven-core/artifact-handlers.html}default artifact handlers}} for a list. New types can be
defined by plugins that set <<<extensions>>> to true, so this is not a complete list.

In case there is an artifact handler defined there are <two> different ways of referencing the same dependency:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If an artifact handler is defined,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants