abstractdog commented on code in PR #5112:
URL: https://github.com/apache/hive/pull/5112#discussion_r1517434941


##########
standalone-metastore/metastore-tools/metastore-benchmarks/pom.xml:
##########
@@ -139,30 +143,46 @@
       <build>
         <plugins>
           <plugin>
-            <artifactId>maven-assembly-plugin</artifactId>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-shade-plugin</artifactId>
             <executions>
               <execution>
-                <configuration>
-                  <archive>
-                    <manifest>
-                      
<mainClass>org.apache.hadoop.hive.metastore.tools.BenchmarkTool</mainClass>
-                      <addClasspath>true</addClasspath>
-                    </manifest>
-                  </archive>
-                  <descriptorRefs>
-                    <descriptorRef>jar-with-dependencies</descriptorRef>
-                  </descriptorRefs>
-                  <finalName>hmsbench</finalName>
-                </configuration>
-                <id>make-assembly-hclient</id>
-                <!-- this is used for inheritance merges -->
                 <phase>package</phase>
-                <!-- bind to the packaging phase -->
                 <goals>
-                  <goal>single</goal>
+                  <goal>shade</goal>
                 </goals>
+                <configuration>
+                  <finalName>hmsbench</finalName>
+                  <transformers>
+                    <transformer 
implementation="com.github.edwgiz.mavenShadePlugin.log4j2CacheTransformer.PluginsCacheFileTransformer"/>
+                    <transformer 
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                      
<mainClass>org.apache.hadoop.hive.metastore.tools.BenchmarkTool</mainClass>
+                    </transformer>
+                  </transformers>
+                  <filters>
+                    <filter>
+                      <!--
+                      Shading signed JARs will fail without this.
+                      
http://stackoverflow.com/questions/999489/invalid-signature-file-when-attempting-to-run-a-jar
+                      -->
+                      <artifact>*:*</artifact>
+                      <excludes>
+                        <exclude>META-INF/*.SF</exclude>
+                        <exclude>META-INF/*.DSA</exclude>
+                        <exclude>META-INF/*.RSA</exclude>
+                      </excludes>
+                    </filter>
+                  </filters>
+                </configuration>
               </execution>
             </executions>
+            <dependencies>
+              <dependency>
+                <groupId>com.github.edwgiz</groupId>
+                
<artifactId>maven-shade-plugin.log4j2-cachefile-transformer</artifactId>

Review Comment:
   this is told to be part of official apache log4j2 instead of 
com.github.edwgiz, according to readme here: 
https://github.com/edwgiz/maven-shaded-log4j-transformer?tab=readme-ov-file
   can we move to that?



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