0

我希望有一个人可以帮助我。我试图在我的 Windows 7 Prof. 机器上安装 STS/grails,它有一个 64 位操作系统。我还在同一台机器上安装了 Ubuntu(双启动)并得到同样的错误。当我使用我的应用程序运行 IDE 时,出现错误。谁能告诉我如何让这个工作?该错误与未解决的依赖关系有关。

My BuildConfig is as folllows:

grails.servlet.version = "2.5" // Change depending on target container compliance (2.5 or 3.0)
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
grails.project.target.level = 1.6
grails.project.source.level = 1.6
grails.project.war.file = "target/${appName}-${grails.util.Environment.current.name}-${appVersion}.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'
    checksums true // Whether to verify checksums on resolve

    repositories {
        inherits true // Whether to inherit repository definitions from plugins
        grailsPlugins()
        grailsHome()
        grailsCentral()

        // uncomment these to enable remote dependency resolution from public Maven repositories
        mavenLocal()
        mavenCentral()
        //mavenRepo "http://uk.maven.org/maven2"
        //mavenRepo "http://snapshots.repository.codehaus.org"
        //mavenRepo "http://repository.codehaus.org"
        //mavenRepo "http://download.java.net/maven/2/"
        //mavenRepo "http://repository.jboss.com/maven2/"
    }
    dependencies {      
        compile ('org.apache.tika:tika-core:1.0')
        compile ('org.apache.tika:tika-parsers:1.0') { excludes "xercesImpl", "xmlParserAPIs", "xml-apis", "log4j" }
        runtime ('mysql:mysql-connector-java:5.1.20') { excludes "commons-logging" }
        build ('org.apache.httpcomponents:httpcore:4.1.2')
        build ('org.apache.httpcomponents:httpclient:4.1.2')
        build ('org.apache.httpcomponents:httpmime:4.1.2')
        runtime ('org.apache.httpcomponents:httpcore:4.1.2')
        runtime ('org.apache.httpcomponents:httpclient:4.1.2')
        runtime ('org.apache.httpcomponents:httpmime:4.1.2')
    }

    plugins {
        runtime ":hibernate:$grailsVersion"
        runtime ":jquery:1.7.2"
        runtime ":resources:1.2-RC1"

        test ":spock:0.6"

        build ":tomcat:$grailsVersion"
    }
}

以下是错误:

命令以错误代码终止(请参阅输出的详细信息)

系统输出

| Loading Grails 2.0.4
| Configuring classpath
:: problems summary ::
:::: WARNINGS
module not found: org.apache.tomcat#com.springsource.org.apache.tomc at.jdbc;1.0.9.0

==== grailsPlugins: tried

-- artifact org.apache.tomcat#com.springsource.org.apache.tomc at.jdbc;1.0.9.0!com.springsource.org.apache.tomcat .jdbc.jar:

C:\Users\Delerium\Documents\workspace-sts-3.0.0.RELEASE\lmn-foresthills-feature-236/lib/com.springsource.org.apache.tomcat.jdbc-1.0.9.0.jar

==== grailsHome: tried

C:\grails\grails-2.0.4/lib/org.apache.tomcat/com.springsource.org.apache.tomcat.jdbc/ivy-1.0.9.0.xml

-- artifact org.apache.tomcat#com.springsource.org.apache.tomc at.jdbc;1.0.9.0!com.springsource.org.apache.tomcat .jdbc.jar:

C:\grails\grails-2.0.4/lib/org.apache.tomcat/com.springsource.org.apache.tomcat.jdbc/jars/com.springsource.org.apache.tomcat.jdbc-1.0.9.0.jar

C:\grails\grails-2.0.4/lib/org.apache.tomcat/com.springsource.org.apache.tomcat.jdbc/bundles/com.springsource.org.apache.tomcat.jdbc-1.0.9.0.jar

==== grailsHome: tried

C:\grails\grails-2.0.4\src\libs/com.springsource.org.apache.tomcat.jdbc-1.0.9.0.xml

-- artifact org.apache.tomcat#com.springsource.org.apache.tomc at.jdbc;1.0.9.0!com.springsource.org.apache.tomcat .jdbc.jar:

C:\grails\grails-2.0.4\src\libs/com.springsource.org.apache.tomcat.jdbc-1.0.9.0.jar

==== grailsHome: tried

C:\grails\grails-2.0.4\dist/com.springsource.org.apache.tomcat.jdbc-1.0.9.0.xml

-- artifact org.apache.tomcat#com.springsource.org.apache.tomc at.jdbc;1.0.9.0!com.springsource.org.apache.tomcat .jdbc.jar:

C:\grails\grails-2.0.4\dist/com.springsource.org.apache.tomcat.jdbc-1.0.9.0.jar

==== grailsHome: tried

C:\Users\Delerium\.grails\2.0.4\cached-installed-plugins/com.springsource.org.apache.tomcat.jdbc-1.0.9.0.xml

-- artifact org.apache.tomcat#com.springsource.org.apache.tomc at.jdbc;1.0.9.0!com.springsource.org.apache.tomcat .jdbc.jar:

C:\Users\Delerium\.grails\2.0.4\cached-installed-plugins/com.springsource.org.apache.tomcat.jdbc-1.0.9.0.jar

==== grailsHome: tried

-- artifact org.apache.tomcat#com.springsource.org.apache.tomc at.jdbc;1.0.9.0!com.springsource.org.apache.tomcat .jdbc.jar:

C:\grails\grails-2.0.4/plugins/com.springsource.org.apache.tomcat.jdbc-1.0.9.0.jar

==== grailsCentral: tried

http://plugins.grails.org/grails-com...bc-1.0.9.0.pom

-- artifact org.apache.tomcat#com.springsource.org.apache.tomc at.jdbc;1.0.9.0!com.springsource.org.apache.tomcat .jdbc.jar:

http://plugins.grails.org/grails-com...bc-1.0.9.0.jar

==== http://repo.grails.org/grails/plugins: tried

http://repo.grails.org/grails/plugin...bc-1.0.9.0.pom

-- artifact org.apache.tomcat#com.springsource.org.apache.tomc at.jdbc;1.0.9.0!com.springsource.org.apache.tomcat .jdbc.jar:

http://repo.grails.org/grails/plugin...bc-1.0.9.0.jar

==== http://repo.grails.org/grails/core: tried

http://repo.grails.org/grails/core/o...bc-1.0.9.0.pom

-- artifact org.apache.tomcat#com.springsource.org.apache.tomc at.jdbc;1.0.9.0!com.springsource.org.apache.tomcat .jdbc.jar:

http://repo.grails.org/grails/core/o...bc-1.0.9.0.jar

==== grailsCore: tried

http://svn.codehaus.org/grails/trunk...bc-1.0.9.0.pom

-- artifact org.apache.tomcat#com.springsource.org.apache.tomc at.jdbc;1.0.9.0!com.springsource.org.apache.tomcat .jdbc.jar:

http://svn.codehaus.org/grails/trunk...bc-1.0.9.0.jar

==== localMavenResolver: tried

C:\Users\Delerium/.m2/repository/org/apache/tomcat/com.springsource.org.apache.tomcat.jdbc/1.0.9.0/com.springsource.org.apache.tomcat.jdbc-1.0.9.0.pom

-- artifact org.apache.tomcat#com.springsource.org.apache.tomc at.jdbc;1.0.9.0!com.springsource.org.apache.tomcat .jdbc.jar:

C:\Users\Delerium/.m2/repository/org/apache/tomcat/com.springsource.org.apache.tomcat.jdbc/1.0.9.0/com.springsource.org.apache.tomcat.jdbc-1.0.9.0.jar

==== mavenCentral: tried

http://repo1.maven.org/maven2/org/ap...bc-1.0.9.0.pom

-- artifact org.apache.tomcat#com.springsource.org.apache.tomc at.jdbc;1.0.9.0!com.springsource.org.apache.tomcat .jdbc.jar:

http://repo1.maven.org/maven2/org/ap...bc-1.0.9.0.jar

::::::::::::::::::::::::::::::::::::::::::::::

:: UNRESOLVED DEPENDENCIES ::

::::::::::::::::::::::::::::::::::::::::::::::

:: org.apache.tomcat#com.springsource.org.apache.tomc at.jdbc;1.0.9.0: not found

::::::::::::::::::::::::::::::::::::::::::::::
.... 
4

2 回答 2

2

它可能是插件的依赖项。发布您的 application.properties。

要解决它,请将这些行添加到您的 BuildConfig.groovy 存储库中:

grails.project.dependency.resolution = {
    repositories {
        mavenRepo "http://repository.springsource.com/maven/bundles/release"
        mavenRepo "http://repository.springsource.com/maven/bundles/external"
    }
}
于 2012-09-09T17:27:32.037 回答
0

org.apache.tomcat#com.springsource.org.apache.tomc at.jdbc;1.0

好像有空位?我猜tomc应该是tomcat?所以修复依赖拼写错误,你应该没问题

org.apache.tomcat#com.springsource.org.apache.tomcat.jdbc;1.0

于 2012-09-08T16:46:38.513 回答