This is an automated email from the ASF dual-hosted git repository.

chengpan pushed a commit to branch branch-0.3
in repository https://gitbox.apache.org/repos/asf/incubator-celeborn.git


The following commit(s) were added to refs/heads/branch-0.3 by this push:
     new 280baf09d [CELEBORN-837][BUILD] Add silencer plugin to suppress 
deprecated warnings
280baf09d is described below

commit 280baf09da3127b929300c9c437b4accf6334bf2
Author: Fu Chen <[email protected]>
AuthorDate: Tue Jul 25 21:14:45 2023 +0800

    [CELEBORN-837][BUILD] Add silencer plugin to suppress deprecated warnings
    
    ### What changes were proposed in this pull request?
    
    As title
    
    ### Why are the changes needed?
    
    to suppress all warnings related to deprecations during the compilation 
process.
    
    to fix
    ```
    class OpenStream in package protocol is deprecated
            val openStream = msg.asInstanceOf[OpenStream]
    ```
    
    ### Does this PR introduce _any_ user-facing change?
    
    No
    
    ### How was this patch tested?
    
    tested locally
    
    Closes #1760 from cfmcgrady/silence-deprecated.
    
    Authored-by: Fu Chen <[email protected]>
    Signed-off-by: Cheng Pan <[email protected]>
    (cherry picked from commit e16b26762bbbc6e0a5541e9e4a3c620064555735)
    Signed-off-by: Cheng Pan <[email protected]>
---
 pom.xml | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/pom.xml b/pom.xml
index e75346899..a0d9db574 100644
--- a/pom.xml
+++ b/pom.xml
@@ -107,6 +107,7 @@
     <maven.plugin.shade.version>3.4.0</maven.plugin.shade.version>
     <maven.plugin.spotless.version>2.24.1</maven.plugin.spotless.version>
     <maven.plugin.surefire.version>3.0.0-M7</maven.plugin.surefire.version>
+    <maven.plugin.silencer.version>1.7.13</maven.plugin.silencer.version>
 
     <!-- Allow modules to enable / disable certain build plugins easily. -->
     <testJarPhase>prepare-package</testJarPhase>
@@ -660,7 +661,15 @@
               <arg>-feature</arg>
               <arg>-explaintypes</arg>
               <arg>-Xfatal-warnings</arg>
+              <arg>-P:silencer:globalFilters=.*deprecated.*</arg>
             </args>
+            <compilerPlugins>
+              <compilerPlugin>
+                <groupId>com.github.ghik</groupId>
+                <artifactId>silencer-plugin_${scala.version}</artifactId>
+                <version>${maven.plugin.silencer.version}</version>
+              </compilerPlugin>
+            </compilerPlugins>
           </configuration>
           <executions>
             <execution>
@@ -907,6 +916,7 @@
         <scala.binary.version>2.12</scala.binary.version>
         <spark.version>3.0.3</spark.version>
         <zstd-jni.version>1.4.4-3</zstd-jni.version>
+        <maven.plugin.silencer.version>1.6.0</maven.plugin.silencer.version>
       </properties>
     </profile>
 
@@ -926,6 +936,7 @@
         <scala.binary.version>2.12</scala.binary.version>
         <spark.version>3.1.3</spark.version>
         <zstd-jni.version>1.4.8-1</zstd-jni.version>
+        <maven.plugin.silencer.version>1.6.0</maven.plugin.silencer.version>
       </properties>
     </profile>
 

Reply via email to