Grails 依赖项 Neo4j

发布于 2024-11-27 21:47:24 字数 2286 浏览 0 评论 0原文

我现在正遭受 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

蓝眸 2024-12-04 21:47:24

有人已经在 neo4j 邮件列表上提出了以下建议:

repositories {
    grailsPlugins()
    grailsHome()
    grailsCentral()

    mavenLocal()
    mavenCentral()

    flatDir name:'neo4j', dirs:'/${PATH}/lib/neo4j'

}
dependencies {

    compile 'org.neo4j:neo4j-kernel:1.4.1'
    compile 'org.neo4j:neo4j-cypher:1.4.1'
    compile 'org.neo4j:neo4j-graph-algo:1.4.1'
    compile 'org.neo4j:neo4j-graph-matching:1.4.1'
    compile 'org.neo4j:neo4j-jmx:1.4.1'
    compile 'org.neo4j:neo4j-lucene-index:1.4.1'
    compile 'org.neo4j:neo4j-shell:1.4.1'
    compile 'org.neo4j:neo4j-udc:1.4.1'
    compile 'org.neo4j:lucene-core:3.1.0'
    compile 'org.neo4j:scala-library:2.9.0-1'
    compile 'org.neo4j:server-api:1.4.1'

}

Someone already proposed the following on the neo4j mailing list:

repositories {
    grailsPlugins()
    grailsHome()
    grailsCentral()

    mavenLocal()
    mavenCentral()

    flatDir name:'neo4j', dirs:'/${PATH}/lib/neo4j'

}
dependencies {

    compile 'org.neo4j:neo4j-kernel:1.4.1'
    compile 'org.neo4j:neo4j-cypher:1.4.1'
    compile 'org.neo4j:neo4j-graph-algo:1.4.1'
    compile 'org.neo4j:neo4j-graph-matching:1.4.1'
    compile 'org.neo4j:neo4j-jmx:1.4.1'
    compile 'org.neo4j:neo4j-lucene-index:1.4.1'
    compile 'org.neo4j:neo4j-shell:1.4.1'
    compile 'org.neo4j:neo4j-udc:1.4.1'
    compile 'org.neo4j:lucene-core:3.1.0'
    compile 'org.neo4j:scala-library:2.9.0-1'
    compile 'org.neo4j:server-api:1.4.1'

}
自找没趣 2024-12-04 21:47:24

使用。

compile 'org.neo4j:neo4j-community:1.4.1'

或者只是在依赖项部分中

or just use

compile 'org.neo4j:neo4j-community:1.4.1'

in the dependencies section.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文