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


##########
maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultPluginValidationManager.java:
##########
@@ -83,13 +83,23 @@ private enum ValidationReportLevel {
     public void onEvent(Object event) {
         if (event instanceof ExecutionEvent) {
             ExecutionEvent executionEvent = (ExecutionEvent) event;
-            if (executionEvent.getType() == ExecutionEvent.Type.SessionEnded) {
+            if (executionEvent.getType() == 
ExecutionEvent.Type.SessionStarted) {
+                RepositorySystemSession repositorySystemSession =
+                        executionEvent.getSession().getRepositorySession();
+                ValidationReportLevel level = 
parseValidationReportLevel(repositorySystemSession);
+                
repositorySystemSession.getData().set(MAVEN_PLUGIN_VALIDATION_KEY, level);
+            } else if (executionEvent.getType() == 
ExecutionEvent.Type.SessionEnded) {
                 
reportSessionCollectedValidationIssues(executionEvent.getSession());
             }
         }
     }
 
     private ValidationReportLevel 
validationReportLevel(RepositorySystemSession session) {
+        return (ValidationReportLevel) session.getData()
+                .computeIfAbsent(MAVEN_PLUGIN_VALIDATION_KEY, () -> 
parseValidationReportLevel(session));

Review Comment:
   no, this is session.data while string is in session.configProperties, two 
distinct maps



-- 
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-unsubscr...@maven.apache.org

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

Reply via email to