iCMS

maven打jar包包括依赖包

iCMS http://www.hlike.cn 2019-08-06 20:21 出处:网络 编辑:@iCMS
<build> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version>

<build>


<plugins>


<plugin>


<artifactId>maven-compiler-plugin</artifactId>


<version>2.3.2</version>


<configuration>


<source>1.8</source>


<target>1.8</target>


</configuration>


</plugin>


<plugin>


<artifactId>maven-assembly-plugin </artifactId>


<configuration>


<descriptorRefs>


<descriptorRef>jar-with-dependencies</descriptorRef>


</descriptorRefs>


<archive>


<manifest>


<mainClass>SparkConsumerRabbit</mainClass>


</manifest>


</archive>


</configuration>


<executions>


<execution>


<id>make-assembly</id>


<phase>package</phase>


<goals>


<goal>single</goal>


</goals>


</execution>


</executions>


</plugin>


</plugins>


</build>

将上面内容添加到pom文件中

打成的jar包是两个一个是有依赖的一个是无依赖的可看自己的需求而定

maven打jar包包括依赖包

0

精彩评论

暂无评论...
验证码 换一张
取 消