Grails停在“配置类路径”即使在一个helloworld项目中 [英] Grails stops at "Configuring classpath" even at a helloworld project

查看:77
本文介绍了Grails停在“配置类路径”即使在一个helloworld项目中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想学习Grails,所以我从一个Hello-World Projekt开始。
我尝试了cmd.exe和STS中的所有内容。



首先我写了 grails create-app helloworld 命令

然后我在新的helloworld \目录中交换,并写下 grails run-app



但是命令行并没有继续,然后配置classpath



我在其他论坛上看过,但没有任何帮助。
我坐在公司的互联网上。这是否会导致错误?



如果日志级别设置为verbose(仅最后几行 - 大约500行之前),则会发生故障。

|错误无法解析依赖关系(将日志级别设置为BuildConfig.groovy中的'warn'以获取更多信息):


  • org.apache.tomcat。嵌入:tomcat-embed-core:7.0.42
  • org.apache.tomcat.embed:tomcat-embed-logging-log4j:7.0.42

  • org.eclipse.jdt.core.compiler:ecj:3.7.2

  • org.apache.tomcat:tomcat-catalina-ant:7.0.42
  • org.apache.tomcat.embed:tomcat-embed-logging-juli:7.0.42

  • org.apache.tomcat.embed:tomcat-embed-jasper:7.0。 42



编辑:我使用了Grails 2.2.4,继承了我的BuildConfig.groovy:

  grails.servlet.version =2.5//根据目标容器合规性(2.5或3.0)进行更改
grails.project.class.dir =target /类
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} - $ {appVersion} .war

//取消注释(并调整设置)以分离JVM以隔离类路径
//grails.project.fork = [
//运行:[maxMemory:1024,minMemory:64,debug:false,maxPerm:256]
//]

grails.project.dependency.resolution = {
//继承Grails的默认依赖关系
inherits(global){
//在此指定依赖项排除;例如,取消注释以禁用ehcache:
//排除'ehcache'
}
日志错误// Ivy解析器的日志级别,'error','warn',' info','debug'或'verbose'
checksums true //是否验证解析
上的校验和legacyResolve false //是否在插件安装时执行二级解析,不建议并且为了向后兼容

存储库{
inherits true //是否从插件继承存储库定义

grailsPlugins()
grailsHome()
grailsCentral()

mavenLocal()
mavenCentral()

//取消注释这些(或添加新的)以启用公共Maven存储库中的远程依赖项解析
// mavenRepohttp://snapshots.repository.codehaus.org
// mavenRepohttp://repository.codehaus.org
// mavenRepohttp://download.java.net/行家/ 2 /
// mavenRepohttp://repository.jboss.com/maven2/
}

依赖关系{
//在此处指定依赖关系可以是'build','compile','runtime','test'或'provided'scopes,例如

// runtime'mysql:mysql-connector-java:5.1.22'
}

plugins {
runtime':hibernate:$ grailsVersion
runtime:jquery:1.8.3
runtime:resources:1.2

//取消注释(或添加新注释)以启用其他资源功能
// runtime:zipped-resources:1.0
// runtime:cached-resources:1.0
// runtime:yui-minify-resources:0.1.5

build:tomcat:$ grailsVersion

runtime:database-migration:1.3.2

compile:cache:1.0.1'
}
}


解决方案

你不在代理之后。
检查命令行grails list-plugins。



如果此调用失败:添加并设置代理并检查ProxySettings.groovy中的正确条目。



可以这样做。


I want to learn Grails, so I started with a Hello-World Projekt. I tried everything in the cmd.exe and in STS. I have Windows7.

First i wrote grails create-app helloworld command

Then i swaped in the new helloworld\ directory and wrote grails run-app

But the command-line doesn't go furthen then Configuring classpath

I watched in other forums but nothing helped. I am sitting in a companys-internet. Does this cause the fault ?

Fault if log level is set on verbose (only the last few lines - before were about 500 other lines)

| Error Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):

  • org.apache.tomcat.embed:tomcat-embed-core:7.0.42
  • org.apache.tomcat.embed:tomcat-embed-logging-log4j:7.0.42
  • org.eclipse.jdt.core.compiler:ecj:3.7.2
  • org.apache.tomcat:tomcat-catalina-ant:7.0.42
  • org.apache.tomcat.embed:tomcat-embed-logging-juli:7.0.42
  • org.apache.tomcat.embed:tomcat-embed-jasper:7.0.42

Edit: I use Grails 2.2.4 and heres my BuildConfig.groovy:

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}-${appVersion}.war"

// uncomment (and adjust settings) to fork the JVM to isolate classpaths
//grails.project.fork = [
//   run: [maxMemory:1024, minMemory:64, debug:false, maxPerm:256]
//]

grails.project.dependency.resolution = {
    // inherit Grails' default dependencies
    inherits("global") {
        // specify dependency exclusions here; for example, uncomment this to disable ehcache:
        // excludes 'ehcache'
    }
    log "error" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
    checksums true // Whether to verify checksums on resolve
    legacyResolve false // whether to do a secondary resolve on plugin installation, not advised and here for backwards compatibility

    repositories {
        inherits true // Whether to inherit repository definitions from plugins

        grailsPlugins()
        grailsHome()
        grailsCentral()

        mavenLocal()
        mavenCentral()

        // uncomment these (or add new ones) to enable remote dependency resolution from public Maven repositories
        //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 {
        // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes e.g.

        // runtime 'mysql:mysql-connector-java:5.1.22'
    }

    plugins {
        runtime ":hibernate:$grailsVersion"
        runtime ":jquery:1.8.3"
        runtime ":resources:1.2"

        // Uncomment these (or add new ones) to enable additional resources capabilities
        //runtime ":zipped-resources:1.0"
        //runtime ":cached-resources:1.0"
        //runtime ":yui-minify-resources:0.1.5"

        build ":tomcat:$grailsVersion"

        runtime ":database-migration:1.3.2"

        compile ':cache:1.0.1'
    }
}

解决方案

Be sure you are not behind a proxy. Check on the command line grails list-plugins.

If this call fails: add and set the proxy and check the correct entries in the ProxySettings.groovy.

May this helps.

这篇关于Grails停在“配置类路径”即使在一个helloworld项目中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆