Neo4j: making one JAR package from app with Neo4j libraries (duplication 'META-INF/…' files)

ぐ巨炮叔叔 提交于 2019-12-11 14:04:24

问题


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.

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

And the data in in web-interface doesn't displayed, as expected.

It is really important to package everything into one JAR for next app distribution.


回答1:


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...



来源:https://stackoverflow.com/questions/26338794/neo4j-making-one-jar-package-from-app-with-neo4j-libraries-duplication-meta-i

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!