You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2022/09/21 11:42:23 UTC

[GitHub] [maven] laeubi opened a new pull request, #805: MNG-7544 - MavenMetadataSource.retrieve(MetadataResolutionRequest) do not check for null when reading from project map

laeubi opened a new pull request, #805:
URL: https://github.com/apache/maven/pull/805

   Currently, if a project is returned from the workspace reader but is not part of the reactor, a NPE occurs. In this case, the repositories are instead read from the model instead.
   
   Following this checklist to help us incorporate your
   contribution quickly and easily:
   
    - [x] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/MNG-7544) filed
          for the change (usually before you start working on it).  Trivial changes like typos do not
          require a JIRA issue. Your pull request should address just this issue, without
          pulling in other changes.
    - [x] Each commit in the pull request should have a meaningful subject line and body.
    - [x] Format the pull request title like `[MNG-XXX] SUMMARY`, where you replace `MNG-XXX`
          and `SUMMARY` with the appropriate JIRA issue. Best practice is to use the JIRA issue
          title in the pull request title and in the first line of the commit message.
    - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
    - [ ] Run `mvn clean verify` to make sure basic checks pass. A more thorough check will
          be performed on your pull request automatically.
    - [ ] You have run the [Core IT][core-its] successfully.
   
   If your pull request is about ~20 lines of code you don't need to sign an
   [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure
   please ask on the developers list.
   
   To make clear that you license your contribution under
   the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
    - [x] I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   
    - [ ] In any other case, please file an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   [core-its]: https://maven.apache.org/core-its/core-it-suite/
   


-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven] laeubi commented on pull request #805: [3.9.x][MNG-7544] - MavenMetadataSource.retrieve(MetadataResolutionRequest) do not check for null when reading from project map

Posted by "laeubi (via GitHub)" <gi...@apache.org>.
laeubi commented on PR #805:
URL: https://github.com/apache/maven/pull/805#issuecomment-1417005653

   PR for 3.8.x:
   - https://github.com/apache/maven/pull/980


-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven] laeubi commented on a diff in pull request #805: MNG-7544 - MavenMetadataSource.retrieve(MetadataResolutionRequest) do not check for null when reading from project map

Posted by "laeubi (via GitHub)" <gi...@apache.org>.
laeubi commented on code in PR #805:
URL: https://github.com/apache/maven/pull/805#discussion_r1096536783


##########
maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java:
##########
@@ -96,7 +99,11 @@
     private RepositoryMetadataManager repositoryMetadataManager;
 
     @Requirement
-    private ArtifactFactory repositorySystem;
+    private RepositorySystem repositorySystem;

Review Comment:
   Can you suggest what is the modern alternative for this? I see it still used in maven-3.9x code base (and actually adapted from there the usage here ...)



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven] laeubi commented on pull request #805: MNG-7544 - MavenMetadataSource.retrieve(MetadataResolutionRequest) do not check for null when reading from project map

Posted by GitBox <gi...@apache.org>.
laeubi commented on PR #805:
URL: https://github.com/apache/maven/pull/805#issuecomment-1253595052

   @michael-o do you think something like this is feasible? Or should one simply fall back to empty list if there is no project?


-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven] slachiewicz commented on a diff in pull request #805: MNG-7544 - MavenMetadataSource.retrieve(MetadataResolutionRequest) do not check for null when reading from project map

Posted by "slachiewicz (via GitHub)" <gi...@apache.org>.
slachiewicz commented on code in PR #805:
URL: https://github.com/apache/maven/pull/805#discussion_r1096534215


##########
maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java:
##########
@@ -96,7 +99,11 @@
     private RepositoryMetadataManager repositoryMetadataManager;
 
     @Requirement
-    private ArtifactFactory repositorySystem;
+    private RepositorySystem repositorySystem;

Review Comment:
   this is deprecated becouse only impl we have in maven-compat



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven] michael-o closed pull request #805: [3.9.x][MNG-7544] - MavenMetadataSource.retrieve(MetadataResolutionRequest) do not check for null when reading from project map

Posted by "michael-o (via GitHub)" <gi...@apache.org>.
michael-o closed pull request #805: [3.9.x][MNG-7544] - MavenMetadataSource.retrieve(MetadataResolutionRequest) do not check for null when reading from project map
URL: https://github.com/apache/maven/pull/805


-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven] laeubi commented on pull request #805: MNG-7544 - MavenMetadataSource.retrieve(MetadataResolutionRequest) do not check for null when reading from project map

Posted by "laeubi (via GitHub)" <gi...@apache.org>.
laeubi commented on PR #805:
URL: https://github.com/apache/maven/pull/805#issuecomment-1416990328

   I was now able to add a small unit-test to check for the desired behavior, will backport to 3.8.x then..


-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven] laeubi commented on pull request #805: MNG-7544 - MavenMetadataSource.retrieve(MetadataResolutionRequest) do not check for null when reading from project map

Posted by "laeubi (via GitHub)" <gi...@apache.org>.
laeubi commented on PR #805:
URL: https://github.com/apache/maven/pull/805#issuecomment-1416819608

   I have now rebased it and I'm using `MavenRepositorySystem` (I hope this is the right replacement here as DefaultProjectReader is using this as well).


-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven] michael-o commented on pull request #805: [3.9.x][MNG-7544] - MavenMetadataSource.retrieve(MetadataResolutionRequest) do not check for null when reading from project map

Posted by "michael-o (via GitHub)" <gi...@apache.org>.
michael-o commented on PR #805:
URL: https://github.com/apache/maven/pull/805#issuecomment-1417740759

   Merged.


-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven] laeubi commented on pull request #805: [3.9.x][MNG-7544] - MavenMetadataSource.retrieve(MetadataResolutionRequest) do not check for null when reading from project map

Posted by "laeubi (via GitHub)" <gi...@apache.org>.
laeubi commented on PR #805:
URL: https://github.com/apache/maven/pull/805#issuecomment-1417025188

   PR for master;
   - https://github.com/apache/maven/pull/981


-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org