SlideShare a Scribd company logo
1 of 34
Download to read offline
Mavenizing your
Liferay project

April 18th 2012
Presented by
Jan Gregor




                  …the open source integrator
Presenter
• Introductions   Jan Gregor
                  Senior Portal Consultant
• Questions?
• Presenter




   26.04.2012                                2
Agenda
• Choosing the right build system- Stable and
  efficient build system is a heart of good software
  engineering
• Maven & Liferay– Transforming good to perfect
• Live demo - build, deploy and release of real
  project using Maven
• Next steps – what is planned…
• Q&A




     26.04.2012                                        3
Choosing the right build system
• OOTB Liferay IDE/SDK comes with Ant
• What is wrong with Ant ?
  └   Learn the ant tasks (non-standard)
  └   Non standard folder structure
  └   Integration into existing maven build infrastructure
  └   No dependency management
  └   No versioning
  └   No simple release management




      26.04.2012                                             4
Choosing the right build system
• What is wrong with Ant ?
  └   “Works on my machine ” code
  └   Machine/User-dependant builds
  └   Installation/management effort
  └   Inconsistency of developer environments
  └   Scalability in big teams




      26.04.2012                                5
Choosing the right build system
• Impact on project
  └ Decrease of quality
      └ No releasing
      └ No dependency management
      └ Maintenance & Scalability in future
  └ Higher costs
      └ High effort for each developer setup
      └ Delay by WOMM problems….
  └ Higher project risk
      └ Non-standard processes




     26.04.2012                                6
Choosing the right build system
• Maven
  Maven's primary goal is to allow a developer to comprehend
  the complete state of a development effort in the shortest
  period of time. In order to attain this goal there are several
  areas of concern that Maven attempts to deal with:

  └   Making the build process easy
  └   Providing a uniform build system
  └   Providing quality project information
  └   Providing guidelines for best practices development
  └   Allowing transparent migration to new features



      26.04.2012                                                   7
Maven & Liferay
• Need for a maven plugin for Liferay development

  └ Liferay Maven plugin
      └ Official maven support provided by Liferay with focus on copying the
        ant-based approach in maven enviroment
  └ Mimacom Maven plugin
      └ Custom maven plugin focused on maximizing potential and
        advantages from Maven build system and connecting it with Liferay
        portal
      └ Open source
      └ Plugin maven site




     26.04.2012                                                                8
Mimacom Maven plugin
• Goal of plugin
  └   Wraps the ant scripts with a nice maven facade
  └   Use of standard maven project layout
  └   No learning effort
  └   All maven features are available
  └   Produces self contained artifacts, deployable directly on
      any application server




      26.04.2012                                                  9
Mimacom Maven plugin
• Plugin features
  └   Standardized and transparent build system
  └   Portal customizations without ext
  └   Full support of all liferay plugins development
  └   Product-like packaging of software
  └   Application-server specific builds
  └   Migration & dependency management
  └   Patch management




      26.04.2012                                        10
Standardized & transparent build
• Project structure with standard maven modules
  └ Parent (defines project base configuration)
      └ Portal (represents Liferay portal)
      └ Plugins (represents Liferay plugins)
      └ Another modules (can be anything…)




     26.04.2012                                   11
Portal customizations without ext
• Portal as a part of project
   └ Standard maven module
   └ Opposite of “ext” approach
   └ Original and customization on
     one place
      └ Always separated
      └ Delivered as a black box
   └ Built and deployed by maven



   └ Live preview in eclipse



     26.04.2012                      12
Support of all liferay plugins
• Standard maven modules
   └   Themes
   └   Hooks
   └   Plugins
   └   Layouts
• Build & deploy to server
• Standard folder structure
• Specific plugin configuration

  └    Live preview in eclipse




       26.04.2012                 13
Product-like packaging
• All components are managed by Maven
  └   OOTB Liferay portal
  └   Portal customizations
  └   Plugins
  └   Configuration
  └   Libraries

  └ Singe point of
       └   Compile
       └   Build
       └   Release
       └   Delivery



      26.04.2012                        14
Product-like packaging
• Developing portal customizations
  └ “Ext way”
      └ Separate installation of Application server + Liferay
      └ Developing ext-modules and deploying to portal
  └ Maven way
      └ OOTB Portal with all artifacts and dependencies stored in Maven
        repository
      └ Customizations are made in a maven module
      └ By build time the ootb portal + customizations are merged and
        delivered as a single monolithic package




     26.04.2012                                                           15
Product-like packaging
• Developing portal customizations
  └ Customizations to
      └   Portal-impl
      └   Portal-web
      └   Portal-service
      └   Portal configuration


  └ 3 delivery artifacts
      └ Portal war file
      └ Portal configuration
      └ Portal dependencies




     26.04.2012                      16
Product-like packaging
• Developing portal-service
  customizations
  └ Using standard maven approach
  └ New maven module
      └ Packaging jar
      └ Added portal-service dependencies
      └ Overriding classes
  └ Finally add to portal module as
    dependency
  └ Configure for automatic
    deployment into /lib/ext




     26.04.2012                             17
Product-like packaging
• Delivery artifacts
   └ Portal war-file
       └ Merge ootb + changes
       └ Clear separation for developer
       └ Transparent delivery for customer
   └ Portal dependencies (zip)
       └ Manageable and configurable
   └ Portal configuration (zip)
       └ Separated config files
       └ Manageable and configurable


   └ Getting profits from all standard
     development approaches


      26.04.2012                             18
Product-like packaging
• Profits
   └   All software components managed on a single place
   └   Full control of used versions, components, changes
   └   Clear separation of customized and original code
   └   “Blackbox” delivery of software to a customer without
       any previous installation of portal




       26.04.2012                                              19
Application-server specific builds
• Common problems
  └ Different development / production environments
  └ Automatization and control of AS dependent builds
  └ Missing auto deploy functionality by some Application
    servers




    26.04.2012                                              20
Application-server specific builds
• Individual builds for different AS’s
   └ Integration with maven profiling
   └ Current support of Tomcat & Websphere AS
   └ Simulating deployment process in Liferay by build time
     -> Ensure simple deployment to WAS
   └ Live preview in Eclipse




     26.04.2012                                               21
Migration & dependency management
• All artifacts stored in maven
  repository
   └ Portal-web/impl/service
   └ Portal dependencies
   └ 3rd party libraries




     26.04.2012                     22
Migration & dependency management
• Installing new Liferay version (Step 1)
  └ Download the artifacts
      └ CE
       mvn org.mimacom.maven.plugins:maven-liferay-plugin:downloadLiferay
       -Dversion=6.0.6


      └ EE (Requires access to Customer portal)
       mvn org.mimacom.maven.plugins:maven-liferay-plugin:downloadLiferay
       -Dversion=6.0.11
       -DfileVersion=6.0-ee-sp1
       -Dusername=XXX
       -Dpassword=XXX




     26.04.2012                                                             23
Migration & dependency management
• Installing new Liferay version (Step 2)
   └ Upload the artefacts to maven repository

 mvn org.mimacom.maven.plugins:maven-liferay-plugin:deployLiferay
 -DrepositoryId=mimacom-repo-id-deploy-thirdparty
 -DrepositoryUrl=${mimacom-deploy-path-thirdparty}
 -Dversion=5.2.9
 -DfileVersion=5.2-ee-sp5
 -DserverType=tomcat




   └ Plugin will automatically upload all artifacts into
     repository




       26.04.2012                                                   24
Migration & dependency management
• Migrating to newer Liferay version
  └ Change the dependency version




  └ All dependencies and ootb portal will be
    automatically updated by build time
  └ Possible compile problems and API incompatibility
    immediately signalized




     26.04.2012                                         25
Patch management
• Profiting from maven
  dependency
  management
  └ All patches provided by
    Liferay need to be installed
    in Maven repository
  └ Versioning enables
    installation of “wrong”
    patches
  └ Internal persistent storage
    of all provided patches




     26.04.2012                    26
Patch management
• Integrating patches to
  project
  └ Portal-impl
      └ Dependencies with scope
        compile
  └ Portal-service
      └ Dependencies with scope
        compile and moved by plugin
        to global libraries
  └ Portal-web
      └ Integrated as a maven
        module (hook plugin)
  └ Portlets
      └ Integrated a maven module


     26.04.2012                       27
Next steps
• Support of maven archetypes
• Support of more application servers
• Integration with Liferay IDE and Liferay’s maven
  support
• Improving product-like documentation &
  features
• Providing enterprise support




     26.04.2012                                      28
How to start
• Visit plugin maven site
  └ http://repo.mimacom.org/content/repositories/mimaco
    m-sites-
    open/org/mimacom/maven/plugins/1.5.5/org.edorasfra
    mework.tools.parent/maven-liferay-plugin/index.html
• Any feedback is very welcome!




     26.04.2012                                           29
mimacom path




          Idee              Lösung




© mimacom ag     10/21/10
                  31
Contact




    Contact mimacom:                  Contact Liferay
    International: +41 31 329 09 00   Free: +49 6196 773 0680
    johan.oelen@mimacom.ch            sales-eu@liferay.com

More Related Content

What's hot

Liferay Developer Best Practices for a Successful Deployment
Liferay Developer Best Practices for a Successful DeploymentLiferay Developer Best Practices for a Successful Deployment
Liferay Developer Best Practices for a Successful Deploymentrivetlogic
 
Java EE Arquillian Testing with Docker & The Cloud
Java EE Arquillian Testing with Docker & The CloudJava EE Arquillian Testing with Docker & The Cloud
Java EE Arquillian Testing with Docker & The CloudBruno Borges
 
JDK 8 and JDK 8 Updates in OpenJDK
JDK 8 and JDK 8 Updates in OpenJDKJDK 8 and JDK 8 Updates in OpenJDK
JDK 8 and JDK 8 Updates in OpenJDKWolfgang Weigend
 
Developing modular Java applications
Developing modular Java applicationsDeveloping modular Java applications
Developing modular Java applicationsJulien Dubois
 
OSGi on Google Android using Apache Felix
OSGi on Google Android using Apache FelixOSGi on Google Android using Apache Felix
OSGi on Google Android using Apache FelixMarcel Offermans
 
Melhore o Desenvolvimento do Time com DevOps na Nuvem
Melhore o Desenvolvimento do Time com DevOps na NuvemMelhore o Desenvolvimento do Time com DevOps na Nuvem
Melhore o Desenvolvimento do Time com DevOps na NuvemBruno Borges
 
EclipseCon Europe 2015 - liferay modularity patterns using OSGi -Rafik Harabi
EclipseCon Europe 2015 - liferay modularity patterns using OSGi -Rafik HarabiEclipseCon Europe 2015 - liferay modularity patterns using OSGi -Rafik Harabi
EclipseCon Europe 2015 - liferay modularity patterns using OSGi -Rafik HarabiRafik HARABI
 
Tecnologias Oracle em Docker Containers On-premise e na Nuvem
Tecnologias Oracle em Docker Containers On-premise e na NuvemTecnologias Oracle em Docker Containers On-premise e na Nuvem
Tecnologias Oracle em Docker Containers On-premise e na NuvemBruno Borges
 
Java Modularity with OSGi
Java Modularity with OSGiJava Modularity with OSGi
Java Modularity with OSGiIlya Rybak
 
Using Liferay Portal with LDAP and Single sign-on
Using Liferay Portal with LDAP and Single sign-onUsing Liferay Portal with LDAP and Single sign-on
Using Liferay Portal with LDAP and Single sign-onFirelay
 
Eunis federation2
Eunis federation2Eunis federation2
Eunis federation2HEAnet
 
JSF 2: Myth of panacea? Magic world of user interfaces
JSF 2: Myth of panacea? Magic world of user interfacesJSF 2: Myth of panacea? Magic world of user interfaces
JSF 2: Myth of panacea? Magic world of user interfacesStrannik_2013
 
Embedding Web UIs in your Eclipse application
Embedding Web UIs in your Eclipse applicationEmbedding Web UIs in your Eclipse application
Embedding Web UIs in your Eclipse applicationBoris Bokowski
 
Workshop Framework(J2EE/OSGi/RCP)
Workshop Framework(J2EE/OSGi/RCP)Workshop Framework(J2EE/OSGi/RCP)
Workshop Framework(J2EE/OSGi/RCP)Summer Lu
 
Enterprise OSGi at eBay
Enterprise OSGi at eBayEnterprise OSGi at eBay
Enterprise OSGi at eBayTony Ng
 

What's hot (20)

Liferay Developer Best Practices for a Successful Deployment
Liferay Developer Best Practices for a Successful DeploymentLiferay Developer Best Practices for a Successful Deployment
Liferay Developer Best Practices for a Successful Deployment
 
Java EE Arquillian Testing with Docker & The Cloud
Java EE Arquillian Testing with Docker & The CloudJava EE Arquillian Testing with Docker & The Cloud
Java EE Arquillian Testing with Docker & The Cloud
 
JEE 8, A Big Overview
JEE 8, A Big OverviewJEE 8, A Big Overview
JEE 8, A Big Overview
 
JDK 8 and JDK 8 Updates in OpenJDK
JDK 8 and JDK 8 Updates in OpenJDKJDK 8 and JDK 8 Updates in OpenJDK
JDK 8 and JDK 8 Updates in OpenJDK
 
Developing modular Java applications
Developing modular Java applicationsDeveloping modular Java applications
Developing modular Java applications
 
JavaCro'15 - Managing Java at Scale Security and Compatibility Applications -...
JavaCro'15 - Managing Java at Scale Security and Compatibility Applications -...JavaCro'15 - Managing Java at Scale Security and Compatibility Applications -...
JavaCro'15 - Managing Java at Scale Security and Compatibility Applications -...
 
OSGi on Google Android using Apache Felix
OSGi on Google Android using Apache FelixOSGi on Google Android using Apache Felix
OSGi on Google Android using Apache Felix
 
Melhore o Desenvolvimento do Time com DevOps na Nuvem
Melhore o Desenvolvimento do Time com DevOps na NuvemMelhore o Desenvolvimento do Time com DevOps na Nuvem
Melhore o Desenvolvimento do Time com DevOps na Nuvem
 
EclipseCon Europe 2015 - liferay modularity patterns using OSGi -Rafik Harabi
EclipseCon Europe 2015 - liferay modularity patterns using OSGi -Rafik HarabiEclipseCon Europe 2015 - liferay modularity patterns using OSGi -Rafik Harabi
EclipseCon Europe 2015 - liferay modularity patterns using OSGi -Rafik Harabi
 
Java modularization
Java modularizationJava modularization
Java modularization
 
Tecnologias Oracle em Docker Containers On-premise e na Nuvem
Tecnologias Oracle em Docker Containers On-premise e na NuvemTecnologias Oracle em Docker Containers On-premise e na Nuvem
Tecnologias Oracle em Docker Containers On-premise e na Nuvem
 
Modular Java
Modular JavaModular Java
Modular Java
 
Java Modularity with OSGi
Java Modularity with OSGiJava Modularity with OSGi
Java Modularity with OSGi
 
Using Liferay Portal with LDAP and Single sign-on
Using Liferay Portal with LDAP and Single sign-onUsing Liferay Portal with LDAP and Single sign-on
Using Liferay Portal with LDAP and Single sign-on
 
Java modules
Java modulesJava modules
Java modules
 
Eunis federation2
Eunis federation2Eunis federation2
Eunis federation2
 
JSF 2: Myth of panacea? Magic world of user interfaces
JSF 2: Myth of panacea? Magic world of user interfacesJSF 2: Myth of panacea? Magic world of user interfaces
JSF 2: Myth of panacea? Magic world of user interfaces
 
Embedding Web UIs in your Eclipse application
Embedding Web UIs in your Eclipse applicationEmbedding Web UIs in your Eclipse application
Embedding Web UIs in your Eclipse application
 
Workshop Framework(J2EE/OSGi/RCP)
Workshop Framework(J2EE/OSGi/RCP)Workshop Framework(J2EE/OSGi/RCP)
Workshop Framework(J2EE/OSGi/RCP)
 
Enterprise OSGi at eBay
Enterprise OSGi at eBayEnterprise OSGi at eBay
Enterprise OSGi at eBay
 

Viewers also liked

Microservices with Spring and Cloud Foundry
Microservices with Spring and Cloud FoundryMicroservices with Spring and Cloud Foundry
Microservices with Spring and Cloud Foundrymimacom
 
Utilize the Full Power of GlassFish Server and Java EE Security
Utilize the Full Power of GlassFish Server and Java EE SecurityUtilize the Full Power of GlassFish Server and Java EE Security
Utilize the Full Power of GlassFish Server and Java EE SecurityMasoud Kalali
 
Secure REST with JAX-RS
Secure REST with JAX-RSSecure REST with JAX-RS
Secure REST with JAX-RSCarol McDonald
 
CRM 2.0 - Frameworks for Program Strategy
CRM 2.0 - Frameworks for Program StrategyCRM 2.0 - Frameworks for Program Strategy
CRM 2.0 - Frameworks for Program StrategyMichael Moir
 
Stephen W. Hawking__Fakebook
Stephen W. Hawking__FakebookStephen W. Hawking__Fakebook
Stephen W. Hawking__Fakebooka_downs13
 
I've gotyoubabe
I've gotyoubabeI've gotyoubabe
I've gotyoubabeCharrelDi
 
A New Leadership Imperative: A Social CEO
A New Leadership Imperative: A Social CEOA New Leadership Imperative: A Social CEO
A New Leadership Imperative: A Social CEOMWWPR
 
Ken McKenzie Motiveworks Purse Power Presentation
Ken McKenzie Motiveworks Purse Power PresentationKen McKenzie Motiveworks Purse Power Presentation
Ken McKenzie Motiveworks Purse Power PresentationPursePower
 
Projekt unijny eSerwisowanie (prezentacja projektu)
Projekt unijny eSerwisowanie (prezentacja projektu)Projekt unijny eSerwisowanie (prezentacja projektu)
Projekt unijny eSerwisowanie (prezentacja projektu)Marek Zawadzki
 
PBI Leadership Camp
PBI Leadership CampPBI Leadership Camp
PBI Leadership CampJohn Gunter
 
Presentación1
Presentación1Presentación1
Presentación1jb87areiza
 
Imc Microtool
Imc MicrotoolImc Microtool
Imc Microtoolsessionsg
 
Credera - Agile comes to you 9-27
Credera - Agile comes to you   9-27Credera - Agile comes to you   9-27
Credera - Agile comes to you 9-27Justin Bell
 
What have you learnt about technologies from the
What have you learnt about technologies from theWhat have you learnt about technologies from the
What have you learnt about technologies from theTom Barnard
 
THE SOCIAL CRM // THE BRAVE NEW CUSTOMER RELATIONSHIP MANAGEMENT
THE SOCIAL CRM // THE BRAVE NEW CUSTOMER RELATIONSHIP MANAGEMENTTHE SOCIAL CRM // THE BRAVE NEW CUSTOMER RELATIONSHIP MANAGEMENT
THE SOCIAL CRM // THE BRAVE NEW CUSTOMER RELATIONSHIP MANAGEMENTSkillio.net
 
2011インターンシップ_09N1144_横山大城
2011インターンシップ_09N1144_横山大城2011インターンシップ_09N1144_横山大城
2011インターンシップ_09N1144_横山大城YokoyamaD
 

Viewers also liked (20)

Microservices with Spring and Cloud Foundry
Microservices with Spring and Cloud FoundryMicroservices with Spring and Cloud Foundry
Microservices with Spring and Cloud Foundry
 
Utilize the Full Power of GlassFish Server and Java EE Security
Utilize the Full Power of GlassFish Server and Java EE SecurityUtilize the Full Power of GlassFish Server and Java EE Security
Utilize the Full Power of GlassFish Server and Java EE Security
 
Secure REST with JAX-RS
Secure REST with JAX-RSSecure REST with JAX-RS
Secure REST with JAX-RS
 
CRM 2.0 - Frameworks for Program Strategy
CRM 2.0 - Frameworks for Program StrategyCRM 2.0 - Frameworks for Program Strategy
CRM 2.0 - Frameworks for Program Strategy
 
Stephen W. Hawking__Fakebook
Stephen W. Hawking__FakebookStephen W. Hawking__Fakebook
Stephen W. Hawking__Fakebook
 
Role
RoleRole
Role
 
I've gotyoubabe
I've gotyoubabeI've gotyoubabe
I've gotyoubabe
 
Ch 02
Ch 02Ch 02
Ch 02
 
A New Leadership Imperative: A Social CEO
A New Leadership Imperative: A Social CEOA New Leadership Imperative: A Social CEO
A New Leadership Imperative: A Social CEO
 
Ken McKenzie Motiveworks Purse Power Presentation
Ken McKenzie Motiveworks Purse Power PresentationKen McKenzie Motiveworks Purse Power Presentation
Ken McKenzie Motiveworks Purse Power Presentation
 
Projekt unijny eSerwisowanie (prezentacja projektu)
Projekt unijny eSerwisowanie (prezentacja projektu)Projekt unijny eSerwisowanie (prezentacja projektu)
Projekt unijny eSerwisowanie (prezentacja projektu)
 
PBI Leadership Camp
PBI Leadership CampPBI Leadership Camp
PBI Leadership Camp
 
Presentación1
Presentación1Presentación1
Presentación1
 
Imc Microtool
Imc MicrotoolImc Microtool
Imc Microtool
 
Credera - Agile comes to you 9-27
Credera - Agile comes to you   9-27Credera - Agile comes to you   9-27
Credera - Agile comes to you 9-27
 
What have you learnt about technologies from the
What have you learnt about technologies from theWhat have you learnt about technologies from the
What have you learnt about technologies from the
 
THE SOCIAL CRM // THE BRAVE NEW CUSTOMER RELATIONSHIP MANAGEMENT
THE SOCIAL CRM // THE BRAVE NEW CUSTOMER RELATIONSHIP MANAGEMENTTHE SOCIAL CRM // THE BRAVE NEW CUSTOMER RELATIONSHIP MANAGEMENT
THE SOCIAL CRM // THE BRAVE NEW CUSTOMER RELATIONSHIP MANAGEMENT
 
2011インターンシップ_09N1144_横山大城
2011インターンシップ_09N1144_横山大城2011インターンシップ_09N1144_横山大城
2011インターンシップ_09N1144_横山大城
 
Tugas 3
Tugas 3Tugas 3
Tugas 3
 
Censorship
CensorshipCensorship
Censorship
 

Similar to Mavenizing your Liferay project

Continuous delivery applied (RJUG)
Continuous delivery applied (RJUG)Continuous delivery applied (RJUG)
Continuous delivery applied (RJUG)Mike McGarr
 
Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...
Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...
Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...Martin Bergljung
 
software technology benchmarking
software  technology benchmarkingsoftware  technology benchmarking
software technology benchmarkingMallikarjuna G D
 
S/W Design and Modularity using Maven
S/W Design and Modularity using MavenS/W Design and Modularity using Maven
S/W Design and Modularity using MavenScheidt & Bachmann
 
SQL Server DevOps Jumpstart
SQL Server DevOps JumpstartSQL Server DevOps Jumpstart
SQL Server DevOps JumpstartOri Donner
 
Continuous Delivery Applied
Continuous Delivery AppliedContinuous Delivery Applied
Continuous Delivery AppliedExcella
 
Continuous Delivery Applied (Agile Richmond)
Continuous Delivery Applied (Agile Richmond)Continuous Delivery Applied (Agile Richmond)
Continuous Delivery Applied (Agile Richmond)Mike McGarr
 
Continuous delivery applied (DC CI User Group)
Continuous delivery applied (DC CI User Group)Continuous delivery applied (DC CI User Group)
Continuous delivery applied (DC CI User Group)Mike McGarr
 
DevHub 3 - Composer plus Magento
DevHub 3 - Composer plus MagentoDevHub 3 - Composer plus Magento
DevHub 3 - Composer plus MagentoMagento Dev
 
Continuous Delivery Applied (AgileDC)
Continuous Delivery Applied (AgileDC)Continuous Delivery Applied (AgileDC)
Continuous Delivery Applied (AgileDC)Mike McGarr
 
Continuous delivery applied
Continuous delivery appliedContinuous delivery applied
Continuous delivery appliedMike McGarr
 
From GitHub Source to GitHub Release: Free CICD Pipelines For JavaFX Apps
From GitHub Source to GitHub Release: Free CICD Pipelines For JavaFX AppsFrom GitHub Source to GitHub Release: Free CICD Pipelines For JavaFX Apps
From GitHub Source to GitHub Release: Free CICD Pipelines For JavaFX AppsBruno Borges
 
GeoServer Developers Workshop
GeoServer Developers WorkshopGeoServer Developers Workshop
GeoServer Developers WorkshopJody Garnett
 
TransitioningToMicroServonDocker_MS
TransitioningToMicroServonDocker_MSTransitioningToMicroServonDocker_MS
TransitioningToMicroServonDocker_MSLana Kalashnyk
 

Similar to Mavenizing your Liferay project (20)

Continuous delivery applied (RJUG)
Continuous delivery applied (RJUG)Continuous delivery applied (RJUG)
Continuous delivery applied (RJUG)
 
Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...
Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...
Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...
 
software technology benchmarking
software  technology benchmarkingsoftware  technology benchmarking
software technology benchmarking
 
Build tool
Build toolBuild tool
Build tool
 
S/W Design and Modularity using Maven
S/W Design and Modularity using MavenS/W Design and Modularity using Maven
S/W Design and Modularity using Maven
 
Mavennotes.pdf
Mavennotes.pdfMavennotes.pdf
Mavennotes.pdf
 
4 maven junit
4 maven junit4 maven junit
4 maven junit
 
SQL Server DevOps Jumpstart
SQL Server DevOps JumpstartSQL Server DevOps Jumpstart
SQL Server DevOps Jumpstart
 
Continuous Delivery Applied
Continuous Delivery AppliedContinuous Delivery Applied
Continuous Delivery Applied
 
Continuous Delivery Applied (Agile Richmond)
Continuous Delivery Applied (Agile Richmond)Continuous Delivery Applied (Agile Richmond)
Continuous Delivery Applied (Agile Richmond)
 
Continuous Delivery Applied
Continuous Delivery AppliedContinuous Delivery Applied
Continuous Delivery Applied
 
Continuous delivery applied (DC CI User Group)
Continuous delivery applied (DC CI User Group)Continuous delivery applied (DC CI User Group)
Continuous delivery applied (DC CI User Group)
 
Agile Software Development & Tools
Agile Software Development & ToolsAgile Software Development & Tools
Agile Software Development & Tools
 
Vagrant to-aws-flow
Vagrant to-aws-flowVagrant to-aws-flow
Vagrant to-aws-flow
 
DevHub 3 - Composer plus Magento
DevHub 3 - Composer plus MagentoDevHub 3 - Composer plus Magento
DevHub 3 - Composer plus Magento
 
Continuous Delivery Applied (AgileDC)
Continuous Delivery Applied (AgileDC)Continuous Delivery Applied (AgileDC)
Continuous Delivery Applied (AgileDC)
 
Continuous delivery applied
Continuous delivery appliedContinuous delivery applied
Continuous delivery applied
 
From GitHub Source to GitHub Release: Free CICD Pipelines For JavaFX Apps
From GitHub Source to GitHub Release: Free CICD Pipelines For JavaFX AppsFrom GitHub Source to GitHub Release: Free CICD Pipelines For JavaFX Apps
From GitHub Source to GitHub Release: Free CICD Pipelines For JavaFX Apps
 
GeoServer Developers Workshop
GeoServer Developers WorkshopGeoServer Developers Workshop
GeoServer Developers Workshop
 
TransitioningToMicroServonDocker_MS
TransitioningToMicroServonDocker_MSTransitioningToMicroServonDocker_MS
TransitioningToMicroServonDocker_MS
 

Recently uploaded

Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 

Recently uploaded (20)

Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 

Mavenizing your Liferay project

  • 1. Mavenizing your Liferay project April 18th 2012 Presented by Jan Gregor …the open source integrator
  • 2. Presenter • Introductions Jan Gregor Senior Portal Consultant • Questions? • Presenter 26.04.2012 2
  • 3. Agenda • Choosing the right build system- Stable and efficient build system is a heart of good software engineering • Maven & Liferay– Transforming good to perfect • Live demo - build, deploy and release of real project using Maven • Next steps – what is planned… • Q&A 26.04.2012 3
  • 4. Choosing the right build system • OOTB Liferay IDE/SDK comes with Ant • What is wrong with Ant ? └ Learn the ant tasks (non-standard) └ Non standard folder structure └ Integration into existing maven build infrastructure └ No dependency management └ No versioning └ No simple release management 26.04.2012 4
  • 5. Choosing the right build system • What is wrong with Ant ? └ “Works on my machine ” code └ Machine/User-dependant builds └ Installation/management effort └ Inconsistency of developer environments └ Scalability in big teams 26.04.2012 5
  • 6. Choosing the right build system • Impact on project └ Decrease of quality └ No releasing └ No dependency management └ Maintenance & Scalability in future └ Higher costs └ High effort for each developer setup └ Delay by WOMM problems…. └ Higher project risk └ Non-standard processes 26.04.2012 6
  • 7. Choosing the right build system • Maven Maven's primary goal is to allow a developer to comprehend the complete state of a development effort in the shortest period of time. In order to attain this goal there are several areas of concern that Maven attempts to deal with: └ Making the build process easy └ Providing a uniform build system └ Providing quality project information └ Providing guidelines for best practices development └ Allowing transparent migration to new features 26.04.2012 7
  • 8. Maven & Liferay • Need for a maven plugin for Liferay development └ Liferay Maven plugin └ Official maven support provided by Liferay with focus on copying the ant-based approach in maven enviroment └ Mimacom Maven plugin └ Custom maven plugin focused on maximizing potential and advantages from Maven build system and connecting it with Liferay portal └ Open source └ Plugin maven site 26.04.2012 8
  • 9. Mimacom Maven plugin • Goal of plugin └ Wraps the ant scripts with a nice maven facade └ Use of standard maven project layout └ No learning effort └ All maven features are available └ Produces self contained artifacts, deployable directly on any application server 26.04.2012 9
  • 10. Mimacom Maven plugin • Plugin features └ Standardized and transparent build system └ Portal customizations without ext └ Full support of all liferay plugins development └ Product-like packaging of software └ Application-server specific builds └ Migration & dependency management └ Patch management 26.04.2012 10
  • 11. Standardized & transparent build • Project structure with standard maven modules └ Parent (defines project base configuration) └ Portal (represents Liferay portal) └ Plugins (represents Liferay plugins) └ Another modules (can be anything…) 26.04.2012 11
  • 12. Portal customizations without ext • Portal as a part of project └ Standard maven module └ Opposite of “ext” approach └ Original and customization on one place └ Always separated └ Delivered as a black box └ Built and deployed by maven └ Live preview in eclipse 26.04.2012 12
  • 13. Support of all liferay plugins • Standard maven modules └ Themes └ Hooks └ Plugins └ Layouts • Build & deploy to server • Standard folder structure • Specific plugin configuration └ Live preview in eclipse 26.04.2012 13
  • 14. Product-like packaging • All components are managed by Maven └ OOTB Liferay portal └ Portal customizations └ Plugins └ Configuration └ Libraries └ Singe point of └ Compile └ Build └ Release └ Delivery 26.04.2012 14
  • 15. Product-like packaging • Developing portal customizations └ “Ext way” └ Separate installation of Application server + Liferay └ Developing ext-modules and deploying to portal └ Maven way └ OOTB Portal with all artifacts and dependencies stored in Maven repository └ Customizations are made in a maven module └ By build time the ootb portal + customizations are merged and delivered as a single monolithic package 26.04.2012 15
  • 16. Product-like packaging • Developing portal customizations └ Customizations to └ Portal-impl └ Portal-web └ Portal-service └ Portal configuration └ 3 delivery artifacts └ Portal war file └ Portal configuration └ Portal dependencies 26.04.2012 16
  • 17. Product-like packaging • Developing portal-service customizations └ Using standard maven approach └ New maven module └ Packaging jar └ Added portal-service dependencies └ Overriding classes └ Finally add to portal module as dependency └ Configure for automatic deployment into /lib/ext 26.04.2012 17
  • 18. Product-like packaging • Delivery artifacts └ Portal war-file └ Merge ootb + changes └ Clear separation for developer └ Transparent delivery for customer └ Portal dependencies (zip) └ Manageable and configurable └ Portal configuration (zip) └ Separated config files └ Manageable and configurable └ Getting profits from all standard development approaches 26.04.2012 18
  • 19. Product-like packaging • Profits └ All software components managed on a single place └ Full control of used versions, components, changes └ Clear separation of customized and original code └ “Blackbox” delivery of software to a customer without any previous installation of portal 26.04.2012 19
  • 20. Application-server specific builds • Common problems └ Different development / production environments └ Automatization and control of AS dependent builds └ Missing auto deploy functionality by some Application servers 26.04.2012 20
  • 21. Application-server specific builds • Individual builds for different AS’s └ Integration with maven profiling └ Current support of Tomcat & Websphere AS └ Simulating deployment process in Liferay by build time -> Ensure simple deployment to WAS └ Live preview in Eclipse 26.04.2012 21
  • 22. Migration & dependency management • All artifacts stored in maven repository └ Portal-web/impl/service └ Portal dependencies └ 3rd party libraries 26.04.2012 22
  • 23. Migration & dependency management • Installing new Liferay version (Step 1) └ Download the artifacts └ CE mvn org.mimacom.maven.plugins:maven-liferay-plugin:downloadLiferay -Dversion=6.0.6 └ EE (Requires access to Customer portal) mvn org.mimacom.maven.plugins:maven-liferay-plugin:downloadLiferay -Dversion=6.0.11 -DfileVersion=6.0-ee-sp1 -Dusername=XXX -Dpassword=XXX 26.04.2012 23
  • 24. Migration & dependency management • Installing new Liferay version (Step 2) └ Upload the artefacts to maven repository mvn org.mimacom.maven.plugins:maven-liferay-plugin:deployLiferay -DrepositoryId=mimacom-repo-id-deploy-thirdparty -DrepositoryUrl=${mimacom-deploy-path-thirdparty} -Dversion=5.2.9 -DfileVersion=5.2-ee-sp5 -DserverType=tomcat └ Plugin will automatically upload all artifacts into repository 26.04.2012 24
  • 25. Migration & dependency management • Migrating to newer Liferay version └ Change the dependency version └ All dependencies and ootb portal will be automatically updated by build time └ Possible compile problems and API incompatibility immediately signalized 26.04.2012 25
  • 26. Patch management • Profiting from maven dependency management └ All patches provided by Liferay need to be installed in Maven repository └ Versioning enables installation of “wrong” patches └ Internal persistent storage of all provided patches 26.04.2012 26
  • 27. Patch management • Integrating patches to project └ Portal-impl └ Dependencies with scope compile └ Portal-service └ Dependencies with scope compile and moved by plugin to global libraries └ Portal-web └ Integrated as a maven module (hook plugin) └ Portlets └ Integrated a maven module 26.04.2012 27
  • 28. Next steps • Support of maven archetypes • Support of more application servers • Integration with Liferay IDE and Liferay’s maven support • Improving product-like documentation & features • Providing enterprise support 26.04.2012 28
  • 29. How to start • Visit plugin maven site └ http://repo.mimacom.org/content/repositories/mimaco m-sites- open/org/mimacom/maven/plugins/1.5.5/org.edorasfra mework.tools.parent/maven-liferay-plugin/index.html • Any feedback is very welcome! 26.04.2012 29
  • 30. mimacom path Idee Lösung © mimacom ag 10/21/10 31
  • 31.
  • 32.
  • 33.
  • 34. Contact Contact mimacom: Contact Liferay International: +41 31 329 09 00 Free: +49 6196 773 0680 johan.oelen@mimacom.ch sales-eu@liferay.com