SlideShare a Scribd company logo
mediaworx berlin AG 
mediaworx berlin 1 
OpenCms Module Development & Deployment 
OPENCMS DAYS 2014 
OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment | Kai Widmann & Andreas Karajannis 
with IntelliJ, Maven and Jenkins
mediaworx berlin AG 
mediaworx berlin ......................................................................................... 
About mediaworx 
......................................................................................... 
The OpenCms Plugin for IntelliJ 
......................................................................................... 
The OpenCms Plugin for Maven 
......................................................................................... 
Continuous Integration with Jenkins 
......................................................................................... 
Free Tools + Plugins 
......................................................................................... 
2 
Agenda 
OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis
mediaworx berlin AG 
mediaworx berlin Digital 
Strategy 
User 
Experience 
Performance Marketing 
70 
Owner- managed 
1996 
High-End 
Technology 
3 
mediaworx berlin AG 
OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis
mediaworx berlin AG 
mediaworx berlin •CMS projects since 1998 
•openworx, in-house developed CMS, PHP 
•worked with many CMS systems, among others 
•Fatwire Content Server (now Oracle WebCenter Sites) 
•TYPO3 
•CoreMedia 
•imperia 
•OpenCms is our main CMS since 2012 
•Multiple OpenCms projects for three major clients 
•OpenCms is used for mediaworx.com and themed micro sites 
4 
CMS projects at mediaworx 
OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis
mediaworx berlin AG 
mediaworx berlin 5 
OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis 
The OpenCms Plugin for IntelliJ
mediaworx berlin AG 
mediaworx berlin OpenCms is the CMS of choice for mediaworx 
•Open Source 
•free (as long as OCEE isn’t used) 
•developed by a company (as opposed to the community or a single person) 
•Alkacon has been very supportive throughout our projects 
•active and supportive community 
•constant enhancements through regular updates 
•based on standards 
•very flexible content type definition with XSD 
•highly extensible through custom modules 
•content accessible through JSP tags and Java API 
•WYSIWYG page editor with drag and drop and inline editing 
6 
Why we love OpenCms 
OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis
mediaworx berlin AG 
mediaworx berlin IntelliJ is the CMS team‘s IDE of choice 
•great code suggestion and generation features 
•loads of refactoring options 
•code analysis while typing with the possibility to fix bugs or “bad code” with a single click 
•great code navigation 
•very fast full text search even in huge projects 
•great Maven integration 
•VCS integration 
•easy plugin development 
•free Community Edition (Open Source) 
7 
Why we love IntelliJ 
OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis
mediaworx berlin AG 
mediaworx berlin 8 
Our mission: to bring together IntelliJ and OpenCms 
OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis 
+
mediaworx berlin AG 
mediaworx berlin •development started in 2012 
•based on a plugin for Fatwire ContentServer, also developed by mediaworx 
•added to the official JetBrains plugin repository in 2014 
•Open Source 
•used by all our OpenCms developers for all our OpenCms projects 
•constant developer feedback resulting in new and improved features 
9 
We proudly present: The OpenCms plugin for IntelliJ 
OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis
mediaworx berlin AG 
mediaworx berlin 10 
We proudly present: The OpenCms plugin for IntelliJ 
OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis 
Integration in IntelliJ 
•configuration dialogs in project settings and module settings 
•additional OpenCms menus 
•all menu actions accessible by keyboard shortcuts 
•OpenCms tool window displaying the plugin’s console
mediaworx berlin AG 
mediaworx berlin 11 
We proudly present: The OpenCms plugin for IntelliJ 
OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis 
Core Features 
•sync of resources between IntelliJ and the OpenCms VFS 
•automatic sync of deleted, moved or renamed resources 
•export point handling during sync actions 
•publishing and auto publish (configurable) 
•meta data pull 
•manifest generation 
•module packaging
mediaworx berlin AG 
mediaworx berlin 12 
Configuring the plugin – Project Settings 
OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis 
The OpenCms plugin for IntelliJ can be configured for each IntelliJ project, so you can have different settings for different projects. 
The plugin’s project settings dialog
mediaworx berlin AG 
mediaworx berlin 13 
Configuring the plugin – Module Settings 
OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis 
In IntelliJ’s module settings you can configure your OpenCms modules. It’s possible to override project default behavior for specific modules. 
The plugin’s module settings dialog
mediaworx berlin AG 
mediaworx berlin OpenCms menus are added at the following locations: 
•in the main menu 
•in the project popup menu 
•in the editor popup menu 
•in the editor tab popup menu 
14 
Accessing plugin actions – The OpenCms menus 
OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis 
The OpenCms menu in the main menu offers all of the plugin’s actions for syncing, publishing, meta data pulling, manifest generation and module zip packaging
mediaworx berlin AG 
mediaworx berlin OpenCms menus are added at the following locations: 
•in the main menu 
•in the project popup menu 
•in the editor popup menu 
•in the editor tab popup menu 
15 
Accessing plugin actions – The OpenCms menus 
OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis 
The OpenCms menu in the project popup menu offers actions to 
•sync or publish the selected files, folders or modules 
•pull meta data, generate manifests or package module zips for selected modules
mediaworx berlin AG 
mediaworx berlin OpenCms menus are added at the following locations: 
•in the main menu 
•in the project popup menu 
•in the editor popup menu 
•in the editor tab popup menu 
16 
Accessing plugin actions – The OpenCms menus 
OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis 
The OpenCms menu in the editor popup menu offers actions to sync or publish the file that’s currently open in the editor area
mediaworx berlin AG 
mediaworx berlin OpenCms menus are added at the following locations: 
•in the main menu 
•in the project popup menu 
•in the editor popup menu 
•in the editor tab popup menu 
17 
Accessing plugin actions – The OpenCms menus 
OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis 
The OpenCms menu in the editor tab popup menu offers actions to 
•sync or publish the clicked file 
•sync or publish all open tabs
mediaworx berlin AG 
mediaworx berlin 18 
Goodbye copy & paste – Now let’s sync! 
OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis 
When a resource is synced 
•the file is transferred either from the local file system to OpenCms or vice versa 
•export points are handled if applicable 
•resource meta data is pulled from OpenCms and stored locally 
•a direct publish session is started (if auto publish is enabled) 
The OpenCms plugin for IntelliJ enables developers to work solely in their IDE by syncing changes to and from OpenCms. No need to copy & paste!
mediaworx berlin AG 
mediaworx berlin 19 
For you to choose – The sync modes 
OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis 
Push: 
Local file system is master. All changes to resources made in OpenCms will be overwritten by local files (except properties). VFS resources not existing locally will be deleted. 
Sync: 
Files are synced to and from the OpenCms VFS based on their modification date, the most recent file is synced. That way changes can be made locally and in OpenCms. 
Pull: 
All changes made to local files are overwritten by the corresponding resources in the OpenCms VFS. Files that don't exist in the VFS will be deleted from the local file system. 
The OpenCms plugin for IntelliJ offers three different sync modes that can be configured globally or on a per module basis.
mediaworx berlin AG 
mediaworx berlin Through OpenCms menu actions you can publish files, folders or modules. 
20 
Now you can publish right from your IDE 
OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis 
If you want you can turn on auto publish, so that every time you sync some files, a direct publish session containing the updated resources is started. 
… or let your IDE publish for you
mediaworx berlin AG 
mediaworx berlin 21 
There’s more than files in the VFS – Pulling meta data 
OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis 
The OpenCms VFS keeps meta data on resources that can't be stored with the files in the local file system (e.g. resource IDs, properties). During sync actions that meta data is pulled and stored as XML files in a separate folder structure. 
Resource IDs 
Properties 
Access control 
XML 
In addition to resource meta data, module meta data is pulled and stored for each module as manifest_stub.xml.
mediaworx berlin AG 
mediaworx berlin 22 
But what to do with all that data? 
OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis 
File XML 
Folder XML 
File XML 
Manifest stub XML 
Module manifest.xml 
File XML 
... 
•Version control 
•Manifest generation 
manifest.xml files can be used to package OpenCms module zips from within the plugin itself or by using the OpenCms plugin for Maven.
mediaworx berlin AG 
mediaworx berlin 23 
Packaging module zips for an easy deployment 
OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis 
The OpenCms plugin for IntelliJ lets you package your finished modules into module zips that can then be imported into any OpenCms instance. That way you you can easily deploy your work to multiple test and production machines. 
Production 
Staging
mediaworx berlin AG 
mediaworx berlin •helps avoiding switches between IDE and OpenCms workplace 
•enables version control for OpenCms resources and meta data 
•provides meta data for automatic builds of OpenCms modules 
•improves our efficiency 
•helps us to concentrate on development 
•makes developing OpenCms modules more fun 
•will be actively developed and enhanced 
24 
The OpenCms plugin for IntelliJ 
OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis
mediaworx berlin AG 
mediaworx berlin 25 
OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis 
The OpenCms Plugin for Maven
mediaworx berlin AG 
mediaworx berlin Maven Objectives 
•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 
Maven is a tool for building and managing Java Projects. 
OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis
mediaworx berlin AG 
mediaworx berlin • Automatic dependency management 
• Standardized structure / build process 
• Declarative model 
• Unittest integration 
• Release management 
27 
We use Maven because: 
OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis
mediaworx berlin AG 
mediaworx berlin When we began developing for OpenCms, we wanted to use Maven to build and package our modules. 
•Provides the Maven advantages such as dependency management for OpenCms module development. 
•Comes with a custom packaging type "opencms-module“. 
•Makes Java dependencies available as standard Maven dependencies. 
•Can use static manifests or manifest meta data snippets. 
•Manifests can use placeholders such as version directly from your POM. 
•The plugin can be used standalone or together with the IntelliJ Plugin. 
28 
The OpenCms Plugin for Maven 
OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis
mediaworx berlin AG 
mediaworx berlin 29 
Using the plugin 
OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis 
Your source code is organized according to the standard Maven directory layout.
mediaworx berlin AG 
mediaworx berlin <project> 
<groupId>com.mediaworx.opencms</groupId> 
<artifactId>mymodule</artifactId> 
<version>1.0-SNAPSHOT</version> 
<packaging>opencms-module</packaging> 
<name>mediaworx OpenCms ${project.artifactId}</name> 
<description>mediaworx ${project.artifactId} sample module</description> 
<build> 
<plugins> 
<plugin> 
<groupId>com.mediaworx.mojo</groupId> 
<artifactId>opencms-maven-plugin</artifactId> 
<version>1.2</version> 
<extensions>true</extensions> 
</plugin> 
</plugins> 
</build> 
<dependencies> 
<dependency> 
<groupId>org.opencms</groupId> 
<artifactId>opencms-core</artifactId> 
<version>9.0.1</version> 
</dependency> 
<dependencies> 
</project> 
30 
Using the plugin – POM configuration 
OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis 
Create a POM for your project, defining the default Maven coordinates such as version, group ID, artifact ID and select the packaging type „opencms- module“. 
Finally add opencms-core as dependency to have Maven collect all the needed jar files.
mediaworx berlin AG 
mediaworx berlin 31 
OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis 
Continuous Integration with Jenkins
mediaworx berlin AG 
mediaworx berlin • Early detection of build failures 
• Running codechecks 
• Unittests 
• Build and deplyoment to development / integration or production servers 
• Release Mangement 
32 
Continous Integration and Deployment 
OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis
mediaworx berlin AG 
mediaworx berlin Why Jenkins? 
•Easy to install 
•Webbased Configuration 
•Many plugins available 
•Tight Maven integration 
•Can use directory services for authentication 
•Distributed builds 
33 
Jenkins CI Server 
OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis
mediaworx berlin AG 
mediaworx berlin •We are using our Jenkins CI Server to build our OpenCms modules. 
•Deployment of modules to OpenCms servers is also handled by Jenkins 
•Deployment Steps 
•Build the modules from version control 
•Transfer module zips to target system 
•Remotely on the target system: 
•Stop Tomcat 
•Execute cmsshell commands to install the modules 
•Start Tomcat 
34 
Using Jenkins with OpenCms 
OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis
mediaworx berlin AG 
mediaworx berlin Jenkins 
Meta Data 
Resources 
35 
OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis 
Local Dev 
Working together … 
VCS 
Resources 
Meta Data 
Staging 
Production 
IntelliJ
mediaworx berlin AG 
mediaworx berlin OpenCms Plugin for IntelliJ 
•Documentation (Project Wiki on GitHub) 
•JetBrains plugin repository 
•Source code on GitHub 
OpenCms Plugin for Maven 
•Maven Plugin Documentation 
•Maven Repository 
OpenCms and mediaworx 
36 
If you want to find out more … 
OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis 
If you’re interested in our Tools, you can find extensive documentation and some more information on the web.
mediaworx berlin AG 
mediaworx berlin 37 
Very special thanks to the participants of our survey! 
OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis 
•Eugen Melnichuk 
•Kai Schliemann 
•Thomas (Componio) 
•Paul-Inge Flakstad 
•Fabian Huschka 
•Stephan Hartmann 
In preparation for this presentation we did a survey on the OpenCms mailing list to find out how other people are syncing and deploying OpenCms modules. We‘d like to thank all the people who were willing to share their answers:
mediaworx berlin AG 
mediaworx berlin Jenkins 
Meta Data 
Resources 
38 
OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis 
Local Dev 
Questions? 
VCS 
Resources 
Meta Data 
Staging 
Production 
IntelliJ
mediaworx berlin AG 
mediaworx berlin 39 
ANY QUESTIONS? 
OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis 
opencms.mediaworx.com 
OPENCMS TOOLS & PLUGINS: 
Kai Widmann 
widmann@mediaworx.com 
Andreas Karajannis 
karajannis@mediaworx.com

More Related Content

PPTX
Transforming Organizations with CI/CD
PDF
Continuous integration / deployment with Jenkins
PPTX
DevOps ci/cd with Microsoft vsts and azure
PDF
Dita Release Management
PDF
CI and CD Across the Enterprise with Jenkins (devops.com Nov 2014)
PPTX
Introduction to CI/CD
PDF
What is Jenkins | Jenkins Tutorial for Beginners | Edureka
Transforming Organizations with CI/CD
Continuous integration / deployment with Jenkins
DevOps ci/cd with Microsoft vsts and azure
Dita Release Management
CI and CD Across the Enterprise with Jenkins (devops.com Nov 2014)
Introduction to CI/CD
What is Jenkins | Jenkins Tutorial for Beginners | Edureka

What's hot (18)

PPTX
Anatomy of a Build Pipeline
PDF
Mihai Criveti - PyCon Ireland - Automate Everything
PDF
CI CD Pipeline Using Jenkins | Continuous Integration and Deployment | DevOps...
PDF
Increase the Velocity of Your Software Releases Using GitHub and DeployHub
PDF
Introduction to CICD
PPTX
Dev ops
PPTX
Continuous delivery applied (DC CI User Group)
PPTX
Docker
PPTX
Introduction to jenkins
PDF
CASCON 2017 - OpenAPI v3
PPTX
Ci jenkins maven svn
PDF
Introduction to DevOps Tools | DevOps Training | DevOps Tutorial for Beginner...
PDF
Standardizing Jenkins with CloudBees Jenkins Team
PDF
Agnostic Continuous Delivery
PPTX
Continuous Delivery Applied (Agile Richmond)
PDF
Deep Dive into the Microsoft OpenStack CI Infrastructure (Alessandro Pilotti)
PPTX
Docker - A high level introduction to dockers and containers
PPTX
DevOps introduction
Anatomy of a Build Pipeline
Mihai Criveti - PyCon Ireland - Automate Everything
CI CD Pipeline Using Jenkins | Continuous Integration and Deployment | DevOps...
Increase the Velocity of Your Software Releases Using GitHub and DeployHub
Introduction to CICD
Dev ops
Continuous delivery applied (DC CI User Group)
Docker
Introduction to jenkins
CASCON 2017 - OpenAPI v3
Ci jenkins maven svn
Introduction to DevOps Tools | DevOps Training | DevOps Tutorial for Beginner...
Standardizing Jenkins with CloudBees Jenkins Team
Agnostic Continuous Delivery
Continuous Delivery Applied (Agile Richmond)
Deep Dive into the Microsoft OpenStack CI Infrastructure (Alessandro Pilotti)
Docker - A high level introduction to dockers and containers
DevOps introduction
Ad

Viewers also liked (6)

PDF
OpenCms Days 2015 Creating Apps for the OpenCms 10 workplace
PPT
Maven Introduction
PDF
Continuous delivery-with-maven
PPT
Continuous Integration (Jenkins/Hudson)
PPT
CI and CD with Jenkins
PPT
Jenkins - Continuous Integration after Hudson, CruiseControl, and home built
OpenCms Days 2015 Creating Apps for the OpenCms 10 workplace
Maven Introduction
Continuous delivery-with-maven
Continuous Integration (Jenkins/Hudson)
CI and CD with Jenkins
Jenkins - Continuous Integration after Hudson, CruiseControl, and home built
Ad

Similar to OpenCms Module Development & Deployment with IntelliJ, Maven and Jenkins (17)

PDF
OpenCms Days 2014 - OpenCms Module Development and Deployment with IntelliJ, ...
PDF
Managing And Customizing Opencms 6 Websites Javajsp Xml Content Management Ma...
PDF
OpenCms Days 2015 OpenCms X marks the spot
PDF
OpenCms Days 2015: Keynote - OpenCms 10 X marks the spot
PDF
OpenCms Days 2012 - How to manage an OpenCms project using Agile and continuo...
PDF
Opencms 7 Development Extending And Customizing Opencms Through Its Java Api ...
PDF
OpenCms Days 2015 Workflow using Docker and Jenkins
PDF
OpenCms Days 2013 - Start rolling with OpenCms 9
PPT
Content Management System |CMS | Content Management System Basics |CMS for We...
PDF
OpenCms Days 2014 Keynote - Step up to OpenCms 9.5
PDF
1.0 hippo cmis plugin get together august 2010
PDF
OpenCms Days 2015 How do you develop for OpenCms?
PPT
Open Source Content Management Systems
PPTX
Java CMS 2015
PDF
Open CMS
DOCX
5 Most Popular Open Source Content Management Systems
PDF
OpenCmsDays 2013 - Using OpenCms 9 folders as a network drive
OpenCms Days 2014 - OpenCms Module Development and Deployment with IntelliJ, ...
Managing And Customizing Opencms 6 Websites Javajsp Xml Content Management Ma...
OpenCms Days 2015 OpenCms X marks the spot
OpenCms Days 2015: Keynote - OpenCms 10 X marks the spot
OpenCms Days 2012 - How to manage an OpenCms project using Agile and continuo...
Opencms 7 Development Extending And Customizing Opencms Through Its Java Api ...
OpenCms Days 2015 Workflow using Docker and Jenkins
OpenCms Days 2013 - Start rolling with OpenCms 9
Content Management System |CMS | Content Management System Basics |CMS for We...
OpenCms Days 2014 Keynote - Step up to OpenCms 9.5
1.0 hippo cmis plugin get together august 2010
OpenCms Days 2015 How do you develop for OpenCms?
Open Source Content Management Systems
Java CMS 2015
Open CMS
5 Most Popular Open Source Content Management Systems
OpenCmsDays 2013 - Using OpenCms 9 folders as a network drive

Recently uploaded (20)

PDF
cuic standard and advanced reporting.pdf
PDF
Approach and Philosophy of On baking technology
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Cloud computing and distributed systems.
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
cuic standard and advanced reporting.pdf
Approach and Philosophy of On baking technology
Unlocking AI with Model Context Protocol (MCP)
Cloud computing and distributed systems.
Network Security Unit 5.pdf for BCA BBA.
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Chapter 3 Spatial Domain Image Processing.pdf
Assigned Numbers - 2025 - Bluetooth® Document
MYSQL Presentation for SQL database connectivity
Programs and apps: productivity, graphics, security and other tools
Review of recent advances in non-invasive hemoglobin estimation
MIND Revenue Release Quarter 2 2025 Press Release
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Encapsulation_ Review paper, used for researhc scholars
20250228 LYD VKU AI Blended-Learning.pptx
Spectral efficient network and resource selection model in 5G networks
The Rise and Fall of 3GPP – Time for a Sabbatical?
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Building Integrated photovoltaic BIPV_UPV.pdf

OpenCms Module Development & Deployment with IntelliJ, Maven and Jenkins

  • 1. mediaworx berlin AG mediaworx berlin 1 OpenCms Module Development & Deployment OPENCMS DAYS 2014 OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment | Kai Widmann & Andreas Karajannis with IntelliJ, Maven and Jenkins
  • 2. mediaworx berlin AG mediaworx berlin ......................................................................................... About mediaworx ......................................................................................... The OpenCms Plugin for IntelliJ ......................................................................................... The OpenCms Plugin for Maven ......................................................................................... Continuous Integration with Jenkins ......................................................................................... Free Tools + Plugins ......................................................................................... 2 Agenda OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis
  • 3. mediaworx berlin AG mediaworx berlin Digital Strategy User Experience Performance Marketing 70 Owner- managed 1996 High-End Technology 3 mediaworx berlin AG OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis
  • 4. mediaworx berlin AG mediaworx berlin •CMS projects since 1998 •openworx, in-house developed CMS, PHP •worked with many CMS systems, among others •Fatwire Content Server (now Oracle WebCenter Sites) •TYPO3 •CoreMedia •imperia •OpenCms is our main CMS since 2012 •Multiple OpenCms projects for three major clients •OpenCms is used for mediaworx.com and themed micro sites 4 CMS projects at mediaworx OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis
  • 5. mediaworx berlin AG mediaworx berlin 5 OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis The OpenCms Plugin for IntelliJ
  • 6. mediaworx berlin AG mediaworx berlin OpenCms is the CMS of choice for mediaworx •Open Source •free (as long as OCEE isn’t used) •developed by a company (as opposed to the community or a single person) •Alkacon has been very supportive throughout our projects •active and supportive community •constant enhancements through regular updates •based on standards •very flexible content type definition with XSD •highly extensible through custom modules •content accessible through JSP tags and Java API •WYSIWYG page editor with drag and drop and inline editing 6 Why we love OpenCms OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis
  • 7. mediaworx berlin AG mediaworx berlin IntelliJ is the CMS team‘s IDE of choice •great code suggestion and generation features •loads of refactoring options •code analysis while typing with the possibility to fix bugs or “bad code” with a single click •great code navigation •very fast full text search even in huge projects •great Maven integration •VCS integration •easy plugin development •free Community Edition (Open Source) 7 Why we love IntelliJ OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis
  • 8. mediaworx berlin AG mediaworx berlin 8 Our mission: to bring together IntelliJ and OpenCms OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis +
  • 9. mediaworx berlin AG mediaworx berlin •development started in 2012 •based on a plugin for Fatwire ContentServer, also developed by mediaworx •added to the official JetBrains plugin repository in 2014 •Open Source •used by all our OpenCms developers for all our OpenCms projects •constant developer feedback resulting in new and improved features 9 We proudly present: The OpenCms plugin for IntelliJ OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis
  • 10. mediaworx berlin AG mediaworx berlin 10 We proudly present: The OpenCms plugin for IntelliJ OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis Integration in IntelliJ •configuration dialogs in project settings and module settings •additional OpenCms menus •all menu actions accessible by keyboard shortcuts •OpenCms tool window displaying the plugin’s console
  • 11. mediaworx berlin AG mediaworx berlin 11 We proudly present: The OpenCms plugin for IntelliJ OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis Core Features •sync of resources between IntelliJ and the OpenCms VFS •automatic sync of deleted, moved or renamed resources •export point handling during sync actions •publishing and auto publish (configurable) •meta data pull •manifest generation •module packaging
  • 12. mediaworx berlin AG mediaworx berlin 12 Configuring the plugin – Project Settings OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis The OpenCms plugin for IntelliJ can be configured for each IntelliJ project, so you can have different settings for different projects. The plugin’s project settings dialog
  • 13. mediaworx berlin AG mediaworx berlin 13 Configuring the plugin – Module Settings OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis In IntelliJ’s module settings you can configure your OpenCms modules. It’s possible to override project default behavior for specific modules. The plugin’s module settings dialog
  • 14. mediaworx berlin AG mediaworx berlin OpenCms menus are added at the following locations: •in the main menu •in the project popup menu •in the editor popup menu •in the editor tab popup menu 14 Accessing plugin actions – The OpenCms menus OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis The OpenCms menu in the main menu offers all of the plugin’s actions for syncing, publishing, meta data pulling, manifest generation and module zip packaging
  • 15. mediaworx berlin AG mediaworx berlin OpenCms menus are added at the following locations: •in the main menu •in the project popup menu •in the editor popup menu •in the editor tab popup menu 15 Accessing plugin actions – The OpenCms menus OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis The OpenCms menu in the project popup menu offers actions to •sync or publish the selected files, folders or modules •pull meta data, generate manifests or package module zips for selected modules
  • 16. mediaworx berlin AG mediaworx berlin OpenCms menus are added at the following locations: •in the main menu •in the project popup menu •in the editor popup menu •in the editor tab popup menu 16 Accessing plugin actions – The OpenCms menus OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis The OpenCms menu in the editor popup menu offers actions to sync or publish the file that’s currently open in the editor area
  • 17. mediaworx berlin AG mediaworx berlin OpenCms menus are added at the following locations: •in the main menu •in the project popup menu •in the editor popup menu •in the editor tab popup menu 17 Accessing plugin actions – The OpenCms menus OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis The OpenCms menu in the editor tab popup menu offers actions to •sync or publish the clicked file •sync or publish all open tabs
  • 18. mediaworx berlin AG mediaworx berlin 18 Goodbye copy & paste – Now let’s sync! OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis When a resource is synced •the file is transferred either from the local file system to OpenCms or vice versa •export points are handled if applicable •resource meta data is pulled from OpenCms and stored locally •a direct publish session is started (if auto publish is enabled) The OpenCms plugin for IntelliJ enables developers to work solely in their IDE by syncing changes to and from OpenCms. No need to copy & paste!
  • 19. mediaworx berlin AG mediaworx berlin 19 For you to choose – The sync modes OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis Push: Local file system is master. All changes to resources made in OpenCms will be overwritten by local files (except properties). VFS resources not existing locally will be deleted. Sync: Files are synced to and from the OpenCms VFS based on their modification date, the most recent file is synced. That way changes can be made locally and in OpenCms. Pull: All changes made to local files are overwritten by the corresponding resources in the OpenCms VFS. Files that don't exist in the VFS will be deleted from the local file system. The OpenCms plugin for IntelliJ offers three different sync modes that can be configured globally or on a per module basis.
  • 20. mediaworx berlin AG mediaworx berlin Through OpenCms menu actions you can publish files, folders or modules. 20 Now you can publish right from your IDE OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis If you want you can turn on auto publish, so that every time you sync some files, a direct publish session containing the updated resources is started. … or let your IDE publish for you
  • 21. mediaworx berlin AG mediaworx berlin 21 There’s more than files in the VFS – Pulling meta data OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis The OpenCms VFS keeps meta data on resources that can't be stored with the files in the local file system (e.g. resource IDs, properties). During sync actions that meta data is pulled and stored as XML files in a separate folder structure. Resource IDs Properties Access control XML In addition to resource meta data, module meta data is pulled and stored for each module as manifest_stub.xml.
  • 22. mediaworx berlin AG mediaworx berlin 22 But what to do with all that data? OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis File XML Folder XML File XML Manifest stub XML Module manifest.xml File XML ... •Version control •Manifest generation manifest.xml files can be used to package OpenCms module zips from within the plugin itself or by using the OpenCms plugin for Maven.
  • 23. mediaworx berlin AG mediaworx berlin 23 Packaging module zips for an easy deployment OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis The OpenCms plugin for IntelliJ lets you package your finished modules into module zips that can then be imported into any OpenCms instance. That way you you can easily deploy your work to multiple test and production machines. Production Staging
  • 24. mediaworx berlin AG mediaworx berlin •helps avoiding switches between IDE and OpenCms workplace •enables version control for OpenCms resources and meta data •provides meta data for automatic builds of OpenCms modules •improves our efficiency •helps us to concentrate on development •makes developing OpenCms modules more fun •will be actively developed and enhanced 24 The OpenCms plugin for IntelliJ OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis
  • 25. mediaworx berlin AG mediaworx berlin 25 OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis The OpenCms Plugin for Maven
  • 26. mediaworx berlin AG mediaworx berlin Maven Objectives •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 Maven is a tool for building and managing Java Projects. OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis
  • 27. mediaworx berlin AG mediaworx berlin • Automatic dependency management • Standardized structure / build process • Declarative model • Unittest integration • Release management 27 We use Maven because: OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis
  • 28. mediaworx berlin AG mediaworx berlin When we began developing for OpenCms, we wanted to use Maven to build and package our modules. •Provides the Maven advantages such as dependency management for OpenCms module development. •Comes with a custom packaging type "opencms-module“. •Makes Java dependencies available as standard Maven dependencies. •Can use static manifests or manifest meta data snippets. •Manifests can use placeholders such as version directly from your POM. •The plugin can be used standalone or together with the IntelliJ Plugin. 28 The OpenCms Plugin for Maven OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis
  • 29. mediaworx berlin AG mediaworx berlin 29 Using the plugin OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis Your source code is organized according to the standard Maven directory layout.
  • 30. mediaworx berlin AG mediaworx berlin <project> <groupId>com.mediaworx.opencms</groupId> <artifactId>mymodule</artifactId> <version>1.0-SNAPSHOT</version> <packaging>opencms-module</packaging> <name>mediaworx OpenCms ${project.artifactId}</name> <description>mediaworx ${project.artifactId} sample module</description> <build> <plugins> <plugin> <groupId>com.mediaworx.mojo</groupId> <artifactId>opencms-maven-plugin</artifactId> <version>1.2</version> <extensions>true</extensions> </plugin> </plugins> </build> <dependencies> <dependency> <groupId>org.opencms</groupId> <artifactId>opencms-core</artifactId> <version>9.0.1</version> </dependency> <dependencies> </project> 30 Using the plugin – POM configuration OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis Create a POM for your project, defining the default Maven coordinates such as version, group ID, artifact ID and select the packaging type „opencms- module“. Finally add opencms-core as dependency to have Maven collect all the needed jar files.
  • 31. mediaworx berlin AG mediaworx berlin 31 OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis Continuous Integration with Jenkins
  • 32. mediaworx berlin AG mediaworx berlin • Early detection of build failures • Running codechecks • Unittests • Build and deplyoment to development / integration or production servers • Release Mangement 32 Continous Integration and Deployment OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis
  • 33. mediaworx berlin AG mediaworx berlin Why Jenkins? •Easy to install •Webbased Configuration •Many plugins available •Tight Maven integration •Can use directory services for authentication •Distributed builds 33 Jenkins CI Server OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis
  • 34. mediaworx berlin AG mediaworx berlin •We are using our Jenkins CI Server to build our OpenCms modules. •Deployment of modules to OpenCms servers is also handled by Jenkins •Deployment Steps •Build the modules from version control •Transfer module zips to target system •Remotely on the target system: •Stop Tomcat •Execute cmsshell commands to install the modules •Start Tomcat 34 Using Jenkins with OpenCms OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis
  • 35. mediaworx berlin AG mediaworx berlin Jenkins Meta Data Resources 35 OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis Local Dev Working together … VCS Resources Meta Data Staging Production IntelliJ
  • 36. mediaworx berlin AG mediaworx berlin OpenCms Plugin for IntelliJ •Documentation (Project Wiki on GitHub) •JetBrains plugin repository •Source code on GitHub OpenCms Plugin for Maven •Maven Plugin Documentation •Maven Repository OpenCms and mediaworx 36 If you want to find out more … OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis If you’re interested in our Tools, you can find extensive documentation and some more information on the web.
  • 37. mediaworx berlin AG mediaworx berlin 37 Very special thanks to the participants of our survey! OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis •Eugen Melnichuk •Kai Schliemann •Thomas (Componio) •Paul-Inge Flakstad •Fabian Huschka •Stephan Hartmann In preparation for this presentation we did a survey on the OpenCms mailing list to find out how other people are syncing and deploying OpenCms modules. We‘d like to thank all the people who were willing to share their answers:
  • 38. mediaworx berlin AG mediaworx berlin Jenkins Meta Data Resources 38 OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis Local Dev Questions? VCS Resources Meta Data Staging Production IntelliJ
  • 39. mediaworx berlin AG mediaworx berlin 39 ANY QUESTIONS? OpenCms Days 2014 | Nov 4 2014 | OpenCms Module Development and Deployment with IntelliJ, Maven and Jenkins | Kai Widmann & Andreas Karajannis opencms.mediaworx.com OPENCMS TOOLS & PLUGINS: Kai Widmann widmann@mediaworx.com Andreas Karajannis karajannis@mediaworx.com