gnodet commented on code in PR #1391:
URL: https://github.com/apache/maven/pull/1391#discussion_r1466288875
##########
api/maven-api-core/src/main/java/org/apache/maven/api/Artifact.java:
##########
@@ -105,6 +105,14 @@ default String key() {
*/
boolean isSnapshot();
+ /**
+ * The artifact properties.
+ *
+ * @return the artifact properties, never {@code null}
+ */
+ @Nonnull
+ ArtifactProperties getArtifactProperties();
Review Comment:
> Side note: the long time ago pattern of doing pom for deps is still
accurate today and bom created more mess than helped there - but unrelated to
the PR, just wanted to highlight this is still used for goods and not legacy.
>
> Ok but it means we need a dependency handler as we have an artifact
handler (think it is a bit complex). Ultimately, do we need dependency outside
the model (literally ) or can it not just be artifacts? I understand what you
mean but it seems like a lot of work for not much gain, no? Can't we merge it
somehow in new api?
There's no ArtifactHandler in the v4 api. It's called `Type` and it
represents the usage of an Artifact as a Dependency. There's nothing to handle
afaik on an Artifact: it's just a pointer to a file in a repository. How it's
used needs to be taken care of and that's done in the `Dependency` which is
associated to a `Type` and `Scope` and `DependencyProperties`. If we move
things to the Artifact or merge Artifact and Dependency, I think that's a
source of confusion.
--
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]