Grails 依赖项 Neo4j
我现在正遭受 grails 依赖关系的困扰,jar 文件中只有 pom.xml 。基本上,我尝试使用 grails 依赖项来包含 neo4j,其主文件仅包含 pom.xml http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22neo4j%22。
这是我的 BuildConfig.groovy
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
//grails.project.war.file = "target/${appName}-${appVersion}.war"
grails.project.war.file = "target/ROOT.war"
grails.project.dependency.resolution = {
// inherit Grails' default dependencies
inherits("global") {
// uncomment to disable ehcache
// excludes 'ehcache'
}
log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
repositories {
grailsPlugins()
grailsHome()
grailsCentral()
// uncomment the below to enable remote dependency resolution
// from public Maven repositories
mavenLocal()
// mavenCentral()
// mavenRepo "http://m2.neo4j.org/snapshots/"
// flatDir name:'neo4j', dirs:'/lib/neo4j'
//mavenRepo "http://snapshots.repository.codehaus.org"
//mavenRepo "http://repository.codehaus.org"
//mavenRepo "http://download.java.net/maven/2/"
//mavenRepo "http://repository.jboss.com/maven2/"
/*
* Configure our resolver.
*/
// def libResolver = new org.apache.ivy.plugins.resolver.URLResolver()
// ['libraries', 'builds'].each {
// libResolver.addArtifactPattern(
// "/Users/ncharass/.ivy/cache/[artifact]-[revision].[ext]")
//
// }
// libResolver.name = "my-repository"
// libResolver.settings = ivySettings
// resolver libResolver
}
dependencies {
// specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg.
compile 'org.neo4j:neo4j:1.4.1'
// runtime 'mysql:mysql-connector-java:5.1.13'
}
}
它似乎成功下载了所有 jar 文件,但这些 jar 文件只包含 pom.xml ,似乎 Gradle 或 Ivy 没有获取任何 pom.xml 进行任何引用,所以我遇到了复杂的错误。
我几乎尝试了所有方法,但似乎不起作用。另外,我从neo4j网站下载的lib也只包含pom.xml。
请帮忙! :(
I'm suffering from grails dependencies with only pom.xml in the jar files at the moment. Basically, I'm trying to use grails dependencies to include neo4j which the main file only contain pom.xml http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22neo4j%22.
This is my BuildConfig.groovy
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
//grails.project.war.file = "target/${appName}-${appVersion}.war"
grails.project.war.file = "target/ROOT.war"
grails.project.dependency.resolution = {
// inherit Grails' default dependencies
inherits("global") {
// uncomment to disable ehcache
// excludes 'ehcache'
}
log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
repositories {
grailsPlugins()
grailsHome()
grailsCentral()
// uncomment the below to enable remote dependency resolution
// from public Maven repositories
mavenLocal()
// mavenCentral()
// mavenRepo "http://m2.neo4j.org/snapshots/"
// flatDir name:'neo4j', dirs:'/lib/neo4j'
//mavenRepo "http://snapshots.repository.codehaus.org"
//mavenRepo "http://repository.codehaus.org"
//mavenRepo "http://download.java.net/maven/2/"
//mavenRepo "http://repository.jboss.com/maven2/"
/*
* Configure our resolver.
*/
// def libResolver = new org.apache.ivy.plugins.resolver.URLResolver()
// ['libraries', 'builds'].each {
// libResolver.addArtifactPattern(
// "/Users/ncharass/.ivy/cache/[artifact]-[revision].[ext]")
//
// }
// libResolver.name = "my-repository"
// libResolver.settings = ivySettings
// resolver libResolver
}
dependencies {
// specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg.
compile 'org.neo4j:neo4j:1.4.1'
// runtime 'mysql:mysql-connector-java:5.1.13'
}
}
It seems to download all the jar files successfully, but those jars only contain pom.xml which it seems that Gradle or Ivy doesn't pick up any pom.xml for any references, so I got complication errors.
I tried almost everything but it doesn't seem to work. Also, the lib that I download from neo4j website also only contains pom.xml.
Please help! :(
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有人已经在 neo4j 邮件列表上提出了以下建议:
Someone already proposed the following on the neo4j mailing list:
使用。
或者只是在依赖项部分中
or just use
in the dependencies section.