SlideShare a Scribd company logo
1 of 27
Maven-bluemartini Yannick Robin
What is maven-bluemartini? maven-bluemartiniis Maven archetypes for Blue Martini projects Open source project on http://code.google.com/p/maven-bluemartini Tested and documented with BM 10.1
Agenda Why this project? Why Maven? Why Eclipse WTP? What customizations have been done? Demo What are the next steps?
maven-bluemartini goals 1/3 Keep same project structure for all customers (easier for professional services and support to debug) Respect industry standard pratices (new developer productive in Day One) Setup a fresh Blue Martini project in 15 minutes Keep EAR build standard and as simple as possible (No BM installation, no BM scripts) Integrate out-of-the-box BM projects with Continuous integration software stack (e.g.: Hudson, Sonar, Selenium...)
maven-bluemartini goals 2/3 Develop in Java EE mode No BM installation required Run and Deploy the application inside Eclipse Increase development productivity: No deployment for configuration and JSP file changes No deployment for simple java code changes (Hot Code Replacement) No restart when we can deploy (Hot Deploy) Debugging mode
maven-bluemartini goals 3/3 In development mode, keep application dependencies as minimal as possible: Remove EAC dependency Remove JMS dependency Remove WebSphere Network Deployment dependency
How did we achieve these goals? Using Maven Maven archetype for Blue Martini BM configuration files customizations BM Java code customizations Running in deployed mode and using Eclipse WTP
Maven
What is Maven? Convention over configuration A standard XML file (POM) to describe what is custom in your project. E.g.: Name Version SCM url ... Advantage: respect conventions so easy to understand by developers and plugins A nice way to manage, store and versioned dependencies (JAR’s)
Multitude of goals by default mvn clean: Clean up after the build mvn compiler: Compiles Java source mvn test: Run unit tests mvn ear: Generate an EAR from the current project mvn deploy: Deploy the built artifact to the remote repository mvn javadoc: Generate Javadoc for the project mvn scm: Generate a SCM for the current project  mvn eclipse: Generate an Eclipse project file for the current project …
Maven and releasing Tag in svn and update POM with new version Run  Create the artifact using the tag Run mvnrelease:prepare mvnrelease:perform
Create a software factory Maven is a plugin framework and integrate easily with: Continuous Integration Systems Code quality tools Web test automation platforms ...
Continuous Integration SystemHudson Continuous Integration System Nightly build Start/Stop production servers Deploy to production Hudson ”speaks” Maven Create New job and indicate the SCM URL that contains the POM file
Code quality tool - Sonar Generate code quality reports: PMD (Code analysis) Cobertura (Code coverage) ... Run  mvnsonar:sonar
Web test automation platformSelenium Server Easy to integrate acceptance tests to JUnit Add to the POM file:     <dependencies>                <dependency>                        <groupId>org.seleniumhq.selenium</groupId>                        <artifactId>selenium</artifactId>                        <version>2.0a7</version>                        <type>jar</type>                        <scope>compile</scope>                </dependency>    </dependencies> mvn test Run
Eclipse WTP
Eclipse WTP Web Tools Platform (WTP) is an Eclipse extension Run WebLogic inside Eclipse Deploy/Start/Stop from Eclipse interface Support Debug mode with breackpoints Support Hot Code Replacement (HCR) Support Hot Deploy (publish) Support auto-completion inside JSP and JSP navigation M2Eclipse is an Eclipse plugin to do the bridge between Maven and Eclipse WTP
Maven archetypeS
Maven archetypes Web application Repository: http://maven-bluemartini.googlecode.com/svn/repository/ GroupId: com.bluemartini.archetypes ArtifactId: bms-archetype-ear Version:1.0.0 Modules: EAR, WAR, EJB, Utility Batch job Repository: http://maven-bluemartini.googlecode.com/svn/repository/ GroupId: com.bluemartini.archetypes ArtifactId: bms-archetype-batch Version:1.0.0 Modules: Batch
Configuration files Fix to read DNA configuration files as resources in jar archives  "module_paths" DNA {                 "core" StringArray [ "!META-INF/bluemartini/core/bmcommon", "!META-INF/bluemartini/core/appcommon",            … Stored as Maven dependency .m2epositoryomluemartinioreartini-config0.1.1.0artini-config-10.1.1.0.jar Advantages: Versioning Central repository management Simplify deployment & upgrade
martini-patch.jar Multiple fixes for maven-bluemartini project: Use local EAC Read DNA configuration files from JAR's Add maxAbortAttempt (default is 5) for JMS connection Load security files in deployed mode Fix restart error when the application is redeployed GlassFish support JBoss support Configure JNDI in appconfig.dna Remove WebSphere ND dependency
martini-patch.jar AspectJ for BM Java code customizations Customizations easy to identify Can be ported without modification Could be the standard for custom code public aspect BMStartupAspect {	 	String around(String name, String config, HashMap args) 	: execution(public String BMStartup.startup(String, String, HashMap)) && args(name, config, args) 	{ 		System.out.println("*** martini-patch loaded ***"); 		BMStartup.isStarted_ = false; 		return proceed(name, config, args); 	} } Example
Setup
maven-bluemartini setup Add BM libraries and configuration files to your Maven repository Run  Create project modules using maven-bluemartiniarchetype Run  -B  -DarchetypeRepository=http://maven-bluemartini.googlecode.com/svn/repository/ -DarchetypeGroupId=com.bluemartini.archetypes -DarchetypeArtifactId=bms-archetype-ear -DarchetypeVersion=1.0.0 -DgroupId=com.example -DartifactId=myWebsite -Dversion=1.0.0-SNAPSHOT Build EAR Run  mvn install-file mvnarchetype:generate mvn install
Demo...
Demo Batch jobs mvnarchetype:generate -B -DarchetypeGroupId=com.bluemartini.archetypes -DarchetypeArtifactId=bms-archetype-batch -DarchetypeVersion=1.0.0 -DarchetypeRepository=http://maven-bluemartini.googlecode.com/svn/repository/ -DgroupId=com.mycompany.myproject -DartifactId=myproject -Dversion=1.0.0-SNAPSHOT WebSite mvnarchetype:generate -B -DarchetypeGroupId=com.bluemartini.archetypes -DarchetypeArtifactId=bms-archetype-ear -DarchetypeVersion=1.0.0 -DarchetypeRepository=http://maven-bluemartini.googlecode.com/svn/repository/ -DgroupId=com.mycompany.myproject -DartifactId=myProject-website -Dversion=1.0.0-SNAPSHOT
Todo list Archetypes for specific BM web applications: Reference Implementation Contact Center RemoteDesktop Clienteling BM 10.2 support

More Related Content

Recently uploaded

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
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.pdfsudhanshuwaghmare1
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 

Recently uploaded (20)

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
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
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

Featured

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 HealthThinkNow
 
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.pdfmarketingartwork
 
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 2024Neil Kimberley
 
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)contently
 
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 2024Albert Qian
 
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 InsightsKurio // The Social Media Age(ncy)
 
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 2024Search Engine Journal
 
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 summarySpeakerHub
 
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 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 Tessa Mero
 
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 IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
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 managementMindGenius
 
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...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Featured (20)

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...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 

Maven with Blue Martini

  • 2. What is maven-bluemartini? maven-bluemartiniis Maven archetypes for Blue Martini projects Open source project on http://code.google.com/p/maven-bluemartini Tested and documented with BM 10.1
  • 3. Agenda Why this project? Why Maven? Why Eclipse WTP? What customizations have been done? Demo What are the next steps?
  • 4. maven-bluemartini goals 1/3 Keep same project structure for all customers (easier for professional services and support to debug) Respect industry standard pratices (new developer productive in Day One) Setup a fresh Blue Martini project in 15 minutes Keep EAR build standard and as simple as possible (No BM installation, no BM scripts) Integrate out-of-the-box BM projects with Continuous integration software stack (e.g.: Hudson, Sonar, Selenium...)
  • 5. maven-bluemartini goals 2/3 Develop in Java EE mode No BM installation required Run and Deploy the application inside Eclipse Increase development productivity: No deployment for configuration and JSP file changes No deployment for simple java code changes (Hot Code Replacement) No restart when we can deploy (Hot Deploy) Debugging mode
  • 6. maven-bluemartini goals 3/3 In development mode, keep application dependencies as minimal as possible: Remove EAC dependency Remove JMS dependency Remove WebSphere Network Deployment dependency
  • 7. How did we achieve these goals? Using Maven Maven archetype for Blue Martini BM configuration files customizations BM Java code customizations Running in deployed mode and using Eclipse WTP
  • 9. What is Maven? Convention over configuration A standard XML file (POM) to describe what is custom in your project. E.g.: Name Version SCM url ... Advantage: respect conventions so easy to understand by developers and plugins A nice way to manage, store and versioned dependencies (JAR’s)
  • 10. Multitude of goals by default mvn clean: Clean up after the build mvn compiler: Compiles Java source mvn test: Run unit tests mvn ear: Generate an EAR from the current project mvn deploy: Deploy the built artifact to the remote repository mvn javadoc: Generate Javadoc for the project mvn scm: Generate a SCM for the current project mvn eclipse: Generate an Eclipse project file for the current project …
  • 11. Maven and releasing Tag in svn and update POM with new version Run Create the artifact using the tag Run mvnrelease:prepare mvnrelease:perform
  • 12. Create a software factory Maven is a plugin framework and integrate easily with: Continuous Integration Systems Code quality tools Web test automation platforms ...
  • 13. Continuous Integration SystemHudson Continuous Integration System Nightly build Start/Stop production servers Deploy to production Hudson ”speaks” Maven Create New job and indicate the SCM URL that contains the POM file
  • 14. Code quality tool - Sonar Generate code quality reports: PMD (Code analysis) Cobertura (Code coverage) ... Run mvnsonar:sonar
  • 15. Web test automation platformSelenium Server Easy to integrate acceptance tests to JUnit Add to the POM file:     <dependencies>                <dependency>                        <groupId>org.seleniumhq.selenium</groupId>                        <artifactId>selenium</artifactId>                        <version>2.0a7</version>                        <type>jar</type>                        <scope>compile</scope>                </dependency>    </dependencies> mvn test Run
  • 17. Eclipse WTP Web Tools Platform (WTP) is an Eclipse extension Run WebLogic inside Eclipse Deploy/Start/Stop from Eclipse interface Support Debug mode with breackpoints Support Hot Code Replacement (HCR) Support Hot Deploy (publish) Support auto-completion inside JSP and JSP navigation M2Eclipse is an Eclipse plugin to do the bridge between Maven and Eclipse WTP
  • 19. Maven archetypes Web application Repository: http://maven-bluemartini.googlecode.com/svn/repository/ GroupId: com.bluemartini.archetypes ArtifactId: bms-archetype-ear Version:1.0.0 Modules: EAR, WAR, EJB, Utility Batch job Repository: http://maven-bluemartini.googlecode.com/svn/repository/ GroupId: com.bluemartini.archetypes ArtifactId: bms-archetype-batch Version:1.0.0 Modules: Batch
  • 20. Configuration files Fix to read DNA configuration files as resources in jar archives "module_paths" DNA { "core" StringArray [ "!META-INF/bluemartini/core/bmcommon", "!META-INF/bluemartini/core/appcommon", … Stored as Maven dependency .m2epositoryomluemartinioreartini-config0.1.1.0artini-config-10.1.1.0.jar Advantages: Versioning Central repository management Simplify deployment & upgrade
  • 21. martini-patch.jar Multiple fixes for maven-bluemartini project: Use local EAC Read DNA configuration files from JAR's Add maxAbortAttempt (default is 5) for JMS connection Load security files in deployed mode Fix restart error when the application is redeployed GlassFish support JBoss support Configure JNDI in appconfig.dna Remove WebSphere ND dependency
  • 22. martini-patch.jar AspectJ for BM Java code customizations Customizations easy to identify Can be ported without modification Could be the standard for custom code public aspect BMStartupAspect { String around(String name, String config, HashMap args) : execution(public String BMStartup.startup(String, String, HashMap)) && args(name, config, args) { System.out.println("*** martini-patch loaded ***"); BMStartup.isStarted_ = false; return proceed(name, config, args); } } Example
  • 23. Setup
  • 24. maven-bluemartini setup Add BM libraries and configuration files to your Maven repository Run Create project modules using maven-bluemartiniarchetype Run -B -DarchetypeRepository=http://maven-bluemartini.googlecode.com/svn/repository/ -DarchetypeGroupId=com.bluemartini.archetypes -DarchetypeArtifactId=bms-archetype-ear -DarchetypeVersion=1.0.0 -DgroupId=com.example -DartifactId=myWebsite -Dversion=1.0.0-SNAPSHOT Build EAR Run mvn install-file mvnarchetype:generate mvn install
  • 26. Demo Batch jobs mvnarchetype:generate -B -DarchetypeGroupId=com.bluemartini.archetypes -DarchetypeArtifactId=bms-archetype-batch -DarchetypeVersion=1.0.0 -DarchetypeRepository=http://maven-bluemartini.googlecode.com/svn/repository/ -DgroupId=com.mycompany.myproject -DartifactId=myproject -Dversion=1.0.0-SNAPSHOT WebSite mvnarchetype:generate -B -DarchetypeGroupId=com.bluemartini.archetypes -DarchetypeArtifactId=bms-archetype-ear -DarchetypeVersion=1.0.0 -DarchetypeRepository=http://maven-bluemartini.googlecode.com/svn/repository/ -DgroupId=com.mycompany.myproject -DartifactId=myProject-website -Dversion=1.0.0-SNAPSHOT
  • 27. Todo list Archetypes for specific BM web applications: Reference Implementation Contact Center RemoteDesktop Clienteling BM 10.2 support

Editor's Notes

  1. mvn archetype:generate-B -DarchetypeRepository=http://maven-bluemartini.googlecode.com/svn/repository/-DarchetypeGroupId=com.bluemartini.archetypes -DarchetypeArtifactId=bms-archetype-ear -DarchetypeVersion=1.0.0 -DgroupId=com.example -DartifactId=myWebsite -Dversion=1.0.0-SNAPSHOT