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

guoyp pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/griffin.git


The following commit(s) were added to refs/heads/master by this push:
     new b121dd9  [GRIFFIN-291] Relocate HttpClient code in measure jar using 
shade plugin
b121dd9 is described below

commit b121dd92cceefaf438792150afd34f2a0f047674
Author: wankunde <[email protected]>
AuthorDate: Sat Sep 14 15:45:39 2019 +0800

    [GRIFFIN-291] Relocate HttpClient code in measure jar using shade plugin
    
    Now projects use different version of httpclient , and very easy to have 
conflicts with other components.
    
    We can shade the httpclient sources into measure jar and the conflicts 
disappear.
    
    Author: wankunde <[email protected]>
    
    Closes #535 from wankunde/httpclient.
---
 measure/pom.xml | 33 ++++++++++++++++++++++++++-------
 1 file changed, 26 insertions(+), 7 deletions(-)

diff --git a/measure/pom.xml b/measure/pom.xml
index c68cdd7..7f9f1f1 100644
--- a/measure/pom.xml
+++ b/measure/pom.xml
@@ -234,20 +234,39 @@ under the License.
                 <artifactId>maven-compiler-plugin</artifactId>
             </plugin>
             <plugin>
-                <artifactId>maven-assembly-plugin</artifactId>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <version>3.1.0</version>
                 <configuration>
-                    <descriptorRefs>
-                        <descriptorRef>jar-with-dependencies</descriptorRef>
-                    </descriptorRefs>
-                    <appendAssemblyId>false</appendAssemblyId>
+                    
<createDependencyReducedPom>false</createDependencyReducedPom>
                 </configuration>
                 <executions>
                     <execution>
-                        <id>make-assembly</id>
                         <phase>package</phase>
                         <goals>
-                            <goal>single</goal>
+                            <goal>shade</goal>
                         </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer 
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    
<mainClass>org.apache.griffin.measure.Application</mainClass>
+                                </transformer>
+                            </transformers>
+                            <relocations>
+                                <relocation>
+                                    <pattern>org.apache.http</pattern>
+                                    
<shadedPattern>griffin.org.apache.http</shadedPattern>
+                                </relocation>
+                            </relocations>
+                            <filters>
+                                <filter>
+                                    <artifact>*:*</artifact>
+                                    <excludes>
+                                        <exclude>META-INF/maven/**</exclude>
+                                    </excludes>
+                                </filter>
+                            </filters>
+                        </configuration>
                     </execution>
                 </executions>
             </plugin>

Reply via email to