From 8f1a8fe5e413d7cf2d1fdd800774305b09d250b0 Mon Sep 17 00:00:00 2001 From: heibaiying <31504331+heibaiying@users.noreply.github.com> Date: Sun, 5 May 2019 16:06:59 +0800 Subject: [PATCH] =?UTF-8?q?Update=20Storm=E4=B8=89=E7=A7=8D=E6=89=93?= =?UTF-8?q?=E5=8C=85=E6=96=B9=E5=BC=8F=E5=AF=B9=E6=AF=94=E5=88=86=E6=9E=90?= =?UTF-8?q?.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- notes/Storm三种打包方式对比分析.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/notes/Storm三种打包方式对比分析.md b/notes/Storm三种打包方式对比分析.md index a865371..eb23dcd 100644 --- a/notes/Storm三种打包方式对比分析.md +++ b/notes/Storm三种打包方式对比分析.md @@ -84,7 +84,7 @@ maven-assembly-plugin是官方文档中介绍的打包方法,来源于官方 - 使用maven-assembly-plugin进行打包,因为maven-assembly-plugin会把所有的依赖一并打包到最后的JAR中; - 排除掉Storm集群环境中已经提供的Storm jars。 -maven-assembly-plugin的使用非常简单,只需要在POM.xml中引入即可,并且在\标签指定打包格式为`jar-with-dependencies`。那么就剩下一个问题:如何排除Storm jars ? +maven-assembly-plugin的使用非常简单,只需要在POM.xml中引入即可,并且在\标签指定打包格式为`jar-with-dependencies`。此时还有一个问题:如何排除不需要的JAR包(如:Storm jars)? ### 3.2 排除Storm jars @@ -218,9 +218,7 @@ assembly.xml文件内容如下: > >If you are using maven to create your topology jar, you should use the following `maven-shade-plugin` configuration to create your topology jar。 -这里第一句就说的比较清晰,在集成HDFS时候,你必须使用maven-shade-plugin来代替maven-assembly-plugin,否则会抛出 - -RuntimeException异常。 +这里第一句就说的比较清晰,在集成HDFS时候,你必须使用maven-shade-plugin来代替maven-assembly-plugin,否则会抛出RuntimeException异常。 采用maven-shade-plugin打包有很多好处,比如你的工程依赖很多的JAR包,而被依赖的JAR又会依赖其他的JAR包,这样,当工程中依赖到不同的版本的 JAR时,并且JAR中具有相同名称的资源文件时,shade插件会尝试将所有资源文件打包在一起时,而不是和assembly一样执行覆盖操作。 @@ -332,4 +330,4 @@ jar:file:/usr/appjar/storm-hdfs-integration-1.0.jar!/defaults.yaml] ## 参考资料 -关于maven-shade-plugin的更多配置可以参考: [maven-shade-plugin 入门指南](https://www.jianshu.com/p/7a0e20b30401) \ No newline at end of file +关于maven-shade-plugin的更多配置可以参考: [maven-shade-plugin 入门指南](https://www.jianshu.com/p/7a0e20b30401)