Copilot commented on code in PR #16335:
URL: https://github.com/apache/pinot/pull/16335#discussion_r2201789350


##########
pom.xml:
##########
@@ -421,6 +421,83 @@
         </plugins>
       </build>
     </profile>
+    <!-- Apple Silicon Mac with Homebrew for protoc -->
+    <profile>
+      <id>macos-arm64-protobuf-homebrew</id>
+      <activation>
+        <os>
+          <family>mac</family>
+          <arch>aarch64</arch>
+        </os>
+        <file>
+          <exists>/opt/homebrew/bin/protoc-gen-grpc-java</exists>
+        </file>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.xolstice.maven.plugins</groupId>
+            <artifactId>protobuf-maven-plugin</artifactId>
+            <version>0.6.1</version>
+            <configuration>
+              
<protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
+              <pluginId>grpc-java</pluginId>
+              
<pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}</pluginArtifact>
+              
<pluginExecutable>/opt/homebrew/bin/protoc-gen-grpc-java</pluginExecutable>
+            </configuration>
+            <executions>
+              <execution>
+                <goals>
+                  <goal>compile</goal>
+                  <goal>compile-custom</goal>
+                  <goal>test-compile</goal>
+                  <goal>test-compile-custom</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+
+    <!-- Apple Silicon Mac with Homebrew (fallback path) -->
+    <profile>
+      <id>macos-arm64-protobuf-homebrew-usr</id>
+      <activation>
+        <os>
+          <family>mac</family>
+          <arch>aarch64</arch>
+        </os>
+        <file>
+          <exists>/usr/local/bin/protoc-gen-grpc-java</exists>

Review Comment:
   The fallback profile may activate alongside the primary if both Homebrew 
paths exist. Consider adding a 
`<missing>/opt/homebrew/bin/protoc-gen-grpc-java</missing>` condition so it 
only triggers when the primary executable is absent.
   ```suggestion
             <exists>/usr/local/bin/protoc-gen-grpc-java</exists>
             <missing>/opt/homebrew/bin/protoc-gen-grpc-java</missing>
   ```



##########
pom.xml:
##########
@@ -421,6 +421,83 @@
         </plugins>
       </build>
     </profile>
+    <!-- Apple Silicon Mac with Homebrew for protoc -->
+    <profile>
+      <id>macos-arm64-protobuf-homebrew</id>
+      <activation>
+        <os>
+          <family>mac</family>
+          <arch>aarch64</arch>
+        </os>
+        <file>
+          <exists>/opt/homebrew/bin/protoc-gen-grpc-java</exists>
+        </file>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.xolstice.maven.plugins</groupId>

Review Comment:
   [nitpick] The plugin configuration is duplicated in both profiles. To reduce 
duplication, consider defining the common plugin setup in `pluginManagement` 
and only override `pluginExecutable` per profile.



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