How to do a Maven to Gradle migration on a Java Spring Boot project

  Рет қаралды 11,283

Tom Gregory Tech

Tom Gregory Tech

Күн бұрын

If you're looking to migrate your project from Maven to Gradle then follow this simple step-by-step process explained in this video.
We'll use an example Spring Boot application which builds in Maven, and within 8 steps convert it to Gradle.
Gradle is a build automation tools which offers a less verbose Groovy syntax, incremental builds, and potential significant speed improvements.
▶️ step 1: run a build scan on the Maven build 4:03
▶️ step 2: run an automatic conversion 6:12
▶️ step 3: build your project and work through any errors 9:25
▶️ step 4: compare the built artifacts 10:25
▶️ step 5: run a build scan on the Gradle build 13:28
▶️ step 6: convert plugins 14:43
▶️ step 7: ensure tests re running 15:52
▶️ step 8: manually test the application 17:07
🚀 FREE QUICK-START GRADLE GUIDE tomgregory.com...
🔥 ULTIMATE GRADLE BUILD BIBLE tomgregory.com...
VIDEO RESOURCES
🐘 Gradle migration docs docs.gradle.or...
👨‍💻 GitHub repo github.com/tkg...
📖 This video in article format tomgregory.com...

Пікірлер: 39
@israellaks
@israellaks 4 жыл бұрын
thanks for sharing it! I'm sure your channel will grow a lot soon :)
@TomGregoryTech
@TomGregoryTech 4 жыл бұрын
You're welcome! We will see ;)
@ManuelJordan317
@ManuelJordan317 3 жыл бұрын
Excellent video tutorial! ... Just how a friendly and polite suggestion, consider to create a video about a deep covering for Gradle Scans. Keep doing this excellent work!
@TomGregoryTech
@TomGregoryTech 3 жыл бұрын
Thanks Manel. Great idea. Keep the suggestions coming.
@TheSega84x
@TheSega84x 2 жыл бұрын
Thanks for the great tutorial :)
@ManuelJordan317
@ManuelJordan317 3 жыл бұрын
Please let me know if you have a Twitter account to share with a cc your playlist. Really very valuable your set of videos. Huge thanks for this set of videos! Best Regards
@ManuelJordan317
@ManuelJordan317 3 жыл бұрын
For my own track control: 03:56 -> Maven Git Plugin (git-commit-id-plugin) 04:06 -> The URL guides.gradle.org/creating-build-scans now redirects to scans.gradle.com/
@fkyduckwarsaw691
@fkyduckwarsaw691 3 жыл бұрын
Great tutorial ! thx a lot! I've done it! ) It was a little bit scary,but finally it works fine!
@TomGregoryTech
@TomGregoryTech 3 жыл бұрын
Congratulations Kirill!
@okeydonkey19
@okeydonkey19 2 жыл бұрын
Thank you for your video!! It really helped me to understand whole convert process but I wonder if I can delete maven files after finishing converting to gradle. Thank you again! 👍🏻
@TomGregoryTech
@TomGregoryTech 2 жыл бұрын
Hi Okey Donkey. Yes go ahead and delete the Maven files once you have migrated your build. They should still be in version control if you ever need to reference them.
@priyasrinath9997
@priyasrinath9997 Жыл бұрын
We are getting version conflicts and gradle downloading different versions than mavenn and hence application failing.. how do I ensure gradle downloads exactly the same dependency
@BrazenNL
@BrazenNL Жыл бұрын
Excellent content, but that percussive sound is hard on my ears.
@vikas45
@vikas45 3 жыл бұрын
Hi Tom, Your videos are great!!. However, when I run a maven build, it didn't produce scan for me. I placed this extension file in wrapper, tried with version 1.3.6 and also with 1.8. I am using Maven 3.6.3 and Java 1.8. What am I missing, is there something else related to gradle that needs to be put somewhere?
@TomGregoryTech
@TomGregoryTech 3 жыл бұрын
Hi Vikas. I tried this with Maven 3.6.3. There should be be no additional configuration required. Remember the extension file needs to go in .mvn/extensions.xml. Not in the wrapper directory.
@vikas45
@vikas45 3 жыл бұрын
@@TomGregoryTech Thanks for the reply.
@a1ivh
@a1ivh 2 жыл бұрын
I just don't understand why intellij create separate modules for main and test directories when you open a gradle project with it. Can you suggest if there is any solution so the project structure be the same in intellij?
@TomGregoryTech
@TomGregoryTech 2 жыл бұрын
Never thought about that before. Do the separate modules cause an issue for you?
@a1ivh
@a1ivh 2 жыл бұрын
@@TomGregoryTech Not an issue but because I am used to the way intellij integrate with maven project, I am expecting the same project structure. And well, I think it might be a bug in intellij.
@TomGregoryTech
@TomGregoryTech 2 жыл бұрын
@@a1ivh OK. If you think you found a bug you can always raise with JetBrains and see what they say youtrack.jetbrains.com/issues
@a1ivh
@a1ivh 2 жыл бұрын
@@TomGregoryTech no I am not saying it is a bug. I'm saying to me it feels like a bug. Because no matter which build tools you are using there is no reason IDE treat the project structure differently unless we are misconfiguring something.
@vijayvarotariya3556
@vijayvarotariya3556 3 жыл бұрын
Maven plugin has been eliminated in graddle 7.0. do you have any idea about it? Can you please upload some videos regarding it?
@TomGregoryTech
@TomGregoryTech 3 жыл бұрын
Hi Vijay. Which plugin are you talking about specifically? maven-publish?
@vijayvarotariya3556
@vijayvarotariya3556 3 жыл бұрын
@@TomGregoryTech yes actually I have upgraded my studio and gradle version 7.0 and because of that i got issues in my code, after lots of research I have comes to know that I have to upgrade gradle version as well, i.e. latest version is 7.0 and api level 31 , studio version Arctic fox.
@djoleezcool
@djoleezcool 2 жыл бұрын
should we delete mvn folder after migration?
@TomGregoryTech
@TomGregoryTech 2 жыл бұрын
You mean the .mvn directory which contains the Maven wrapper? Yes, please delete this and any other Maven files once you're happy with the changes. It should all be available for refence from version control anyway.
@dumindamadawa8965
@dumindamadawa8965 3 жыл бұрын
Thanks
@RomanRoschin
@RomanRoschin 4 жыл бұрын
Nice!
@sankurathrisrisaimahesh1299
@sankurathrisrisaimahesh1299 3 жыл бұрын
I have done project like online shopping website, but I used mavan, I will send u the github link, can u please convert into gradle project, and send me the github link... it would help me a lot.....Kindly acknowledge
@TomGregoryTech
@TomGregoryTech 3 жыл бұрын
Hi. I made this video to help others do a Maven to Gradle conversion themselves. Why not give it a go and let me know how you get on?
@rams_routin
@rams_routin 3 жыл бұрын
Hi Tom, I can't able to run compareArtifacts.sh file it is not giving me any output. I have also installed unix in my windows and tried with running - sh compareArtifacts.sh and it shows me error '--block-size=M' unrecognized. Is there anything i am missing here?
@TomGregoryTech
@TomGregoryTech 3 жыл бұрын
Hi Ramu. I just double checked the script for you and it works in Ubuntu Linux. You can always just remove "--block-size=M" from the script or compare the file sizes manually using whatever tool you're comfortable with.
@Justin-wc4vt
@Justin-wc4vt 4 ай бұрын
Oh my gosh why the drums
@glennluque
@glennluque 4 жыл бұрын
Hey excellent!, one question, how migrate maven to gradle android the next project: github.com/esig/dss cefdigital cefdigital ec.europa.eu/cefdigital/artifact/content/repositories/esignaturedss/ thank you!
@TomGregoryTech
@TomGregoryTech 4 жыл бұрын
Hi Glenn. If I understand your question correctly, you're asking how to reference this repository from Gradle? You can declare a custom Maven repository like this in Gradle: repositories { maven { url "ec.europa.eu/cefdigital/artifact/content/repositories/esignaturedss" } }
@glennluque
@glennluque 4 жыл бұрын
@@TomGregoryTech thank you
@Titus0RA
@Titus0RA 2 жыл бұрын
I keep getting * What went wrong: Plugin [id: 'com.gradle.enterprise', version: '3.10.2', artifact: 'com.gradle:gradle-enterprise-gradle-plugin:3.10.2'] was not found in any of the following sources: but i didnt add this plugin in my build.gradle file...
@TomGregoryTech
@TomGregoryTech 2 жыл бұрын
Was this when you ran "./gradlew build --scan"? Could there be something blocking the network connection?
@filimonrios5540
@filimonrios5540 Жыл бұрын
Hello Tom could please send me your email, i need one consulting....
With these 5 Gradle benefits you'll NEVER use Maven again
10:53
Tom Gregory Tech
Рет қаралды 15 М.
Введение в Gradle
1:02:10
Сергей Петрелевич
Рет қаралды 14 М.
Mom had to stand up for the whole family!❤️😍😁
00:39
Un coup venu de l’espace 😂😂😂
00:19
Nicocapone
Рет қаралды 10 МЛН
What's cooking in Maven?  by Maarten Mulders
52:00
Devoxx
Рет қаралды 2,4 М.
Maven Tutorial - Crash Course
26:08
Marco Codes
Рет қаралды 171 М.
Gradle Build Tool Tutorial : Step By Step Guide
38:57
Ashok IT
Рет қаралды 10 М.
Spring boot 3.0 - The full migration guide
34:29
Bouali Ali
Рет қаралды 25 М.
Gradle Lifecycle Evaluation Order For Multi-Project Builds
17:42
Tom Gregory Tech
Рет қаралды 10 М.
7 Gradle secrets you WISH you'd known
9:46
Tom Gregory Tech
Рет қаралды 7 М.
"The Life & Death of htmx" by Alexander Petros at Big Sky Dev Con 2024
23:01
Montana Programmers
Рет қаралды 63 М.
What is the Gradle wrapper and why should you use it?
7:40
Tom Gregory Tech
Рет қаралды 16 М.
the Road to Java: Multi Module Builds with Apache Maven and Gradle
25:03
Coffee + Software
Рет қаралды 3,7 М.