kwin commented on code in PR #529:
URL: https://github.com/apache/maven-site/pull/529#discussion_r1617266482
##########
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 <<<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:
Review Comment:
> 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
https://github.com/apache/maven/pull/1466#issuecomment-2054144734. 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 https://github.com/apache/maven/pull/1466#issuecomment-2054145589
>> 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.
--
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]