Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
fabapp2 opened this issue Aug 2, 2022 · 6 comments · Fixed by #460
Closed
Assignees
Labels
good first issue Good for newcomers type: bug Something isn't working
Milestone

Comments

@fabapp2
Copy link
Contributor

fabapp2 commented Aug 2, 2022

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

@fabapp2 fabapp2 added type: bug Something isn't working good first issue Good for newcomers labels Aug 2, 2022
@ahmedmq
Copy link
Contributor

ahmedmq commented Sep 28, 2022

hey @fabapp2 - Can i work on this issue?

@fabapp2
Copy link
Contributor Author

fabapp2 commented Sep 28, 2022

Hi @ahmedmq !

That would be awesome 🚀
Please don't hesitate to ask in case you have questions or need clarification.

@fabapp2
Copy link
Contributor Author

fabapp2 commented Sep 28, 2022

assigned-to: @ahmedmq

@fabapp2 fabapp2 added this to the v0.13.0 milestone Sep 28, 2022
@ahmedmq
Copy link
Contributor

ahmedmq commented 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

@fabapp2
Copy link
Contributor Author

fabapp2 commented Sep 30, 2022

Hi @ahmedmq

thanks for this finding!
Maybe the tests need tests here ;)
I am more than happy if you could look into this.
Can we use #457 instead?
For better reference and review. I assigned you to it, hope that's ok?

@fabapp2 fabapp2 self-assigned this Sep 30, 2022
@ahmedmq
Copy link
Contributor

ahmedmq commented 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

@fabapp2 fabapp2 linked a pull request Oct 3, 2022 that will close this issue
fabapp2 pushed a commit that referenced this issue Oct 3, 2022
* Fix #457 - Enhance initialize spring boot integration test
- Add `application.properties` to multi-module project setup
- Fix whitespaces and remove comments in testcode to match textual content with migrated code
- Fix file path when comparing testcode and migrated code

* Fix #284 - Add version to spring-boot-maven-plugin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants