Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update artifact-handlers.apt #1466

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Update artifact-handlers.apt #1466

wants to merge 2 commits into from

Conversation

kwin
Copy link
Member

@kwin kwin commented Apr 5, 2024

Clarify that the extension used outside repositories for pom files usually differs

Following this checklist to help us incorporate your
contribution quickly and easily:

  • Make sure there is a JIRA issue filed
    for the change (usually before you start working on it). Trivial changes like typos do not
    require a JIRA issue. Your pull request should address just this issue, without
    pulling in other changes.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Format the pull request title like [MNG-XXX] SUMMARY,
    where you replace MNG-XXX and SUMMARY with the appropriate JIRA issue.
  • Also format the first line of the commit message like [MNG-XXX] SUMMARY.
    Best practice is to use the JIRA issue title in both the pull request title and in the first line of the commit message.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Run mvn clean verify to make sure basic checks pass. A more thorough check will
    be performed on your pull request automatically.
  • You have run the Core IT successfully.

If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.

To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

Clarify that the extension used outside repositories for pom files usually differs
@kwin kwin requested review from cstamas and hboutemy April 5, 2024 08:10
@cstamas
Copy link
Member

cstamas commented Apr 8, 2024

Am unsure is it meaningful at all to speak about artifacts "outside of repository"...

@kwin
Copy link
Member Author

kwin commented Apr 8, 2024

Well for me extension is mostly connected to files used outside a repo, and this is the only type where in repo and outside repo extension differs.

@@ -35,7 +35,7 @@ Default Artifact Handlers Reference
*--------------------+---------------+------------+------------+-----------+---------------------+-----------------------+
|| type || classifier || extension || packaging || language || added to classpath || includesDependencies ||
*--------------------+---------------+------------+------------+-----------+---------------------+-----------------------+
| <<<pom>>> | | <= type> | <= type> | none | | |
| <<<pom>>> | | <= type>, Note: this differs for POM files outside the repository which usually use <<<xml>>> as filesystem extension. | <= type> | none | | |
Copy link
Member

Choose a reason for hiding this comment

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

impossible to understand

Copy link
Member Author

Choose a reason for hiding this comment

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

I would appreciate a more helpful criticism!

Copy link
Member

@hboutemy hboutemy Apr 15, 2024

Choose a reason for hiding this comment

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

sorry, we had so many discussions that I don't see how to tell.
as said by Tamasz, there is a mix
In addition, such a text will break the table display.

eventually, if you absolutely want to write something, you can add a note at the end of the page that could say something like:

Dependency type <<<pom>>> has an extension <<<.pom>>> because POM is stored in repositories as <<<artifactId-version.pom>>>.
During development, as stored in source control, the POM file is by default named <<<pom.xml>>>: it will be renamed during install/deploy to be later eventually used as a pom dependency

I don't see how useful it is, but it says what you seem to need to say and does not break the dependency type table

@hboutemy
Copy link
Member

hboutemy commented Apr 14, 2024

what people need to understand is that artifact handler is for a dependency, not for a file anywhere
and dependencies are in repository (most of the time, I know)

outside of repo, any file can have any extension: call the file as you wish

@kwin
Copy link
Member Author

kwin commented Apr 14, 2024

How are people supposed to know the extension of a dependency? Although admittedly rarely necessary, this is important if you use resolver API directly.

@cstamas
Copy link
Member

cstamas commented Apr 14, 2024

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

You mix few things here...

@kwin
Copy link
Member Author

kwin commented Apr 14, 2024

When you deploy/install artifacts to a repo they come from a file with an extension. Usually this extension is the same as being used inside the repo except for POM!

@cstamas
Copy link
Member

cstamas commented Apr 14, 2024

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

You mix few things here...

@cstamas
Copy link
Member

cstamas commented Apr 14, 2024

Wrong, for example signatures are also tmp files, getting their "final form" only at deploy

@cstamas
Copy link
Member

cstamas commented Apr 14, 2024

Recognizing (or assuming) anything about not yet installed/deployed artifact is wrong, as producer may also use anything, like tmp file. It is artifact that you need to inspect, not the backing file.

@SDhkjdkbsv
Copy link

You mix few things here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants