grails 3.1 - 无法加载最新版本的profile [angular]

时间:2016-02-02 13:25:28

标签: grails

由于我使用GRAILS_OPTS设置了代理详细信息,因此不知道该去哪里 - 有人可以提出任何建议吗?

我认为个人资料是捆绑在一起的,所以你可以禁用检查最新的个人资料版本,作为一种解决方法吗?

刚刚使用sdkman下载了grails 3.1(早期的grails版本不会下载,但其他候选人,例如groovy,确实有效 - 不确定发生了什么变化)并使其成为默认候选者。

$ echo $GRAILS_OPTS
"-Dhttp.proxyHost=proxy, -Dhttp.proxyPort=8080, -Dhttp.proxyUser=me, Dhttp.proxyPassword=password, -Dhttps.proxyHost=proxy, -Dhttps.proxyPort=8080, -Dhttps.proxyUser=me, -Dhttps.proxyPassword=password"

Try to run grails and it bombs... 
$ grails --stacktrace --verbose
Resolving dependencies...
Error |
Failed to load latest version of profile [angular]. Trying Grails release version
org.springframework.boot.cli.compiler.grape.DependencyResolutionFailedException: org.eclipse.aether.resolution.DependencyResolutionException: Failed to collect dependencies at org.grails.profiles:angular:jar:3.1.0
        at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve(AetherGrapeEngine.java:307)
        at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.grab(AetherGrapeEngine.java:112)
        at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.grab(AetherGrapeEngine.java:104)
        at org.grails.cli.profile.repository.MavenProfileRepository.getAllProfiles(MavenProfileRepository.groovy:128)
        at org.grails.cli.GrailsCli.execute(GrailsCli.groovy:241)
        at org.grails.cli.GrailsCli.main(GrailsCli.groovy:162)
Caused by: org.eclipse.aether.resolution.DependencyResolutionException: Failed to collect dependencies at org.grails.profiles:angular:jar:3.1.0
        at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:380)
        at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve(AetherGrapeEngine.java:302)
        ... 5 more
Caused by: org.eclipse.aether.collection.DependencyCollectionException: Failed to collect dependencies at org.grails.profiles:angular:jar:3.1.0
        at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:291)
        at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:341)
        ... 6 more
Caused by: org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.grails.profiles:angular:jar:3.1.0
        at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:335)
        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)
        ... 7 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact org.grails.profiles:angular:pom:3.1.0 from/to grailsCentral (https://repo.grails.org/grails/core): Connect to repo.grails.org:443 timed out
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
        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)
        ... 14 more
Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact org.grails.profiles:angular:pom:3.1.0 from/to grailsCentral (https://repo.grails.org/grails/core): Connect to repo.grails.org:443 timed out
        at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:43)
        at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)
        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)
        ... 17 more
Caused by: org.apache.http.conn.ConnectTimeoutException: Connect to repo.grails.org:443 timed out
        at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:416)
        at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
        at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294)
        at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:643)
        at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479)
        at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
        at org.apache.http.impl.client.DecompressingHttpClient.execute(DecompressingHttpClient.java:137)
        at org.eclipse.aether.transport.http.HttpTransporter.execute(HttpTransporter.java:287)
        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)
        ... 22 more
Caused by: java.net.SocketTimeoutException: connect timed out
        at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:157)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
        at java.net.Socket.connect(Socket.java:579)
        at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:612)
        at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:414)
        ... 33 more

Error |
Failed to load latest version of profile [angular]. Trying Grails release version
org.eclipse.aether.resolution.DependencyResolutionException: Failed to collect dependencies at org.grails.profiles:angular:jar:3.1.0

3 个答案:

答案 0 :(得分:1)

戈登。

遇到同样的问题。看起来Maven本地存储库文件在开发过程中被破坏了。

要解决此问题,请从文件夹中删除所有文件(MacOS / Linux):

/Users/username/.m2/repository/org/grails/profiles/angular/3.1.0
(视窗)

C:\Documents and Settings\username\.m2\org\grails\profiles\angular\3.1.0

然后重启grails console。

答案 1 :(得分:0)

Try to set the following environment variable: export JAVA_OPTS="-Dhttp.proxyHost=proxy.yourcompany.com -Dhttp.proxyPort=8080 -Dhttps.proxyHost=proxy.yourcompany.com -Dhttps.proxyPort=8080"

答案 2 :(得分:0)

我不知道我在谈论什么,但我认为grails正试图对github做一些ssh。 如果您的代理阻止它,则无法绕过它。 我可以使用https从github克隆,但不能使用ssh克隆:请参阅github help 所以我不能grails create-app等。