为什么我会被禁止< 403>尝试在Windows上启动Grails 3+时出错?

时间:2017-06-21 16:50:37

标签: java grails groovy

我正在尝试使用Grails做一个项目,我对这个主题很新。 我也搜索了,但是没有正确的答案还有另一个类似的问题。

无论如何,我安装了Grails 3.2.9和3.3.0 M1版本:

C:\Users\acer>grails -version
| Grails Version: 3.2.9
| Groovy Version: 2.4.10
| JVM Version: 1.8.0_102

当我尝试创建应用程序时,我遇到了同样的错误。

 Resolving dependencies..
Error |
Error occurred running Grails CLI: Forbidden (403) (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
org.apache.http.client.HttpResponseException: Forbidden (403)
    at org.eclipse.aether.transport.http.HttpTransporter.handleStatus(HttpTransporter.java:466)
    at org.eclipse.aether.transport.http.HttpTransporter.execute(HttpTransporter.java:291)
    at org.eclipse.aether.transport.http.HttpTransporter.implGet(HttpTransporter.java:243)
    at org.eclipse.aether.spi.connector.transport.AbstractTransporter.get(AbstractTransporter.java:59)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask(BasicRepositoryConnector.java:447)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:350)
    at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:581)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:249)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(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.resolveCachedArtifactDescriptor(DefaultDependencyCollector.java:535)
    at org.eclipse.aether.internal.impl.DefaultDependencyCollector.getArtifactDescriptorResult(DefaultDependencyCollector.java:519)
    at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:409)
    at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:363)
    at org.eclipse.aether.internal.impl.DefaultDependencyCollector.process(DefaultDependencyCollector.java:351)
    at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:254)
    at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:341)
    at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve(AetherGrapeEngine.java:317)
    at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve(AetherGrapeEngine.java:299)
    at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve(AetherGrapeEngine.java:291)
    at org.grails.cli.boot.GrailsDependencyVersions.<init>(GrailsDependencyVersions.groovy:53)
    at org.grails.cli.boot.GrailsDependencyVersions.<init>(GrailsDependencyVersions.groovy:49)
    at org.grails.cli.profile.repository.MavenProfileRepository.<init>(MavenProfileRepository.groovy:53)
    at org.grails.cli.GrailsCli.createMavenProfileRepository(GrailsCli.groovy:334)
    at org.grails.cli.GrailsCli.execute(GrailsCli.groovy:235)
    at org.grails.cli.GrailsCli.main(GrailsCli.groovy:159)

Error |
Error occurred running Grails CLI: Forbidden (403)

这对我的项目非常重要 我事先提供任何帮助或建议

2 个答案:

答案 0 :(得分:0)

这看起来像是在依赖解析期间发生的。如果您可以创建应用程序,那么这些依赖项可能首先来自https://repo.grails.org/grails/core/,如build.gradle中所示。看起来您可能无法访问该存储库。确认您可以从您的计算机访问该网址,然后重试。

答案 1 :(得分:0)

您的系统实际上是识别Grails版本:3.2.9 它发生在项目构建问题上。您需要通过运行此命令重建项目

grails clean