

以下のgroovyを `spring run app.groovy` で実行した結果、エラーが出ました。  
原因がわかる方、教えて下さい。

* * *

**対象のコード**

[code]

    @RestController 
    class App{
        @RequestMapping("/")
        def  home(){ 
            "Hello !!" 
        }
    }
    
[/code]

**エラーメッセージ**

[code]

    C:\Users\User\Desktop>spring run app.groovy
    Resolving dependencies...
    startup failed:
    General error during conversion: org.eclipse.aether.resolution.DependencyResolutionException: Failed to collect dependencies at org.springframework.boot:spring-boot-starter:jar:2.0.0.M5
    
    org.springframework.boot.cli.compiler.grape.DependencyResolutionFailedException: org.eclipse.aether.resolution.DependencyResolutionException: Failed to collect dependencies at org.springframework.boot:spring-boot-starter:jar:2.0.0.M5
            at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve(AetherGrapeEngine.java:312)
            at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.grab(AetherGrapeEngine.java:120)
            at groovy.grape.Grape.grab(Grape.java:167)
            at groovy.grape.GrabAnnotationTransformation.visit(GrabAnnotationTransformation.java:377)
            at org.codehaus.groovy.transform.ASTTransformationVisitor$3.call(ASTTransformationVisitor.java:305)
            at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:948)
            at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:615)
            at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:591)
            at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:568)
            at org.springframework.boot.cli.compiler.GroovyCompiler.compile(GroovyCompiler.java:206)
            at org.springframework.boot.cli.command.run.SpringApplicationRunner.compile(SpringApplicationRunner.java:129)
            at org.springframework.boot.cli.command.run.SpringApplicationRunner.compileAndRun(SpringApplicationRunner.java:101)
            at org.springframework.boot.cli.command.run.RunCommand$RunOptionHandler.run(RunCommand.java:111)
            at org.springframework.boot.cli.command.options.OptionHandler.run(OptionHandler.java:84)
            at org.springframework.boot.cli.command.OptionParsingCommand.run(OptionParsingCommand.java:54)
            at org.springframework.boot.cli.command.CommandRunner.run(CommandRunner.java:219)
            at org.springframework.boot.cli.command.CommandRunner.runAndHandleErrors(CommandRunner.java:171)
            at org.springframework.boot.cli.SpringCli.main(SpringCli.java:63)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:498)
            at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
            at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
            at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
            at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
    Caused by: org.eclipse.aether.resolution.DependencyResolutionException: Failed to collect dependencies at org.springframework.boot:spring-boot-starter:jar:2.0.0.M5
            at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:380)
            at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve(AetherGrapeEngine.java:307)
            ... 25 more
    Caused by: org.eclipse.aether.collection.DependencyCollectionException: Failed to collect dependencies at org.springframework.boot:spring-boot-starter:jar:2.0.0.M5
            at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:291)
            at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:341)
            ... 26 more
    Caused by: org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.springframework.boot:spring-boot-starter:jar:2.0.0.M5
            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)
            ... 27 more
    Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact org.springframework.boot:spring-boot-starter:pom:2.0.0.M5 from/to central (http://repo1.maven.org/maven2/): HTTPS Required (501)
            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)
            ... 34 more
    Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact org.springframework.boot:spring-boot-starter:pom:2.0.0.M5 from/to central (http://repo1.maven.org/maven2/): HTTPS Required (501)
            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)
            ... 37 more
    Caused by: org.apache.http.client.HttpResponseException: HTTPS Required (501)
            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)
            ... 42 more
    
    1 error
    
[/code]


CC BY-SA 4.0
2020-04-19T07:13:19.147
65751
2020-04-19T12:39:05.053
2020-04-19T12:38:06.127
2808
39703
question
spring spring-boot groovy
spring run app.groovyを実行した結果エラーが発生する


[Spring Boot CLI 2.0.0.M5](https://docs.spring.io/spring-
boot/docs/2.0.0.M5/reference/htmlsingle/#cli) で事象が再現するのを確認しました。

正式リリース版である `2.0.0.RELEASE` ([インストール方法](https://docs.spring.io/spring-
boot/docs/2.0.0.RELEASE/reference/html/getting-started-installing-spring-
boot.html#getting-started-installing-the-
cli))か、最新安定版([同](https://docs.spring.io/spring-
boot/docs/current/reference/html/getting-started.html#getting-started-
installing-the-cli); 現在は`2.2.6.RELEASE`)を利用すれば解消するようです。

(バージョン番号に`M5`と付いているのはマイルストーン版であり、正式リリース版ではないことを表しています。)


CC BY-SA 4.0
2020-04-19T12:31:55.807
65762
2020-04-19T12:39:05.053
2020-04-19T12:39:05.053
2808
2808
65751
answer