Send the link below via email or IMCopy
Present to your audienceStart remote presentation
- Invited audience members will follow you as you navigate and present
- People invited to a presentation do not need a Prezi account
- This link expires 10 minutes after you close the presentation
- A maximum of 30 users can follow your presentation
- Learn more about this feature in our knowledge base article
Copy of Gradle - A Better Way To Build
Transcript of Copy of Gradle - A Better Way To Build
Erich Gamma There is no "One Size Fits All"
in Enterprise Build Systems! Default lifecycle? No build is the same Organizational constraints Legacy systems No more "build".
It's Project Automation. Release
management Version numbers Branching and tagging Deployment Documentation
generation Are th code samples up to date?
Use real tests code Compile
Are the code
samples up to date? Look, ma, Assembly Plugin! Infected Ant It's Not About
The Grammar Spring in XML? EJB2 in Groovy? It's About Too Much
Rigid Assumptions Diseases Definition Imperativeness Other Stuff Integration with Ant Use Ant Tasks Reuse Ant builds Integration with Maven Use Maven repositories Generate POMs Use POM dependency information POM to Gradle
migration Ivy for dependency Management Easy plugin development:
Groovy or Java Superior dependency manager Configurable conflicts management BTW, someone knows how Maven does it? Declarative, not Rigid You specify the "what"
Gradle figures out the "how" Plain Java Project No dictate Build Specific Language SourceSets Typed Tasks Archives Dependencies Projects Configurations Artifacts Plugins Custom Declarative Elements Declarative Feedom! Dependencies per Source Dir JDK per Source Dir Many Artifacts Per Project Many Sources Per Project Many Projects Per Source Dir Extenable Build Language
instead of Build Framework Separate Imperative from Declarative Imperative, not messy/i Custom Tasks/Plugins Use the power hidden in declarative ? What's your build tool? build files - haku or doostop? Multi-module - joy or pain? Unsusual tasks - ride or fight? Implementing something "nice-to-have" -
"With pleasure" or "forget it"? IDE support
CI Servers Support
Out of the box plugins
Community Tooling execution plan Code time! Code time! Code time! Code - last time! Mutli-module
build Actually, "no
code" time. Code, again!
How to add integration
tests in Maven (with executable
before and after) Consider options of
integration tests in Maven:
Rename all integration tests Put tests under subdirectory Create separate module Use 2 executions of surefire plugin Use failsafe plugin Add surefire plugin section,
incuding only *Test
Add failsafe plugin section,
including only *IntegrationTest
Try to use maven exec plugin
in pre-integration-test and
Discover it doesn't have any forking option
Try to use antrun plugin
Checkout exec plugin
Change the plugin source to add forking option Discover it doesn't have any waiting option Change the plugin source once more Build, test and deploy the forked plugin Build, test and deploy the forked plugin Try to add another execution
in pre-integration-test and
bump into MNG-2258 Discover that it is a little-bit
heavy and look for skip option Build, test and deploy the forked plugin change the exec plugin code
to skip if no integration tests found How do you know?
There is no integration between plugins! Do something dirty @JBaruch