gpt4 book ai didi

spring-boot - 将Maven转换为Spring Initializr的Gradle

转载 作者:行者123 更新时间:2023-12-03 06:33:17 25 4
gpt4 key购买 nike

Spring Initializr是一个开源项目,可以从github下载/克隆它以运行我们自己的spring initializr。但是该项目的构建是行家。我想将其转换为gradle。有人可以帮忙吗?

我尝试了gradle init和gradle build
Gradle初始化正在创建build.gradle和settings.gradle,但是gradle构建却给出了错误。

有人可以尝试发布解决方案吗

提前致谢

错误详情 :

Task :initializr-actuator:compileTestJava FAILED
D:\Duplicate1\initializr\initializr-actuator\src\test\java\io\spring\initializr\actuate\ActuatorIntegrationTests.java:19: error: package io.spring.initializr.web does not exist
import io.spring.initializr.web.AbstractFullStackInitializrIntegrationTests;
^
D:\Duplicate1\initializr\initializr-actuator\src\test\java\io\spring\initializr\actuate\ActuatorIntegrationTests.java:35: error: cannot find symbol
extends AbstractFullStackInitializrIntegrationTests {
^
symbol: class AbstractFullStackInitializrIntegrationTests
D:\Duplicate1\initializr\initializr-actuator\src\test\java\io\spring\initializr\actuate\info\BomRangesInfoContributorTests.java:24: error: package io.spring.initializr.test.metadata does not exist
import io.spring.initializr.test.metadata.InitializrMetadataTestBuilder;
^
D:\Duplicate1\initializr\initializr-actuator\src\test\java\io\spring\initializr\actuate\metric\ProjectGenerationMetricsListenerTests.java:28: error: package io.spring.initializr.test.metadata does not exist
import io.spring.initializr.test.metadata.InitializrMetadataTestBuilder;
^
D:\Duplicate1\initializr\initializr-actuator\src\test\java\io\spring\initializr\actuate\stat\AbstractInitializrStatTests.java:23: error: package io.spring.initializr.test.metadata does not exist
import io.spring.initializr.test.metadata.InitializrMetadataTestBuilder;
^
D:\Duplicate1\initializr\initializr-actuator\src\test\java\io\spring\initializr\actuate\stat\MainControllerStatsIntegrationTests.java:24: error: package io.spring.initializr.web does not exist
import io.spring.initializr.web.AbstractFullStackInitializrIntegrationTests;
^
D:\Duplicate1\initializr\initializr-actuator\src\test\java\io\spring\initializr\actuate\stat\MainControllerStatsIntegrationTests.java:56: error: cannot find symbol
extends AbstractFullStackInitializrIntegrationTests {
^
symbol: class AbstractFullStackInitializrIntegrationTests
7 errors

FAILURE: Build failed with an exception.
  • 出了什么问题:
    任务':initializr-actuator:compileTestJava'的执行失败。

    Compilation failed; see the compiler error output for details.

  • 尝试:
    使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行,以获取更多日志输出。与--scan一起运行以获取完整的见解。
  • https://help.gradle.org上获得更多帮助

  • 在此版本中使用了不推荐使用的Gradle功能,使其与Gradle 5.0不兼容。
    参见 https://docs.gradle.org/4.8.1/userguide/command_line_interface.html#sec:command_line_warnings

    4秒内失败
    11个可执行的任务:1个已执行,10个最新

    最佳答案

    除了转换外,您还可以从以下网址生成新项目:

    https://start.spring.io/

    选择Gradle Project并下载代码。

    关于spring-boot - 将Maven转换为Spring Initializr的Gradle,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51568041/

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