-
Notifications
You must be signed in to change notification settings - Fork 259
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
[MNG-8097] Outline the two different ways to reference a dependency #529
Open
kwin
wants to merge
2
commits into
master
Choose a base branch
from
feature/clarify-dependency-types
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+8
−1
Open
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -271,13 +271,20 @@ mvn install:install-file -Dfile=non-maven-proj.jar -DgroupId=some.group -Dartifa | |
you browse the Maven central repository, you will notice that the classifiers <<<sources>>> and <<<javadoc>>> are used | ||
to deploy the project source code and API docs along with the packaged class files. | ||
|
||
The classifier may also be derived from the <<type>> in case the related {{{/ref/current/maven-core/artifact-handlers.html} artifact handler}} defines one. | ||
|
||
* <<type>>:\ | ||
Corresponds to the chosen dependency type. This defaults to <<<jar>>>. While it usually represents | ||
the extension on the filename of the dependency, that is not always the case: a type can be mapped to a | ||
the extension of the referenced artifact, that is not always the case: a type can be mapped to a | ||
different extension and a classifier. The type often corresponds to the packaging used, though this is | ||
also not always the case. Some examples are <<<jar>>>, <<<ejb-client>>> and <<<test-jar>>>: | ||
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: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If an artifact handler is defined, |
||
By using the <extension> or by using the registered <type> value. The former considers all attributes from the artifact handler, while the latter | ||
never adds the dependency to the classpath nor includes its dependencies. Further information in | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. in --> can be found in |
||
{{{/repositories/artifacts.html#but-where-do-i-set-artifact-extension}Maven Artifacts}}. | ||
|
||
* <<scope>>:\ | ||
This element refers to the classpath of the task at hand (compiling and runtime, testing, etc.) as well as | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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!
or in apache/maven#1466 (comment)
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:
Please be more concise with your criticism so that I am able to address it.