问题
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'
}
}
回答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.
回答2:
Please check internet and plugin download links are accessible or not..
回答3:
I am sitting in a companys-internet
I faced the same problems with my company's proxy server.
On a Windows machine in grails-version_number\bin\ there is a startGrails.bat. Here the settings for your proxy server could be set via JAVA_OPTS (towards the bottom of the file). But it would not be a good to do so, because when you upgrade Grails a year or so from now your customs settings will be lost. And you'll be scratching your head about why Grails no longer works and/or you cannot remember the syntax for setting the proxy server info.
So, in the same bin\ directory make a new file called setenv.bat. In that add
@rem Java proxy properties for connecting to proxy server
set JAVA_OPTS=%JAVA_OPTS% -Dhttp.proxySet=true -Dhttp.proxyHost="proxyServerName" -Dhttp.proxyPort="0123" -Dhttp.username="userName" -Dhttp.password="userPassWord"
I would remove the helloworld directory you just created and then again run
grails create-app helloworld
来源:https://stackoverflow.com/questions/20237925/grails-stops-at-configuring-classpath-even-at-a-helloworld-project