So, basically this is what am proposing:
https://gist.github.com/cstamas/76f262538b5a11f6ee23d6d8c86f10ec

Basically, Maven core (and hence plugins) could distinguish among different
"types" of dependencies (while would all still be plain JARs).
So "jar" would be put on classpath, "module" on module path, "agent" would
got special treatment and so on.

Point is to _differentiate_.

T

On Sun, Oct 29, 2023 at 12:21 AM Tamás Cservenák <[email protected]>
wrote:

> Unsure from where you get that, but is wrong conclusion.
>
> You can have dep1:jar, dep2:module, dep3:agent and all 3 MAY
> (ArtifactHandler dependent, assuming "jar", "module" and "agent" artifact
> handlers all return extension=jar) refer to the same JAR file in your local
> repository.
>
> Type merely adds "semantics" WHAT is it about, HOW to make use of it.
> Please see
> https://maven.apache.org/repositories/artifacts.html#but-where-do-i-set-artifact-extension
>
> Thanks
> T
>
> On Sun, Oct 29, 2023 at 12:17 AM Martin Desruisseaux <
> [email protected]> wrote:
>
>> Le 2023-10-28 à 22 h 54, Tamás Cservenák a écrit :
>>
>> > I still see these just as new dependency types: "module", "agent",
>> > "doclet", and so on.
>> >
>> Does "dependency type" means the <type> element inside <dependency>? If
>> yes, then specifying a different type causes Maven to download a
>> different JAR, without changing the kind of path (class path versus
>> module path) where the JAR is put. The proposed <usage> element (or
>> whatever equivalent alternatives) has the opposite semantic: it does not
>> change the JAR to download, but put it on a different kind of path.
>>
>>      Martin
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>

Reply via email to