opencms days 2013 - gradle based opencms build automated setup

13
Tobias Herrmann, Alkacon Software Workshop Gradle and automated setup with OpenCms 02.10.13

Upload: alkacon-software-gmbh

Post on 18-Nov-2014

906 views

Category:

Technology


0 download

DESCRIPTION

The build process for OpenCms 9 is using Gradle ( www.gradle.org ) instead of Apache Ant. The great advantage of the Gradle build process is an integrated dependency management so that libraries required to build OpenCms are downloaded automatically. Moreover, OpenCms 9 provides a script based setup in addition to the traditional web interface. This allows the installation of OpenCms directly from the command line. In this 2 part workshop, Tobias will first demonstrate how the new Gradle based build process in OpenCms 9 works. He will explain how to configure popular IDEs such as Eclipse to build the OpenCms core as well as individual module extensions. Tobias will then present the automatic setup process and show how to configure various options for the OpenCms installation.

TRANSCRIPT

Page 1: OpenCms Days 2013 - Gradle based OpenCms build automated setup

Tobias Herrmann, Alkacon Software

Workshop

Gradle and automated setup with OpenCms

02.10.13

Page 2: OpenCms Days 2013 - Gradle based OpenCms build automated setup

●Why use Gradle over Ant?●The OpenCms build script●Setup your own OpenCms Gradle project

●Automated setup

●Continuous integration – automated everything

2

Agenda

Page 3: OpenCms Days 2013 - Gradle based OpenCms build automated setup

●Gradle build scripts:●Sensible conventions●Highly flexible●Easy to read●Easier to maintain●Can do more with less

●Dependency management

3

Why Gradle?

Page 4: OpenCms Days 2013 - Gradle based OpenCms build automated setup

●What is happening during the OpenCms build?●The opencms.jar●Module jar files●GWT resources●Module zip files●The WAR file●The upgrade wizard●The distribution

4

The OpenCms build

Page 5: OpenCms Days 2013 - Gradle based OpenCms build automated setup

●Important tasks:●bindist – the OpenCms distribution●updater – the upgrade wizard●war – the OpenCms WAR●jar – the opencms.jar file●dist_{module name} – a single module●test – runs the OpenCms test cases●clean – cleans the build directory

5

The OpenCms build

Page 6: OpenCms Days 2013 - Gradle based OpenCms build automated setup

●Build properties – gradle.properties●build_directory – choose your build directory●external_directories – external module directory●max_heap_size – Xmx setting for build process

6

The OpenCms build

Page 7: OpenCms Days 2013 - Gradle based OpenCms build automated setup

●Project layout:7

Build your own

Page 8: OpenCms Days 2013 - Gradle based OpenCms build automated setup

●Gradle build file8

Build your own

Page 9: OpenCms Days 2013 - Gradle based OpenCms build automated setup

●Why use an automated setup?●How is it done?●Unpack the WAR file●Run /WEB-INF/setup.sh or /WEB-INF/setup.bat●Provide the setup properties

– org/opencms/setup/setup.properties.example

9

Automated setup

Page 10: OpenCms Days 2013 - Gradle based OpenCms build automated setup

●Setup properties10

Automated setup

Page 11: OpenCms Days 2013 - Gradle based OpenCms build automated setup

●Automated builds●Automated testing●Automated code analysis●Automated deployments

●Find bugs early

11

Continuous integration

Page 12: OpenCms Days 2013 - Gradle based OpenCms build automated setup

●Any Questions?

12

Any Questions?

Fragen?Questions ?

Questiones?¿Preguntas?質問

Page 13: OpenCms Days 2013 - Gradle based OpenCms build automated setup

Tobias Herrmann

Alkacon Software GmbH

http://www.alkacon.com

http://www.opencms.org

Thank you very much for your attention!

13