neils-dev commented on a change in pull request #2375:
URL: https://github.com/apache/ozone/pull/2375#discussion_r667634294



##########
File path: hadoop-ozone/interface-client/pom.xml
##########
@@ -51,16 +71,46 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd";>
         <extensions>true</extensions>
         <executions>
           <execution>
-            <id>compile-protoc</id>
+            <id>compile-protoc-OmGrpc</id>
             <goals>
               <goal>compile</goal>
               <goal>test-compile</goal>
+              <goal>compile-custom</goal>
+              <goal>test-compile-custom</goal>
             </goals>
             <configuration>
+              <protocArtifact>
+                
com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}
+              </protocArtifact>
               <protoSourceRoot>${basedir}/src/main/proto/</protoSourceRoot>
+              <includes>
+                <include>OmClientProtocol.proto</include>
+              </includes>
+              
<outputDirectory>target/generated-sources/protobuf/java</outputDirectory>
+              <clearOutputDirectory>false</clearOutputDirectory>
+              <pluginId>grpc-java</pluginId>
+              <pluginArtifact>
+                
io.grpc:protoc-gen-grpc-java:${grpc-compile.version}:exe:${os.detected.classifier}
+              </pluginArtifact>
+            </configuration>
+          </execution>
+          <execution>

Review comment:
       Thanks for uncovering the duplication in executions.  We can also 
rewrite the two executions into a single execution by having the 
_`compile-OmGrpc`_ execution id also generate the protoc generated code that id 
_`compile-protoc-2`_ currently compiles, namely the 
`<include>Security.proto</include>`.  In this case the single execution is : 
   ```
             <execution>
               <id>compile-protoc-OmGrpc</id>
               <goals>
                 <goal>compile</goal>
                 <goal>test-compile</goal>
                 <goal>compile-custom</goal>
                 <goal>test-compile-custom</goal>
               </goals>
               <configuration>
                 <protocArtifact>
                   
com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}
                 </protocArtifact>
                 <protoSourceRoot>${basedir}/src/main/proto/</protoSourceRoot>
                 <includes>
                   <include>OmClientProtocol.proto</include>
                   <include>Security.proto</include>
                 </includes>
                 
<outputDirectory>target/generated-sources/protobuf/java</outputDirectory>
                 <clearOutputDirectory>false</clearOutputDirectory>
                 <pluginId>grpc-java</pluginId>
                 <pluginArtifact>
                   
io.grpc:protoc-gen-grpc-java:${grpc-compile.version}:exe:${os.detected.classifier}
                 </pluginArtifact>
               </configuration>
             </execution>
   ```
   Either is fine, split the two or have a single execution - what are your 
thoughts on this?




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