0
Mavenizing yourLiferay projectApril 18th 2012Presented byJan Gregor                  …the open source integrator
Presenter• Introductions   Jan Gregor                  Senior Portal Consultant• Questions?• Presenter   26.04.2012       ...
Agenda• Choosing the right build system- Stable and  efficient build system is a heart of good software  engineering• Mave...
Choosing the right build system• OOTB Liferay IDE/SDK comes with Ant• What is wrong with Ant ?  └   Learn the ant tasks (n...
Choosing the right build system• What is wrong with Ant ?  └   “Works on my machine ” code  └   Machine/User-dependant bui...
Choosing the right build system• Impact on project  └ Decrease of quality      └ No releasing      └ No dependency managem...
Choosing the right build system• Maven  Mavens primary goal is to allow a developer to comprehend  the complete state of a...
Maven & Liferay• Need for a maven plugin for Liferay development  └ Liferay Maven plugin      └ Official maven support pro...
Mimacom Maven plugin• Goal of plugin  └   Wraps the ant scripts with a nice maven facade  └   Use of standard maven projec...
Mimacom Maven plugin• Plugin features  └   Standardized and transparent build system  └   Portal customizations without ex...
Standardized & transparent build• Project structure with standard maven modules  └ Parent (defines project base configurat...
Portal customizations without ext• Portal as a part of project   └ Standard maven module   └ Opposite of “ext” approach   ...
Support of all liferay plugins• Standard maven modules   └   Themes   └   Hooks   └   Plugins   └   Layouts• Build & deplo...
Product-like packaging• All components are managed by Maven  └   OOTB Liferay portal  └   Portal customizations  └   Plugi...
Product-like packaging• Developing portal customizations  └ “Ext way”      └ Separate installation of Application server +...
Product-like packaging• Developing portal customizations  └ Customizations to      └   Portal-impl      └   Portal-web    ...
Product-like packaging• Developing portal-service  customizations  └ Using standard maven approach  └ New maven module    ...
Product-like packaging• Delivery artifacts   └ Portal war-file       └ Merge ootb + changes       └ Clear separation for d...
Product-like packaging• Profits   └   All software components managed on a single place   └   Full control of used version...
Application-server specific builds• Common problems  └ Different development / production environments  └ Automatization a...
Application-server specific builds• Individual builds for different AS’s   └ Integration with maven profiling   └ Current ...
Migration & dependency management• All artifacts stored in maven  repository   └ Portal-web/impl/service   └ Portal depend...
Migration & dependency management• Installing new Liferay version (Step 1)  └ Download the artifacts      └ CE       mvn o...
Migration & dependency management• Installing new Liferay version (Step 2)   └ Upload the artefacts to maven repository mv...
Migration & dependency management• Migrating to newer Liferay version  └ Change the dependency version  └ All dependencies...
Patch management• Profiting from maven  dependency  management  └ All patches provided by    Liferay need to be installed ...
Patch management• Integrating patches to  project  └ Portal-impl      └ Dependencies with scope        compile  └ Portal-s...
Next steps• Support of maven archetypes• Support of more application servers• Integration with Liferay IDE and Liferay’s m...
How to start• Visit plugin maven site  └ http://repo.mimacom.org/content/repositories/mimaco    m-sites-    open/org/mimac...
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 ...
Mavenizing your Liferay project
Mavenizing your Liferay project
Mavenizing your Liferay project
Upcoming SlideShare
Loading in...5
×

Mavenizing your Liferay project

5,044

Published on

Delivering software in a certain quality and form is always essential for its success. Versioning, packaging, and environment-based deliveries are issues involved with every software project, and these issues are especially crucial when the software consists of multiple components.

In this session, we present our own build system based on Maven used for Liferay development. Using the right tools in software projects is essential for keeping certain standards of quality and efficiency, and it also decreases the risk connected with human factor. We introduce how you can leverage from the world's most popular build system, Maven, and use it for your Liferay projects.

Common problems like "work on my machine" code, dependency management, or versioning of components will no longer be an issue. A live demo is shown to demonstrate how this tool can be used to cover the whole project's life-cycle including development, testing, integrating Liferay patches, or migration to a higher version.

Published in: Education, Technology
0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
5,044
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
88
Comments
0
Likes
5
Embeds 0
No embeds

No notes for slide

Transcript of "Mavenizing your Liferay project"

  1. 1. Mavenizing yourLiferay projectApril 18th 2012Presented byJan Gregor …the open source integrator
  2. 2. Presenter• Introductions Jan Gregor Senior Portal Consultant• Questions?• Presenter 26.04.2012 2
  3. 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. 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. 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. 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. 7. Choosing the right build system• Maven Mavens 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 22. Migration & dependency management• All artifacts stored in maven repository └ Portal-web/impl/service └ Portal dependencies └ 3rd party libraries 26.04.2012 22
  23. 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. 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. 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. 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. 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. 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. 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. 30. mimacom path Idee Lösung© mimacom ag 10/21/10 31
  31. 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
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×