Neo4j:使用Neo4j库从应用程序制作一个JAR包(复制'META-INF / ...'文件) [英] Neo4j: making one JAR package from app with Neo4j libraries (duplication 'META-INF/...' files)
问题描述
我理解,这个问题的根源。我在这里看到了主题。
I understand, the source of this issue. I've saw the topic here.
这里是一些可能的解决方案。
And here is some possible solution.
但是最后一个对我不起作用。
But the last one doesn't work for me.
使用Neo4j库制作我的应用程序的一个jar包(使用Maven)时遇到问题。当我在另一个项目中使用这个jar时 - 一切正常,但是当我尝试启动web界面时 - 我得到了上面提到的问题。我的应用程序抛出下一行的Exception:
Have the problem with making one jar package (with Maven) of my app with Neo4j libraries within. When I use this jar in another project - everything works fine, but when I try to launch web-interface - I get the above mentioned issue. My app throws Exception with next lines:
01:19:49.727 [main] INFO o.e.jetty.server.ServerConnector - Started ServerConnector@7e75bf2d{HTTP/1.1}{0.0.0.0:7474}
Oct 13, 2014 1:19:59 AM com.sun.jersey.spi.container.ContainerResponse write
SEVERE: A message body writer for Java class java.lang.String, and Java type class java.lang.String, and MIME media type application/json was not found
并且没有按预期显示web界面中的数据。
And the data in in web-interface doesn't displayed, as expected.
将所有内容打包到一个JAR中非常重要下一个应用程序分发。
It is really important to package everything into one JAR for next app distribution.
推荐答案
我已经解决了我的问题。在我的情况下,除了这个'shade-plugin'配置 - 我添加下一行。现在添加一切正常:
I've resolved my issue. In my case in addition to this 'shade-plugin' configuration - I add next lines. Add now everything works fine:
...
<configuration>
...
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
...
</configuration>
...
我跳这有助于某人......
I hop this helps someone...
这篇关于Neo4j:使用Neo4j库从应用程序制作一个JAR包(复制'META-INF / ...'文件)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!