我尝试从源代码构建spring-boot并运行https://github.com/spring-projects/spring-boot
中描述的命令./mvnw clean install
然后,在构建Spring Boot Maven Plugin的过程中失败如下。
[INFO] Spring Boot Dependencies ........................... SUCCESS [ 6.237 s]
[INFO] Spring Boot Parent ................................. SUCCESS [04:36 min]
[INFO] Spring Boot Tools .................................. SUCCESS [ 0.984 s]
[INFO] Spring Boot Configuration Metadata ................. SUCCESS [01:10 min]
[INFO] Spring Boot Configuration Processor ................ SUCCESS [ 7.661 s]
[INFO] Spring Boot Loader ................................. SUCCESS [02:39 min]
[INFO] Spring Boot Loader Tools ........................... SUCCESS [ 47.458 s]
[INFO] Spring Boot Maven Plugin ........................... FAILURE [03:43 min]
[INFO] Spring Boot Gradle Plugin .......................... SKIPPED
我想成功完成并完成构建。
执行环境如下。
答案 0 :(得分:0)
感谢您的回复。我接下来运行了以下命令。
./mvnw clean install -e
然后发生了另一个错误。
[INFO] Spring Boot Dependencies ........................... SUCCESS [ 5.667 s]
[INFO] Spring Boot Parent ................................. SUCCESS [ 8.190 s]
[INFO] Spring Boot Tools .................................. SUCCESS [ 1.703 s]
[INFO] Spring Boot Configuration Metadata ................. SUCCESS [ 11.713 s]
[INFO] Spring Boot Configuration Processor ................ SUCCESS [ 10.445 s]
[INFO] Spring Boot Loader ................................. SUCCESS [01:47 min]
[INFO] Spring Boot Loader Tools ........................... SUCCESS [ 7.963 s]
[INFO] Spring Boot Maven Plugin ........................... SUCCESS [05:08 min]
[INFO] Spring Boot Gradle Plugin .......................... SUCCESS [ 34.322 s]
[INFO] Spring Boot Antlib ................................. SUCCESS [01:00 min]
[INFO] Spring Boot Testing Support ........................ SUCCESS [ 7.322 s]
[INFO] Spring Boot ........................................ FAILURE [ 6.271 s]
[INFO] Spring Boot Test ................................... SKIPPED
堆栈跟踪输出如下
[ERROR] Failed to execute goal on project spring-boot: Could not resolve dependencies for project org.springframework.boot:spring-boot:jar:2.0.0.BUILD-SNAPSHOT: Could not find artifact org.springframework.data:spring-data-redis:jar:1.8.1.BUILD-SNAPSHOT in spring-snapshots (http://repo.spring.io/snapshot) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project spring-boot: Could not resolve dependencies for project org.springframework.boot:spring-boot:jar:2.0.0.BUILD-SNAPSHOT: Could not find artifact org.springframework.data:spring-data-redis:jar:1.8.1.BUILD-SNAPSHOT in spring-snapshots (http://repo.spring.io/snapshot)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:221)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:127)
at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:245)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:199)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
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:497)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
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:497)
at org.apache.maven.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:39)
at org.apache.maven.wrapper.WrapperExecutor.execute(WrapperExecutor.java:122)
at org.apache.maven.wrapper.MavenWrapperMain.main(MavenWrapperMain.java:50)
Caused by: org.apache.maven.project.DependencyResolutionException: Could not resolve dependencies for project org.springframework.boot:spring-boot:jar:2.0.0.BUILD-SNAPSHOT: Could not find artifact org.springframework.data:spring-data-redis:jar:1.8.1.BUILD-SNAPSHOT in spring-snapshots (http://repo.spring.io/snapshot)
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:211)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:195)
... 30 more
Caused by: org.eclipse.aether.resolution.DependencyResolutionException: Could not find artifact org.springframework.data:spring-data-redis:jar:1.8.1.BUILD-SNAPSHOT in spring-snapshots (http://repo.spring.io/snapshot)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:384)
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:205)
... 31 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact org.springframework.data:spring-data-redis:jar:1.8.1.BUILD-SNAPSHOT in spring-snapshots (http://repo.spring.io/snapshot)
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)
... 32 more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact org.springframework.data:spring-data-redis:jar:1.8.1.BUILD-SNAPSHOT in spring-snapshots (http://repo.spring.io/snapshot)
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)
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :spring-boot
spring-data-redis.jar(1.8.1.BUILD-SNAPSHOT)似乎还没有上传。你可以这样做吗?
谢谢。