question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Version for spring-boot-maven-plugin must be set when Boot dependencies are added by

See original GitHub issue

Describe the bug The recipe initialize-spring-boot-migration must set the version for the spring-boot-maven-plugin to the current Spring Boot version.

To Reproduce Run the recipe against a non-Spring application. spring-boot-maven-plugin has no version.

<build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                ...
           </plugin>    

Expected behavior The version for spring-boot-maven-plugin should be explicitly set to the Spring Boot version used.

<build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>${spring-boot.version}</version>
           </plugin>    

Additional context When Spring Boot dependencies are imported using a dependencyManagement section instead of parent pom the version of plugins is not managed and must be explicitly set

reported-by: @andreasf

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
ahmedmqcommented, Sep 30, 2022

Hey @fabapp2

I noticed that the test InitializeSpringBootMigrationRecipeIntegrationTest passes but it actually does not compare the migrated code and the expected code(empty-project). Are you aware of it? I can fix this as part of this issue

1reaction
ahmedmqcommented, Oct 3, 2022

Hey @fabapp2 - That should be perfectly fine. I have submitted a pull request. Please let me know if you need any changes

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spring Boot Maven Plugin Documentation
A dependency management section, inherited from the spring-boot-dependencies POM, that manages the versions of common dependencies. This ...
Read more >
java - Maven requires plugin version to be specified for the ...
In my module, I use spring-boot-configuration-processor , which is one of the dependencies managed by spring-boot-starter-parent (well, actually ...
Read more >
Spring Boot, Maven and Eclipse Errors and TroubleShooting ...
Approach 1 : Spring Boot Project. In pom.xml, the property java.version should be set to 1.8. <properties> <project.build.
Read more >
maven spring-boot-maven-plugin is highlighted in red if ...
maven spring-boot-maven-plugin is highlighted in red if version is specified in paren pom · Top folder from the archive should be opened as...
Read more >
Spring Boot - Dependency Management - GeeksforGeeks
You can specify or change the Spring-Boot version. On changing Spring-Boot versions, all the versions of mentioned(added) dependencies will ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found