gpt4 book ai didi

java - 运行 spring-boot-cli 时在本地开发组中找不到 Artifact org.springframework.boot :spring-boot-starter:jar:2. 0.0.BUILD-SNAPSHOT

转载 作者:行者123 更新时间:2023-11-30 10:33:42 26 4
gpt4 key购买 nike

我正在尝试按照有关如何从命令行运行 Spring 应用程序的说明进行操作:getting-started-cli-example .通过输入 spring run app.groovy 运行应用程序后,出现以下错误:

C:\Users\Administrator\Desktop>spring run app.groovy
startup failed:
General error during conversion: org.eclipse.aether.resolution.DependencyResolutionException: The fo
llowing artifacts could not be resolved: org.springframework.boot:spring-boot-starter:jar:2.0.0.BUIL
D-SNAPSHOT, org.springframework.boot:spring-boot-starter-web:jar:2.0.0.BUILD-SNAPSHOT: Could not fin
d artifact org.springframework.boot:spring-boot-starter:jar:2.0.0.BUILD-SNAPSHOT in local-developer-
group (http://192.168.10.245:8081/nexus/content/groups/public)

org.springframework.boot.cli.compiler.grape.DependencyResolutionFailedException: org.eclipse.aether.
resolution.DependencyResolutionException: The following artifacts could not be resolved: org.springf
ramework.boot:spring-boot-starter:jar:2.0.0.BUILD-SNAPSHOT, org.springframework.boot:spring-boot-sta
rter-web:jar:2.0.0.BUILD-SNAPSHOT: Could not find artifact org.springframework.boot:spring-boot-star
ter:jar:2.0.0.BUILD-SNAPSHOT in local-developer-group (http://192.168.10.245:8081/nexus/content/grou
ps/public)
at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve(AetherGrapeEngine.java:322)
at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.grab(AetherGrapeEngine.java:127)
at groovy.grape.Grape.grab(Grape.java:167)
at groovy.grape.GrabAnnotationTransformation.visit(GrabAnnotationTransformation.java:378)
at org.codehaus.groovy.transform.ASTTransformationVisitor$3.call(ASTTransformationVisitor.java:321)
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:931)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:593)
at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:569)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:546)
at org.springframework.boot.cli.compiler.GroovyCompiler.compile(GroovyCompiler.java:205)
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: The following artifacts coul
d not be resolved: org.springframework.boot:spring-boot-starter:jar:2.0.0.BUILD-SNAPSHOT, org.spring
framework.boot:spring-boot-starter-web:jar:2.0.0.BUILD-SNAPSHOT: Could not find artifact org.springf
ramework.boot:spring-boot-starter:jar:2.0.0.BUILD-SNAPSHOT in local-developer-group (http://192.168.
10.245:8081/nexus/content/groups/public)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:384)
at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve(AetherGrapeEngine.java:317)
... 25 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: The following artifacts could
not be resolved: org.springframework.boot:spring-boot-starter:jar:2.0.0.BUILD-SNAPSHOT, org.springfr
amework.boot:spring-boot-starter-web:jar:2.0.0.BUILD-SNAPSHOT: Could not find artifact org.springfra
mework.boot:spring-boot-starter:jar:2.0.0.BUILD-SNAPSHOT in local-developer-group (http://192.168.10
.245:8081/nexus/content/groups/public)
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.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:367)
... 26 more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact org.spring
framework.boot:spring-boot-starter:jar:2.0.0.BUILD-SNAPSHOT in local-developer-group (http://192.168
.10.245:8081/nexus/content/groups/public)
at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:39)
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 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

1 error

我试图将我的 Maven 安装的 settings.xml 中的 local-developer-group url 更改为 http://repo.spring.io/snapshot/ 因为错误报告清楚地说明了所需的找不到 Artifact ,但我仍然遇到同样的错误。 spring-boot-cli 似乎没有使用我的 maven 安装设置。但我想不出另一个可以指定此 url 的地方。

最佳答案

  1. 您应该使用 spring-boot-cli 的发布版本而不是最先进的快照版本:Manual installation .
  2. spring-boot-cli 使用的 maven settings.xml 位于 .m2 目录中。

关于java - 运行 spring-boot-cli 时在本地开发组中找不到 Artifact org.springframework.boot :spring-boot-starter:jar:2. 0.0.BUILD-SNAPSHOT,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42087521/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com