Unable to publish to local maven repo when using Gradle and Spring Boot

前端 未结 4 1065
忘了有多久
忘了有多久 2021-01-02 08:09

I have a very simple spring-boot (1.0.2) example (based on http://spring.io/guides/gs/rest-service/) using Gradle (1.12) to create a jar file.

I\'m trying to build

4条回答
  •  一向
    一向 (楼主)
    2021-01-02 08:51

    You might need to ensure that the parent pom or dependency management is specified as well (depends on your configuration, but if you are using the Spring Boot Gradle plugin you probably do need it). Example here: https://github.com/spring-projects/spring-boot/blob/master/spring-boot-integration-tests/spring-boot-gradle-tests/src/test/resources/installer.gradle

    install {
        repositories.mavenInstaller {
            pom.project {
              parent { 
                groupId 'org.springframework.boot'
                artifactId 'spring-boot-starter-parent'
                version "${project.bootVersion}"
              }
            }
        }
    }
    

提交回复
热议问题