创建grails演示应用程序时出现未授权(401)错误

时间:2016-11-08 07:42:07

标签: grails groovy

我已在我的系统上安装了grails,其中包含以下详细信息 Grails版本:3.2.2 Groovy版本:2.4.7 JVM版本:1.7.0_60 但是,当我尝试使用以下命令创建演示应用程序时,我收到了未经授权的错误。

$ grails --stacktrace create-app demo



Error Error occurred running Grails CLI: Unauthorized (401) (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
org.apache.http.client.HttpResponseException: Unauthorized (401)
    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: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>(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:333)
    at org.grails.cli.GrailsCli.execute(GrailsCli.groovy:234)
    at org.grails.cli.GrailsCli.main(GrailsCli.groovy:159)
 Error Error occurred running Grails CLI: Unauthorized (401)

不确定我是否在这里犯了一些愚蠢的错误,但如果有人知道这个问题,请告诉我。

2 个答案:

答案 0 :(得分:1)

不确定这个问题的确切原因是什么,但它与maven有关。当我删除.m2目录中的settings.xml(这是我的其他maven项目需要)时,我可以创建演示应用程序。

答案 1 :(得分:0)

我们公司有自己的内部存储库代理服务器,需要在我的settings.xml文件中更新该服务器的密码,因为我最近在服务器上更改了密码:

<settings>
    <servers>
        <server>
            <password>