SlideShare une entreprise Scribd logo
1  sur  18
Télécharger pour lire hors ligne
Use Maven in Right Way

                     Make build configurations effective
                        with dependencyManagement,
                       pluginManagement and profiles




Monday, May 21, 12
Typical Dependency




                     <dependency>
                        <groupId>my-group1</groupId>
                        <artifactId>artifact</artifactId>
                        <version>1.0</version>
                     </dependency>




Monday, May 21, 12
Typical Dependency




                     <dependency>
                        <groupId>my-group1</groupId>
                        <artifactId>artifact</artifactId>
                        <version>1.0</version>
                     </dependency>




Monday, May 21, 12
Problem Set

                     20 dependencies chaotically
                     distributed per 5 modules

                     Review all modules to make
                     change in dependency

                     The worst case it takes 6 reviews

                     The worst case it takes 120 changes


Monday, May 21, 12
Version in property

             <artifact.version>1.0</artifact.version>


             <dependency>
                <groupId>my-group1</groupId>
                <artifactId>artifact</artifactId>
                <version>${artifact.version}</version>
             </dependency>



Monday, May 21, 12
Extended
                     Dependency
             <dependency>
                <groupId>my-group1</groupId>
                <artifactId>artifact</artifactId>
                <version>${artifact.version}</version>
                <scope>provided</scope>
                <classifier>jdk15</classifier>
                <optional>true</optional>
                <packaging>zip</packaging>
             </dependency>
Monday, May 21, 12
Exclusions
    <dependency>
       <groupId>my-group1</groupId>
       <artifactId>artifact</artifactId>
       ...
       <exclusions>
           <exclusion>
               <groupId>exclude-group</groupId>
               <groupId>exclude</groupId>
           </exclusion>
       </exclusions>
    </dependency>
Monday, May 21, 12
Inject Management




Monday, May 21, 12
Solution 1

                     All dependency configuration in
                     one place

                     The worst case it takes 1 review to
                     change ANY property of ANY
                     dependency

                     The worst case it takes 20 changes


Monday, May 21, 12
Typical Plugin
    <build>
        <plugins>
            <plugin>
                <groupId>plugin-group</groupId>
                <artifactId>plugin</artifactId>
                <version>1.0</version>
                <configuration>...</configuration>
                <executions>...</executions>
            </plugin>
        </plugins>
    </build>
Monday, May 21, 12
Problem Set 2

                     10 plugins chaotically distributed
                     per 5 modules

                     Duplicates

                     The worst case it takes 6 reviews to
                     update plugins

                     The worst case it takes 240
                     changes
Monday, May 21, 12
Inject Management




Monday, May 21, 12
Solution 2

                     All plugins defines in one place

                     NO DUPLICATES

                     In the worst case it takes 1 review
                     to update plugins

                     In the worst case it takes 40
                     changes


Monday, May 21, 12
Monday, May 21, 12
One more thing...




Monday, May 21, 12
Problem Set 3


                     Separate unit tests and integration
                     tests

                     Integration environment to run
                     integration tests ONLY




Monday, May 21, 12
Solution 3

                     Integration profile

                     Common configuration in default
                     pluginManagement

                     Executions & configuration
                     customization in profile



Monday, May 21, 12
Thank you!

                  Anton Naumov
       email: anton.naumow@gmail.com
              twitter: antonnaumov
    blog: http://antonnaumov.posterous.com


Monday, May 21, 12

Contenu connexe

Dernier

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Dernier (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 

En vedette

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

En vedette (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Use maven in_right_way

  • 1. Use Maven in Right Way Make build configurations effective with dependencyManagement, pluginManagement and profiles Monday, May 21, 12
  • 2. Typical Dependency <dependency> <groupId>my-group1</groupId> <artifactId>artifact</artifactId> <version>1.0</version> </dependency> Monday, May 21, 12
  • 3. Typical Dependency <dependency> <groupId>my-group1</groupId> <artifactId>artifact</artifactId> <version>1.0</version> </dependency> Monday, May 21, 12
  • 4. Problem Set 20 dependencies chaotically distributed per 5 modules Review all modules to make change in dependency The worst case it takes 6 reviews The worst case it takes 120 changes Monday, May 21, 12
  • 5. Version in property <artifact.version>1.0</artifact.version> <dependency> <groupId>my-group1</groupId> <artifactId>artifact</artifactId> <version>${artifact.version}</version> </dependency> Monday, May 21, 12
  • 6. Extended Dependency <dependency> <groupId>my-group1</groupId> <artifactId>artifact</artifactId> <version>${artifact.version}</version> <scope>provided</scope> <classifier>jdk15</classifier> <optional>true</optional> <packaging>zip</packaging> </dependency> Monday, May 21, 12
  • 7. Exclusions <dependency> <groupId>my-group1</groupId> <artifactId>artifact</artifactId> ... <exclusions> <exclusion> <groupId>exclude-group</groupId> <groupId>exclude</groupId> </exclusion> </exclusions> </dependency> Monday, May 21, 12
  • 9. Solution 1 All dependency configuration in one place The worst case it takes 1 review to change ANY property of ANY dependency The worst case it takes 20 changes Monday, May 21, 12
  • 10. Typical Plugin <build> <plugins> <plugin> <groupId>plugin-group</groupId> <artifactId>plugin</artifactId> <version>1.0</version> <configuration>...</configuration> <executions>...</executions> </plugin> </plugins> </build> Monday, May 21, 12
  • 11. Problem Set 2 10 plugins chaotically distributed per 5 modules Duplicates The worst case it takes 6 reviews to update plugins The worst case it takes 240 changes Monday, May 21, 12
  • 13. Solution 2 All plugins defines in one place NO DUPLICATES In the worst case it takes 1 review to update plugins In the worst case it takes 40 changes Monday, May 21, 12
  • 16. Problem Set 3 Separate unit tests and integration tests Integration environment to run integration tests ONLY Monday, May 21, 12
  • 17. Solution 3 Integration profile Common configuration in default pluginManagement Executions & configuration customization in profile Monday, May 21, 12
  • 18. Thank you! Anton Naumov email: anton.naumow@gmail.com twitter: antonnaumov blog: http://antonnaumov.posterous.com Monday, May 21, 12