Моя проблема очень похожа на: Jersey exception only thrown when depencencies assembled into a single jarпроблемы Джерси с Maven - Shade Plugin
Я бегу мое приложение (молы встроенный + майка) и все работает. Когда я пытаюсь создать исполняемый файл JAR я получаю сообщение об ошибке:
org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor aroundWriteTo GRAVE: MessageBodyWriter not found for media type=application/json, type=class
Мой pom.xml:
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>server.application.DeepDig</mainClass>
</transformer>
</transformers>
<filters>
<!-- filter to address "Invalid signature file" issue - see https://stackoverflow.com/a/6743609/589215 -->
<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>
</plugins>
Если я пытаюсь сделать это из затмения, используя экспорт в Runnable Jar, он работает! –