Build + API — Maven · Gradle · curl · Postman
Build + API — Maven · Gradle · curl · Postman
🎯 After reading this lesson
After finishing this lesson, you will be able to confidently do the following three things.
- ▸✅ Choose between Maven vs Gradle + understand why to use Wrapper
- ▸✅ curl + Postman + Newman workflow
- ▸✅ Automate API regression testing in GitHub Actions
Keep the learning objectives as a checklist and close the lesson once you can answer all of them.
Maven vs Gradle — Java Build Standards
In one line: An automation tool for dependency management, build, test, and deployment.
Same dependency, different syntax:
> 💡 When to use which: New projects = Gradle. Existing Maven projects = keep as is. Spring Initializr also defaults to Gradle.
curl + Postman — API Testing
curl = terminal HTTP client. The standard for CI, debugging, and documentation examples.
Essential options:
- ▸
-X POST— method - ▸
-H "Header: value"— add header - ▸
-d '{"key":"value"}'— body (POST/PUT) - ▸
-i— include response headers - ▸
-v— verbose (full request and response) - ▸
-o file— save to file - ▸
-L— follow redirects
Examples:
Postman = GUI + collaboration features:
- ▸Collection — API group (shared with team)
- ▸Environment — dev/stage/prod variables
- ▸Tests — validate responses with JS (
pm.expect(...)) - ▸Mock Server — fake API responses (frontend development without backend)
- ▸Newman — run collections via CLI (CI integration)
> 💡 curl is for code examples, CI, and quick debugging. Postman is for team collaboration and complex scenarios. Use both.
🤖 Try Asking AI Like This
Knowing the concepts from this lesson lets you give specific instructions to AI. Not a vague 'fix this,' but a request with the right vocabulary — that's where token savings begin.
- ▸'Migrate this pom.xml to build.gradle.kts'
- ▸'Check this dependency graph for conflicts and duplicates'
Why This Reduces Tokens
Without the concepts, even after receiving an AI response you have to ask again: 'What does that mean?' Those follow-up questions are what consume tokens. Learn the concept once and the conversation ends in one go.