dubbo服务提供端合并打jar和分开打jar
<plugins>
=========方式一:lib和程序分离===========
<!--<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<classesDirectory>target/classes/</classesDirectory>
<archive>
<manifestEntries>
<!–<addClasspath>true</addClasspath>–>
<!–<classpathPrefix>lib/</classpathPrefix>–>
<!–<useUniqueVersions>false</useUniqueVersions>–>
<!–<mainClass></mainClass>–>
<!–<Specification-Title>${project.artifactId}</Specification-Title>–>
<!–<Specification-Version>${project.version}</Specification-Version>–>
<!–<Specification-Vendor>hb</Specification-Vendor>–>
<!–<Implementation-Title>${project.artifactId}</Implementation-Title>–>
<!–<Implementation-Version>${timestamp}</Implementation-Version>–>
<!–<Url>${project.url}</Url>–>
<Class-Path>.</Class-Path>
</manifestEntries>
<manifest>
<!– <mainClass>com.alibaba.dubbo.container.Main</mainClass>–>
<mainClass>com.houbank.incoming.service.main.HbIncomingServiceMain</mainClass>
<!– 打包时 MANIFEST.MF文件不记录的时间戳版本 –>
<useUniqueVersions>false</useUniqueVersions>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
</manifest>
</archive>
</configuration>
</plugin>-->
============方式二:打在一个jar中=============
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<!-- <!– 是否生成缩减的pom文件,默认不配置是true –>-->
<createDependencyReducedPom>false</createDependencyReducedPom>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<!-- <!– 启动类 –>-->
<mainClass>com.houbank.incoming.service.main.HbIncomingServiceMain</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>