我正在尝试通过命令提示符处理grails。
我使用的是以下版本:
| Grails Version: 3.2.3
| Groovy Version: 2.4.7
| JVM Version: 1.8.0_112
引发以下错误:
|运行Grails CLI时出错错误:这通常是临时的 主机名解析时出错,表示本地服务器已执行此操作 没有收到权威服务器的回复(repo.grails.org) (使用--stacktrace来查看跟踪)
使用堆栈跟踪时,会显示以下内容:
|运行Grails CLI时出错错误:这通常是临时的 主机名解析时出错,表示本地服务器已执行此操作 没有收到权威服务器的回复(repo.grails.org) (注意:堆栈跟踪已经过滤。使用--verbose查看整个 痕迹)。
java.net.UnknownHostException:这通常是一个临时错误 在主机名解析期间,意味着本地服务器没有 收到uthoritative服务器(repo.grails.org)的回复
at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefa
ultDnsResolver.java:45)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.resolveHost
名(DefaultClientConnectionOperator.java:278)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnect
离子(DefaultClientConnectionOperator.java:162)
at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedCli
entConnectionImpl.java:294)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(Default
RequestDirector.java:643)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultReq
uestDirector.java:479)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpCl
ient.java:906)
at org.apache.http.impl.client.DecompressingHttpClient.execute(Decompres
singHttpClient.java:137)
at org.eclipse.aether.transport.http.HttpTransporter.execute(HttpTranspo
rter.java:287)
at org.eclipse.aether.transport.http.HttpTransporter.implGet(HttpTranspo
rter.java:243)
at org.eclipse.aether.spi.connector.transport.AbstractTransporter.get(Ab
stractTransporter.java:59)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRu
nner.runTask(BasicRepositoryConnector.java:447)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunne
r.run(BasicRepositoryConnector.java:350)
at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(Runn
ableErrorForwarder.java:67)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExe
cutor.execute(BasicRepositoryConnector.java:581)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(Basic
RepositoryConnector.java:249)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownl
的OAD(DefaultArtifactResolver.java:520)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(Defa
ultArtifactResolver.java:421)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtif
行为(DefaultArtifactResolver.java:246)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtif
动作(DefaultArtifactResolver.java:223)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.
loadPom(DefaultArtifactDescriptorReader.java:320)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.
readArtifactDescriptor(DefaultArtifactDescriptorReader.java:217)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.resolveCa
chedArtifactDescriptor(DefaultDependencyCollector.java:535)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.getArtifa
ctDescriptorResult(DefaultDependencyCollector.java:519)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDe
未决(DefaultDependencyCollector.java:409)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDe
未决(DefaultDependencyCollector.java:363)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.process(D
efaultDependencyCollector.java:351)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDe
pendencies(DefaultDependencyCollector.java:254)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDepen
dencies(DefaultRepositorySystem.java:341)
at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve
(AetherGrapeEngine.java:302)
at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve
(AetherGrapeEngine.java:284)
at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve
(AetherGrapeEngine.java:276)
at org.grails.cli.boot.GrailsDependencyVersions.<init>(GrailsDependencyV
ersions.groovy:53)
at org.grails.cli.boot.GrailsDependencyVersions.<init>(GrailsDependencyV
ersions.groovy:49)
at org.grails.cli.profile.repository.MavenProfileRepository.<init>(Maven
ProfileRepository.groovy:53)
at org.grails.cli.GrailsCli.createMavenProfileRepository(GrailsCli.groov
Y:333)
at org.grails.cli.GrailsCli.execute(GrailsCli.groovy:234) at org.grails.cli.GrailsCli.main(GrailsCli.groovy:159)
|运行Grails CLI时出错错误:这通常是临时的 主机名解析时出错,表示本地服务器已执行此操作 没有从权威服务器(repo.grails.org)收到回复
请帮我解决上述问题。
答案 0 :(得分:2)
最有可能的原因是您的互联网无法正常工作或您的代理商背后。有关如何配置代理设置的信息,请参阅http://docs.grails.org/latest/guide/conf.html#proxyConfig