From 87229d3d2ea99d0fc8b3d0c962446d0552dc37cb Mon Sep 17 00:00:00 2001 From: Konrad Windszus Date: Sat, 18 May 2024 17:09:03 +0200 Subject: [PATCH 1/2] [MNG-8097] Outline the two different ways to reference a dependency (with a related artifact handler) --- content/apt/pom.apt.vm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/content/apt/pom.apt.vm b/content/apt/pom.apt.vm index 2dde78d772..a51f0bbdbc 100644 --- a/content/apt/pom.apt.vm +++ b/content/apt/pom.apt.vm @@ -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 <<>> and <<>> 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 <> in case the related {{{/ref/current/maven-core/artifact-handlers.html} artifact handler}} defines one. + * <>:\ Corresponds to the chosen dependency type. This defaults to <<>>. 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 <<>>, <<>> and <<>>: see {{{/ref/current/maven-core/artifact-handlers.html}default artifact handlers}} for a list. New types can be defined by plugins that set <<>> to true, so this is not a complete list. + + In case there is an artifact handler defined there are different ways of referencing the same dependency: + By using the or by using the registered 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 + {{{/repositories/artifacts.html#but-where-do-i-set-artifact-extension}Maven Artifacts}}. * <>:\ This element refers to the classpath of the task at hand (compiling and runtime, testing, etc.) as well as From 8bfb4706c5382c0a2e118c27bfe2a0344f865476 Mon Sep 17 00:00:00 2001 From: Konrad Windszus Date: Sun, 2 Jun 2024 11:18:35 +0200 Subject: [PATCH 2/2] incorporate some feedback from PR --- content/apt/pom.apt.vm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/apt/pom.apt.vm b/content/apt/pom.apt.vm index a51f0bbdbc..bfdca5e298 100644 --- a/content/apt/pom.apt.vm +++ b/content/apt/pom.apt.vm @@ -282,7 +282,7 @@ mvn install:install-file -Dfile=non-maven-proj.jar -DgroupId=some.group -Dartifa defined by plugins that set <<>> to true, so this is not a complete list. In case there is an artifact handler defined there are different ways of referencing the same dependency: - By using the or by using the registered value. The former considers all attributes from the artifact handler, while the latter + By using the artifact's or by using the registered 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 {{{/repositories/artifacts.html#but-where-do-i-set-artifact-extension}Maven Artifacts}}.