I build a mvn project in eclipse to add some neo4j server plugins and unmanaged extentions. When I run
mvn clean install
the result jar package just has the classes in my own project not include related dependencies such as spring data neo4j jars.
when add the following codes in pom.xml
<build> <plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> <archive> <manifest> <mainClass>fully.qualified.MainClass</mainClass> </manifest> </archive> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> </configuration> </plugin> </plugins> </build>
and run
mvn clean compile assembly:single
the result jar include all dependencies classes, also include the neo4j jars, which i expect the final jar exclude the neo4j classes that provoided by neo4j server.
Actually, using eclipse pom.xml editor to check the dependencies tree, find out neo4j related jars transitive dependencied by which jar, and exclude it with the following sinppet
<dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-data-neo4j-aspects</artifactId> <version>${neo4j.springdata.version}</version> <exclusions> <exclusion> <groupId>org.neo4j</groupId> <artifactId>*</artifactId> </exclusion> <exclusion> <groupId>org.slf4j</groupId> <artifactId>jcl-over-slf4j</artifactId> </exclusion> </exclusions> </dependency>
Some others suggest using shade plugin to exclude some dependencies, I tried but faild without any clues
but I keep it in the pom.xml and using it to package the final jar
<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> <createDependencyReducedPom>false</createDependencyReducedPom> <artifactSet> <excludes> <exclude>org.neo4j:*:jar:*</exclude> </excludes> </artifactSet> </configuration> </execution> </executions> </plugin>
mvn clean package shade:shade
use the command to show project dependencies
mvn dependency:tree -Ddetail=true
----------------------------
when I deploy my extentions jar with spring data neo4j related dependencies in plugins dir of neo4j server
I start neo4j server. in
015-03-27 02:52:09.410+0000 ERROR [o.n.s.CommunityBootstrapper]: Failed to start Neo Server on port [7474] org.neo4j.server.ServerStartupException: Starting Neo4j Server failed: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/context] Offending resource: class path resource [META-INF/spring/application-context.xml]
google result helps
http://www.baeldung.com/unable-to-locate-spring-namespacehandler-for-xml-schema-namespace
http://robert-reiz.com/2011/11/14/832/
altering pom.xml
<build> <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>2.0</version> <executions> <execution> <phase>package</phase> <goals><goal>shade</goal></goals> <configuration> <transformers> <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> <resource>META-INF/spring.handlers</resource> </transformer> <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> <resource>META-INF/spring.schemas</resource> </transformer> </transformers> </configuration> </execution> </executions> </plugin> </plugins> </pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>2.3</version> </plugin> </plugins> </build>
相关推荐
Neo4j Vue 安装步骤 克隆或下载该库到本地 下载neo4j并安装到本地,启动neo4j服务 进入到该工程的根目录,输入命令:npm run update进行npm包的导入 使用命令:npm run dev启动该工程 默认端口是:8081 neo4j账号...
Neo4j Vue 安装步骤 克隆或下载该库到本地 下载neo4j并安装到本地,启动neo4j服务 进入到该工程的根目录,输入命令:npm run update进行npm包的导入 使用命令:npm run dev启动该工程 默认端口是:8081 neo4j账号...
电影示例应用 如何一起使用Spring Boot,Spring Data和Neo4j。 Spring Data Neo4j可以在基于Spring的应用程序中方便地集成Neo4j。 它提供了对象图映射(OGM)功能以及Spring Data项目共有的其他功能。 笔记该项目...
通过在 conf/neo4j-server.properties 中添加一行来配置 Neo4j: org.neo4j.server.thirdparty_jaxrs_classes=org.neo4j.example.unmanagedextension=/example 启动 Neo4j 服务器。 写评论 curl ...
宁静的 Neo4j 2.1+ 用于 Neo4j 宁静 apis 的 Sails.js 水线适配器安装从 NPM 安装。 $ npm install sails-restful-neo4j兼容性这与风帆 0.10 及更高版本兼容帆配置将以下配置添加到 config/connections.js 文件中: ...
neo4j:所有人的图表
DR $ docker run --name neo4j bitnami/neo4j:latestDocker撰写$ curl -sSL https://raw.githubusercontent.com/bitnami/bitnami-docker-neo4j/master/docker-compose.yml > docker-compose.yml$ docker-compose up...
imap2neo4j: imap2neo4j imapServer imapUsername imapPassword imapMailbox neo4jServer [neo4jUsername] [neo4jPassword] [paging, eg import by batches of 1000] [specific range of messages, eg 50
Sublime Text 2/3 插件:Neo4j Sublime 是最好的跨平台编辑器之一,所以我想为什么不创建一个简单的 Neo4j 插件呢?... 编辑用户名和密码(默认为neo4j:neo) 结果显示在控制台中(Ctrl+~)打开C
NBD_Tutorials_Neo4J:PJATK NDB教程的Neo4J分配
schemaless-graphql-neo4j 将无类型的动态GraphQL查询转换为Cypher。 签出,以更好地查看您可以编写的查询。入门$ npm install schemaless-graphql-neo4j :warning: 图书馆尚未发布操场您可以开始使用开发人员游乐场...
mvn clean package 这将生成一个jar文件target/netscan-1.0.0.jar ,可以将其部署在Neo4j实例的plugin目录中。 正在安装 要使用NetSCAN插件,您只需将jar文件移动到neo4j上的plugins文件夹中。 用法 运行NetSCAN...
egg-neo4j Neo4j用于鸡蛋框架。安装$ npm i egg-neo4j --save用法// {app_root}/config/plugin.jsexports . neo4j = { enable : true , package : 'egg-neo4j' ,} ;配置// {app_root}/config/config.default....
Neo4j Vue安装步骤克隆或下载该库到本地下载neo4j并安装到本地,启动neo4j服务进入到该工程的根目录,输入命令:npm run update进行npm包的导入使用命令:npm run dev启动该工程默认端口是:8081 neo4j账号信息: ...
Neo4j Neo4j 是一个高度可扩展、健壮(完全 ACID)的原生图形数据库。 Neo4j 被全球数以千计的领先企业、初创公司、企业和政府用于任务关键型应用程序。 使用存储库上的 Dockerfile,您就可以使用 docker neo4j ...
适用于Neo4j的GORM 该项目使用Bolt Java驱动程序为Neo4j 3.x图形数据库实现 。 有关更多信息,请参见以下链接: 对于当前的开发版本,请参见以下链接:
Neo4j 用于将Neo4j图形数据库作为Hackolade数据建模目标的插件。 Hackolade通过插件体系结构公开了其核心数据建模引擎。 每个插件都将Hackolade数据建模功能应用于特定的目标技术,无论是静态数据(数据库)还是...
适用于Node.js的Neo4j REST API包装器 主分支: 开发分支: 安装 npm install node-neo4j --save 用法 为了使用该库,您必须创建一个应用并添加或在本地安装它。 如果您使用的是OS XI,则强烈建议通过安装Neo4j。 ...
Neo4j:对知识图谱查询的接口 QA:模板匹配,问句解析 mysite:系统网页 spider:爬虫,知识图谱创建 关系型数据库:存储用户业务信息 使用说明 Neo4j 将graph.db 拷贝到Neo4j的安装目录下的/data/databases中,eg:...
spring-data-neo4j:在使用Neo4j时提供支持以提高Java开发人员的生产率。 使用熟悉的Spring概念,例如用于核心API使用和轻量级存储库样式数据访问的模板类