将Jung依赖项添加到Neo4j服务器插件扩展

将Jung依赖项添加到Neo4j服务器插件扩展

本文介绍了将Jung依赖项添加到Neo4j服务器插件扩展中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Neo4j服务器插件.我使用的pom.xml文件与-中的文件完全相同- https://github.com/neo4j/neo4j /blob/2.1.3/community/server-examples/pom.xml

Hi I am trying to experiment with Neo4j server plugins.The pom.xml file that I am using is exactly the same as in -https://github.com/neo4j/neo4j/blob/2.1.3/community/server-examples/pom.xml

我正在尝试的服务器插件扩展是- https://github.com/neo4j/neo4j/blob/2.1.3/community/server-examples/src/main/java/org/neo4j/examples/server/plugins/GetAll.java

And the server plugin extension that I am experimenting with is -https://github.com/neo4j/neo4j/blob/2.1.3/community/server-examples/src/main/java/org/neo4j/examples/server/plugins/GetAll.java

这很好,但是我决定从GetAll.java对Jung库进行一些调用.因此,我只需将以下几行添加到上面的pom.xml

This works fine, but then I decide to make some calls to the Jung library from GetAll.java.So I simply add the following lines to the above pom.xml

<dependency>
    <groupId>net.sf.jung</groupId>
    <artifactId>jung-algorithms</artifactId>
    <version>2.0.1</version>
</dependency>

我希望它可以编译,但是没有.相反,我得到这个错误:-

I was hoping that it would compile but it didn't. Instead I get this error :-

[ERROR] Failed to execute goal org.neo4j.build.plugins:licensing-maven-plugin:1.7.5:check (enforce-licensing-oss) on project neo4j-server-examples: This project has 4 disliked artifacts and 1 artifact missing licensing information. -> [Help 1]

因此,这似乎是许可证检查问题. 因此,我继续在上面的pom.xml中的他们的部分下添加了以下几行

So it seems like it is a license check issue. So I went ahead and added the following lines in the above pom.xml under their section

<!-- http://jung.sourceforge.net/license.txt -->
                 <name>The BSD License</name>
                <url>http://jung.sourceforge.net/license.txt</url>
                <distribution>repo</distribution>

(因为Jung2使用BSD许可证)但是错误似乎仍然存在.我尝试在上述pom.xml中搜索"licensing-maven-plugin"(以将其禁用),但是找不到它.

(As Jung2 uses the BSD license)But the error still seems to be there. I tried searching for "licensing-maven-plugin" in the above pom.xml (to disable it) butcouldn't find it.

从上述pom.xml中完全删除属性部分(以禁用许可证检查)也不起作用(我得到了以下错误-

Removing the properties section completely from the above pom.xml (in order to disable license checks) doesn't work either (I get the following error instead -

[ERROR] Failed to execute goal org.neo4j.build.plugins:license-maven-plugin:3:check (check-licenses) on project neo4j-server-examples: Some files do not have the expected license header -> [Help 1])

对pom.xml文件进行什么更改以使其接受Jung依赖关系的任何见解?我需要对关联的NOTICE.txt进行更改吗?

Any insights on what changes to make to the pom.xml file so that it accepts the Jung dependencies ? Do I need to make changes to the associated NOTICE.txt ?

推荐答案

您所引用的pom.xml使用org.neo4j.parent作为父pom.这包括对所有包含的工件的自动许可证检查. Neo4j使用它来确保许可证合规性.

The pom.xml you're referencing uses org.neo4j.parent as parent pom. This one incorporates automatic license checks for all included artifacts. Neo4j uses this to ensure license compliance.

在您的插件项目中,您可能不需要此功能,因此请通过注释掉<parent>标签来摆脱父pom.

In you're plugin project you probably don't need this so try to get rid of the parent pom by commenting out the <parent> tag.

这篇关于将Jung依赖项添加到Neo4j服务器插件扩展中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 05:24