[ 
https://issues.apache.org/jira/browse/MNG-8023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17808959#comment-17808959
 ] 

ASF GitHub Bot commented on MNG-8023:
-------------------------------------

cstamas commented on code in PR #1387:
URL: https://github.com/apache/maven/pull/1387#discussion_r1460664573


##########
maven-core/src/main/java/org/apache/maven/internal/impl/DefaultProject.java:
##########
@@ -121,13 +134,12 @@ public boolean isExecutionRoot() {
 
     @Override
     public boolean isTopProject() {
-        return getBasedir().isPresent()
-                && getBasedir().get().equals(getSession().getTopDirectory());
+        return getBasedir().equals(getSession().getTopDirectory());
     }
 
     @Override
     public boolean isRootProject() {
-        return getBasedir().isPresent() && 
getBasedir().get().equals(getRootDirectory());
+        return getBasedir().equals(getRootDirectory());

Review Comment:
   fixed



##########
maven-core/src/main/java/org/apache/maven/internal/impl/DefaultProject.java:
##########
@@ -121,13 +134,12 @@ public boolean isExecutionRoot() {
 
     @Override
     public boolean isTopProject() {
-        return getBasedir().isPresent()
-                && getBasedir().get().equals(getSession().getTopDirectory());
+        return getBasedir().equals(getSession().getTopDirectory());

Review Comment:
   fixed





> 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
>            Assignee: 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" (that produce only one 
> artifact) will on this method return 1 artifact, while projects for example 
> with packaging "jar" will return 2 artifacts (as they produce, install, 
> deploy two artifacts, the POM and the JAR/WAR/etc).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to