1、maven-assembly-plugin 换成 --> maven-shade-plugin
<plugins> <!-- shade插件打包成jar包 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>2.4.2</version> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <transformers> <!-- use transformer to handle merge of META-INF/services - see CodeGo.net --> <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" /> <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> <manifestEntries> <Main-Class>com.pf.task.slave.start.SlaveRun</Main-Class> </manifestEntries> </transformer> </transformers> <filters> <!-- filter to address "Invalid signature file" issue - see CodeGo.net --> <filter> <artifact>*:*</artifact> <excludes> <exclude>META-INF/*.SF</exclude> <exclude>META-INF/*.DSA</exclude> <exclude>META-INF/*.RSA</exclude> </excludes> </filter> </filters> </configuration> </execution> </executions> </plugin>
2、jersey-bundle插件
解决 jersey 单jar包 IME media type text/plain was not found.
原文:http://www.cnblogs.com/sprinng/p/6486670.html