Maven打jar包,并将依赖包打进去
程序员文章站
2022-06-18 17:15:58
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<finalName>searchIndex</finalName>
<descriptorRefs>
<!-- 将依赖的jar包中的class文件打进生成的jar包-->
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<!-- 有Main函数的类-->
<mainClass>com.yourcompany.yourproject.MainClass</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<!-- <goal>single</goal>-->
<goal>assembly</goal>
</goals>
</execution>
</executions>
</plugin>
转载于:https://my.oschina.net/u/1167421/blog/546463
上一篇: 如何将jar包打入到本地maven库中
下一篇: 非关系型数据库 redis