[
https://issues.apache.org/jira/browse/MNG-8023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17808712#comment-17808712
]
ASF GitHub Bot commented on MNG-8023:
-------------------------------------
michael-o commented on code in PR #1387:
URL: https://github.com/apache/maven/pull/1387#discussion_r1459204976
##########
api/maven-api-core/src/main/java/org/apache/maven/api/Project.java:
##########
@@ -37,24 +37,58 @@
@Experimental
public interface Project {
+ /**
+ * Returns the project groupId.
+ */
@Nonnull
String getGroupId();
+ /**
+ * Returns the project artifactId.
+ */
@Nonnull
String getArtifactId();
+ /**
+ * Returns the project version.
+ */
@Nonnull
String getVersion();
+ /**
+ * Returns the project packaging.
+ */
@Nonnull
String getPackaging();
+ /**
+ * Returns the project artifact, that is the artifact produced by this
project. If the artifact file exists, it is
+ * registered to {@link org.apache.maven.api.services.ArtifactManager}.
+ *
+ * @see org.apache.maven.api.services.ArtifactManager#getPath(Artifact)
+ */
@Nonnull
Review Comment:
This should tell whether this is the main artifact or the POM. Must be in
synched with the plural method.
> New method for project artifacts
> --------------------------------
>
> Key: MNG-8023
> URL: https://issues.apache.org/jira/browse/MNG-8023
> Project: Maven
> Issue Type: Task
> Components: API
> Reporter: Tamas Cservenak
> Priority: Major
> Fix For: 4.0.0, 4.0.0-alpha-13
>
>
> Introduce a new method on API Project object that exposes "main artifacts" of
> project. The method can return 1 or 2 artifacts (never less than 1 and never
> more than 2). These are NOT the attached artifacts! (see ProjectManager for
> that).
> In short: projects with packaging "pom", "bom" will on this method return 1
> artifact, while projects with packaging "jar" will return 2 artifacts.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)