tisonkun commented on code in PR #711:
URL: https://github.com/apache/datasketches-java/pull/711#discussion_r2670368334


##########
pom.xml:
##########
@@ -129,6 +129,20 @@ under the License.
   </dependencies>
 
   <build>
+      <pluginManagement>
+          <plugins>
+              <plugin>
+                  <!-- Apache Parent pom, pluginManagement-->
+                  <groupId>org.apache.maven.plugins</groupId>
+                  <artifactId>maven-surefire-plugin</artifactId>
+                  <configuration>
+                      <!-- by default, exclude all snapshot targets -->
+                      <!-- this will be overridden on dedicated profile -->
+                      
<excludedGroups>${testng.generate-java-files},${testng.check-cpp-files},${testng.check-go-files},${testng.check-cpp-historical-files}</excludedGroups>
+                  </configuration>
+              </plugin>
+          </plugins>
+      </pluginManagement>

Review Comment:
   Note that we use `/pluginManagement/plugins/plugin` to override the exclude 
group of surefire plugin:
   
   ```xml
       <profile>
         <id>generate-java-files</id>
         <build>
           <pluginManagement>
             <plugins>
               <plugin>
                 <!-- Apache Parent pom, pluginManagement-->
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-plugin</artifactId>
                 <configuration>
                   <groups>${testng.generate-java-files}</groups>
                   
<excludedGroups>${testng.check-cpp-files},${testng.check-go-files},${testng.check-cpp-historical-files}</excludedGroups>
                 </configuration>
               </plugin>
             </plugins>
           </pluginManagement>
         </build>
       </profile>
   ```
   
   So this PR changes all the configurations to `/pluginManagement` for proper 
overriding.
   
   > configuration will be overridden by the surefire plugin specified under 
<build><plugins>.
   
   Yes. The current `pom.xml` before this patch, would always use:
   
   ```xml
    
<excludedGroups>${testng.generate-java-files},${testng.check-cpp-files},${testng.check-go-files},
   ${testng.check-cpp-historical-files}</excludedGroups> <!-- do not indent -->
   ```
   
   Because it is the final config. Thus, any profile won't be applied actually.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to