vinayakumarb commented on a change in pull request #2342:
URL: https://github.com/apache/hadoop/pull/2342#discussion_r500116361



##########
File path: hadoop-common-project/hadoop-auth/pom.xml
##########
@@ -234,6 +235,24 @@
           
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>com.google.code.maven-replacer-plugin</groupId>
+        <artifactId>replacer</artifactId>
+        <executions>
+          <execution>
+            <id>replace-sources</id>
+            <configuration>
+              <skip>false</skip>
+            </configuration>
+          </execution>
+          <execution>
+            <id>replace-test-sources</id>
+            <configuration>
+              <skip>false</skip>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>

Review comment:
       Instead of replacing guava references along with protobuf references, 
create a separate replacer-execution in hadoop-project/pom.xml and enable by 
default for all projects.
   ```
               <execution>
                 <id>replace-guava</id>
                 <phase>process-sources</phase>
                 <goals>
                   <goal>replace</goal>
                 </goals>
                 <configuration>
                   <skip>false</skip><!--This will run for all modules-->
                   <basedir>${basedir}</basedir>
                   <includes>
                     <include>src/main/java/**/*.java</include>
                     <include>src/test/java/**/*.java</include>
                   </includes>
                   <replacements>
                     <replacement>
                       <token>([^\.])com.google.common</token>
                       <value>$1${hadoop-thirdparty-shaded-guava-prefix}</value>
                     </replacement>
                   </replacements>
                 </configuration>
               </execution>
   ```
   
   2. Exclude guava-replacement in hadoop-yarn-csi module. yarn-csi seems to 
have separate classpath, and it explicitly uses guava-20. This will not affect 
any downstreams.
   
   3. Replaces all dependencies on guava to hadoop-shaded-guava (except 
yarn-csi)
   
   4. In hadoop-common/pom.xml, Keep both guava (11.0.2) and 
hadoop-shaded-guava as dependencies. Of course code should use shaded version 
of guava. version 11.0.2 is used in curator libs during runtime. 




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

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