Tải bản đầy đủ (.pdf) (392 trang)

Tài liệu GateIn Cookbook docx

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (6.13 MB, 392 trang )

GateIn Cookbook
Over 60 recipes for building portals with GateIn including
user security, gadgets, and applications with frameworks
Ken Finnigan
Luca Stancapiano
Piergiorgio Lucidi

BIRMINGHAM - MUMBAI
GateIn Cookbook
Copyright © 2012 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or
transmitted in any form or by any means, without the prior written permission of the publisher,
except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the
information presented. However, the information contained in this book is sold without
warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers
and distributors will be held liable for any damages caused or alleged to be caused directly or
indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies
and products mentioned in this book by the appropriate use of capitals. However, Packt
Publishing cannot guarantee the accuracy of this information.
First published: November 2012
Production Reference: 1311012
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-84951-862-8
www.packtpub.com
Cover Image by Asher Wishkerman ()


Credits
Authors
Ken Finnigan
Luca Stancapiano
Piergiorgio Lucidi
Reviewers
Antoine Herzog
Gurkan Erdogdu
Rafael Liu
Acquisition Editor
Joanna Finchen
Lead Technical Editor
Azharuddin Sheikh
Technical Editor
Kirti Pujari
Project Coordinator
Joel Goveya
Proofreader
Martin Diver
Indexer
Monica Ajmera
Production Coordinator
Arvindkumar Gupta
Cover Work
Arvindkumar Gupta
About the Authors
Ken Finnigan is a Senior Software Engineer at Red Hat and Technical Lead of the JBoss
Portlet Bridge project and a member of the GateIn Development team. As a Consultant and
Engineer he has over 15 years of development experience with enterprises throughout the
world using technologies that include Java EE frameworks (JSF, CDI, EJB3, Hibernate, Seam),

Java testing frameworks (Arquillian, JUnit, TestNG), Maven, Ant, Arquillian, and a variety of
others. In his spare time he is a Committer for Apache DeltaSpike, JBoss Seam 3, ShrinkWrap,
and Arquillian.
I would like to thank my wife, Erin, and my family for all their support and
understanding through the entire book development process.
Luca Stancapiano is a Consultant Expert in Java EE technologies since 2000. He started
contributing to the JBoss Community at an early stage in his career. He contributed initially to
Hibernate, JBoss AS, JBoss Portal, and JBoss Cache, and more recently to projects such as
Seam, GateIn, ExoJCR, ModeShape, and Innispan.
In 2005 he became a JBoss Advanced Consultant, and in 2006 he became the Project Leader
of JBoss Forums.
In the Apache Community, he has contributed to Lucene and ManifoldCF, improving his
knowledge on the search engines as a result.
He has also contributed for the OSGi Alliance, making products compliant with OSGi. He
collaborates with Sourcesense as an open source ECM consultant and trainer.
I would like to thank the GateIn community team for their participation
and Packt's team for the opportunity to write this book, and Monica for
moral support.
Piergiorgio Lucidi is an open source ECM Specialist at Sourcesense. Sourcesense is a
European open source systems integrator providing consultancy, support, and services around
key open source technologies.
He works as Software Engineer, and he has 8 years of experience in the areas of Enterprise
Content Management (ECM), system integrations, web, and mobile applications. He is an
expert in integrating ECM solutions in web and portal applications.
He contributes as PMC member, Project Leader, and Committer at the Apache Software
Foundation for the project Apache ManifoldCF; he also contributes on ECM connectors such
as CMIS, Alfresco, and ElasticSearch. He is a Project Leader and Committer of the JBoss
Community, and he contributes to some of the projects of the JBoss Portal platform.
He is a Speaker at conferences dedicated to ECM, Java, Spring Framework, and open source
products and technologies.

He is an Author, Technical Reviewer, and Afliate Partner at Packt Publishing, for whom he
wrote the technical book Alfresco 3 Web Services. As Technical Reviewer, he contributed to
both Alfresco 3 Cookbook and Alfresco Share. As Afliate Partner, he writes and publishes
book reviews on his website Open4Dev ( />I would like to thank Packt Publishing for giving me this second opportunity
to write a book about a very interesting open source project. I would also like
to thank my company Sourcesense for giving me some time to spend on this
project. Finally, I would like to thank my girlfriend Barbara, who encouraged
me during the making of this book.
About the Reviewers
Antoine Herzog started with computers in 1981, with the ZX81, writing machine code for
the CPU, and has never stopped programming since then. He started programming in Java in
2003 and he started building portals with JBoss Portal in 2005 (version 2.2), and followed on
with GateIn. He contributes to the project, with debugging, jira, wiki, and forum posts. He is very
pleased to contribute and help the community to develop and use this nice technology and its
associated tools.
Since 2006, he works at Sysemo Sarl (www.sysemo.com), his own company, as an Expert in
J2EE, JBoss AS, GateIn, JSF, RichFaces, EJB, and Hibernate.
He has helped many companies to build their portals, both at management level and the
programming level.
He also founded www.presta-expert.com. He programs and runs this portal website, on a
JBoss AS7 platform, with GateIn 3.4.0.
Antoine graduated from France's Ecole Nationale Superieure de Techniques Avancées in
1991 (ENSTA, Concours des Mines), where he enjoyed pursuing knowledge of sciences and
engineering alongside his self-taught skills.
Gurkan Erdogdu is CTO and Co-Founder of MechSoft. He has been involved with Java and
Java EE technologies since 1999. Gurkan is also very active in the open source world and
is a member of several open source foundations. Gurkan is a member of Apache Software
Foundation and is a founder of the project Apache OpenWebBeans. Gurkan also gives training
and special consultancies on Java and Java EE technologies. Gurkan holds a BS in Computer
Engineering from Middle East Technical University (METU). Gurkan lives in Ankara with his wife

and little daughter. He can be reached at
I owe thanks to my parents who provided encouragement, friendship,
wisdom, and patience in my life. Without them, it would not have been
possible to become the person I am now.
Rafael Liu has been working with Java for 7 years as a Developer, Architect, and
Consultant. Focusing mainly on JEE and middleware solutions from mainstream vendors,
he has worked in many mission-critical systems for the Government of Brazil, dening
infrastructure architecture and doing pre-production support such as load tests, performance
analysis, bottleneck diagnosis, and tuning of both applications and JVMs. He is currently
Technical Account Manager at Red Hat, where he deals with Application Servers, SOA-related
middleware solutions, portal, development frameworks, and basically most of the JBoss stack.
Rafael is an open source enthusiast and a GNU/Linux fan. Speaking and writing about Java is
one of his passions.
www.PacktPub.com
Support les, eBooks, discount offers and more
You might want to visit www.PacktPub.com for support les and downloads related to
your book.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub
les available? You can upgrade to the eBook version at
www.PacktPub.com and as a print
book customer, you are entitled to a discount on the eBook copy. Get in touch with us at
for more details.
At
www.PacktPub.com, you can also read a collection of free technical articles, sign up
for a range of free newsletters and receive exclusive discounts and offers on Packt books
and eBooks.

Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book
library. Here, you can access, read and search across Packt's entire library of books.
Why Subscribe?

f Fully searchable across every book published by Packt
f Copy and paste, print and bookmark content
f On demand and accessible via web browser
Free Access for Packt account holders
If you have an account with Packt at www.PacktPub.com, you can use this to access
PacktLib today and view nine entirely free books. Simply use your login credentials for
immediate access.
Table of Contents
Preface 1
Chapter 1: Getting Started 7
Introduction 7
Installing GateIn from a binary package 8
Building and installing GateIn from the source code 10
Conguring the content storage 13
Conguring GateIn to send e-mails 18
Running GateIn on your machine 20
Setting up the development environment 22
Chapter 2: Managing Portal Contents Using the GUI 29
Introduction 29
Managing portals 30
Managing portal pages 37
Managing registered portlets 42
Managing the navigation tree 50
Managing the dashboard 53
Chapter 3: Managing Portal Contents Using XML 59
Introduction 59
Managing portals using XML 60
Managing portal pages using XML 66
Managing registered portlets using XML 68
Managing the navigation tree using XML 73

Wrapping it all up in a separate EAR 75
Chapter 4: Managing Portal Users 89
Introduction 89
Managing users 90
Managing groups 93
ii
Table of Contents
Assigning users to groups 97
Integrating with an existing LDAP store 100
Setting an automatic membership after user creation 115
Adding a custom eld in the user prole 117
Integrating with Web SSO 118
Integrating with SPNEGO for Desktop SSO 122
Chapter 5: Securing Portal Contents 129
Introduction 129
Securing portals 130
Securing with JBoss AS 133
Securing with Tomcat 134
Choosing the JAAS modules 136
Creating a login page 138
Synchronizing users 140
Securing pages 142
Securing categories 145
Securing applications 150
Securing portlets 153
Chapter 6: Developing Portlets 157
Introduction 157
Creating a portlet with the Portlet 2.0 Specication 158
Using an action to pass form parameters 162
Using the user locale to localize portlet content 166

Communicating between portlets using Public Render Parameters 172
Communicating between portlets using events 181
Chapter 7: Developing Using Components API 193
Introduction 193
Getting started with WebUI 194
Creating views 200
Handling different skins in a portlet 207
Adding the JavaScript resources to the portlet 218
Handling different locales in a portlet 220
Chapter 8: Migrating from Existing Portals 227
Introduction 227
Migrating a transactional portlet 228
Migrating an authenticated portlet 231
Migrating a portlet that uses JCR 237
Importing a skin from an existing website 244
iii
Table of Contents
Chapter 9: Managing Gadgets 253
Introduction 253
Importing existing gadgets 254
Removing gadgets 260
Creating gadgets 264
Changing the category of a gadget 270
Resizing gadgets 275
Making the gadget a portlet 277
Setting user preferences 280
Chapter 10: Frameworks in a Portal 285
Introduction 285
Creating a JSF 2 portlet 285
Using jQuery in a portlet 298

Using portlet events in JSF 2 305
Creating a RichFaces 4 portlet 312
Chapter 11: Managing Portal Resources with the
Management Component 319
Introduction 319
Deploying the CLI to GateIn 320
Retrieving a managed resource with RESTful Interface 322
Exporting a portal page with the CLI 324
Removing a portal page from the navigation 326
Using the default portal as the foundation for a new portal site 329
Chapter 12: Managing Documents Using External ECM Systems 333
Introduction 333
Creating a portlet to integrate a CMIS repository 334
Creating a portlet to integrate JBoss ModeShape 348
Creating a portlet to integrate Apache JackRabbit 356
Creating a portlet to integrate Alfresco using Spring WebScripts 360
Index 367

Preface
Enterprises have websites constructed in different web frameworks and the need for them
to work together cohesively. GateIn will provide the solution to effectively integrate them into
a single website. GateIn is an open source website framework that does more than a web
framework by letting you use your preferred one.
This GateIn Cookbook provides solutions whether you're planning to develop a new GateIn
portal, migrate a portal, or only need to answer a specic query. It is lled with bite-sized
recipes for quick and easy problem resolution. From the beginning to the end it will guide you
through the process of conguring and securing a portal, managing content and resources,
and developing applications as you go.
Beginning with installation and conguration, the book swiftly moves on to discussing content,
users, and security. The second half covers all aspects of developing on a portal, such as

portlets, gadgets, migration, and integration.
The goal of the book is to show GateIn as an open source website framework piece by piece.
Starting with simple recipes, you will see each step analyzed with code examples and images,
before progressing to more advanced recipes.
This GateIn Cookbook will help you with a quick approach to building portals.
What this book covers
Chapter 1, Getting Started, introduces the installation process of GateIn, using either a source
code or the binary package. You will also learn how to congure storage and the email sender.
Followed by how to set up the development environment for your customization.
Chapter 2, Managing Portal Contents Using the GUI, explains how to manage portal contents
using the provided GUI. You will learn how to manipulate the core contents of the portal,
starting with portal instances and continuing on to pages and portlets. You will then see how
to congure the navigation tree of the portal and how to use dashboards.
Preface
2
Chapter 3, Managing Portal Contents Using XML, explores the same portal contents discussed
in the previous chapter but shows how to manage everything through XML conguration. It will
then guide you through implementing a separate portal instance with its own EAR.
Chapter 4, Managing Portal Users, introduces how to manage users and and how to
setup an external LDAP store for managing authorities. It will show you how to extend and
customize the default provider of the user prole and how to congure a Single Sign On (SSO)
mechanism with some SSO providers.
Chapter 5, Securing Portal Contents, discusses how to congure portal security with Tomcat
and JBoss, and explores all the JAAS modules available in GateIn. You will also learn how to
set different roles and permissions for any portal contents.
Chapter 6, Developing Portlets, contains all the information you need to start implementing
standard portlets. It will also cover the usage of the user locale, public render parameters
and events.
Chapter 7, Developing Using Components API, introduces WebUI for creating new views
and handling different skins in a portlet. You will also learn how to manage JavaScript

and user locales.
Chapter 8, Migrating from Existing Portals, explains some methods for migrating existing
portlets. You will see how to migrate transactional, authenticated, and JCR-based portlets.
You will then learn how to import a skin from an existing website.
Chapter 9, Managing Gadgets, demonstrates how to import, remove, and create gadgets, and
how to categorize them in the portal. You will see how to expose a gadget as a portlet and how
to set user preferences.
Chapter 10, Frameworks in a Portal, includes an overview of the framework that you can
use to implement portlets. You will learn how to implement a portlet using JSF 2, jQuery,
and RichFaces 4.
Chapter 11, Managing Portal Resources with the Management Component, covers how to
manage portal contents using the REST API and Command Line Interfaces (CLI).
Chapter 12, Managing Documents Using External ECM Systems, explores how to implement
portlets for integrating some ECM systems such as any CMIS-compliant repository, JBoss
ModeShape, Apache JackRabbit, and Alfresco. You will also see how to implement portlets
using Spring WebScripts in Alfresco.
What you need for this book
In Chapter 1, Getting Started, you will see all the required components for building and
executing GateIn. In summary, you should have:
f Any operating system based on Linux, Mac OS X, or Windows
Preface
3
f Java Development Kit (JDK) 1.6
f Eclipse IDE
f Apache Subversion (latest version)
f Apache Maven (latest version)
f GateIn Portal 3.2.0 and beyond
Who this book is for
This book is for anyone who needs to administer or develop applications on GateIn. Java and
RESTful architecture skills are suggested but not needed.

Conventions
In this book, you will nd a number of styles of text that distinguish between different kinds of
information. Here are some examples of these styles, and an explanation of their meaning.
Code words in text are shown as follows: "We can include other contexts through the use of
the include directive."
A block of code is set as follows:
<object type=
"org.exoplatform.services.organization.impl.NewUserConfig$JoinGroup">
<field name="groupId">
<string>/platform/users</string></field>
<field name="membership">
<string>member</string></field>
</object>
When we wish to draw your attention to a particular part of a code block, the relevant lines or
items are set in bold:
<object type=
"org.exoplatform.services.organization.impl.NewUserConfig$JoinGroup">
<field name="groupId">
<string>/platform/users</string></field>
<field name="membership">
<string>member</string></field>
</object>
Any command-line input or output is written as follows:
>mvn clean package
Preface
4
New terms and important words are shown in bold. Words that you see on the screen, in
menus or dialog boxes for example, appear in the text like this: "clicking the Next button
moves you to the next screen".
Warnings or important notes appear in a box like this.

Tips and tricks appear like this.
Reader feedback
Feedback from our readers is always welcome. Let us know what you think about this
book—what you liked or may have disliked. Reader feedback is important for us to develop
titles that you really get the most out of.
To send us general feedback, simply send an e-mail to
, and
mention the book title through the subject of your message.
If there is a topic that you have expertise in and you are interested in either writing or
contributing to a book, see our author guide on
www.packtpub.com/authors.
Customer support
Now that you are the proud owner of a Packt book, we have a number of things to help you to
get the most from your purchase.
Downloading the example code
You can download the example code les for all Packt books you have purchased from your
account at . If you purchased this book elsewhere, you can
visit and register to have the les e-mailed directly
to you.
Preface
5
Errata
Although we have taken every care to ensure the accuracy of our content, mistakes do
happen. If you nd a mistake in one of our books—maybe a mistake in the text or the code—
we would be grateful if you would report this to us. By doing so, you can save other readers
from frustration and help us improve subsequent versions of this book. If you nd any errata,
please report them by visiting selecting your book,
clicking on the errata submission form link, and entering the details of your errata. Once your
errata are veried, your submission will be accepted and the errata will be uploaded to our
website, or added to any list of existing errata, under the Errata section of that title.

Piracy
Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt,
we take the protection of our copyright and licenses very seriously. If you come across any
illegal copies of our works, in any form, on the Internet, please provide us with the location
address or website name immediately so that we can pursue a remedy.
Please contact us at
with a link to the suspected pirated material.
We appreciate your help in protecting our authors, and our ability to bring you valuable content.
Questions
You can contact us at if you are having a problem with any
aspect of the book, and we will do our best to address it.

1
Getting Started
In this chapter we will cover:
f Installing GateIn from binary package
f Building and installing GateIn from the source code
f Conguring the content storage
f Conguring GateIn to send e-mails
f Running GateIn on your machine
f Setting up the development environment
Introduction
This rst chapter will discuss how to install a GateIn instance on your local environment. We
will see that there are two main ways to achieve this task.
We will then look at how to congure a different content store for data so that you can use
your preferred DBMS and your le system. Then we will see how to set up the GateIn mail
sender to allow you to use the SMTP server available in your network.
At the end of the chapter, you will understand what the architecture of GateIn is and how to
congure and run a portal instance on your machine.
GateIn is a portal framework dedicated to implementing highly customizable portal

solutions with a powerful set of components based on well-known and adopted open source
technologies and standards based on the Java web technologies.
Getting Started
8
Installing GateIn from a binary package
GateIn is released through different bundles that differ for the included application server.
These bundles are dedicated to the following application servers—JBoss AS 5.x, JBoss AS 6.x,
JBoss AS 7.x, Tomcat 6.x, Tomcat 7.x, and Jetty 6.x.
In this recipe, we will see which are the required packages you need to download before
starting a GateIn instance.
Getting ready
A pre-requisite for running GateIn is the availability of the Java Development Kit (JDK), which
must be updated to the latest revision of version 1.6. Depending on your operating system,
please be sure to correctly add the JDK binaries' path to the classpath of your machine. In
order to verify the Java version actually installed on your machine, you can run the following
command line:
java –version
It will return an output similar to the following:
java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-10M3527)
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode)
If you don't nd in the output the string Server VM, but you nd the string Client VM in the
place of Server VM, this means that the JDK is not installed on your machine. In this case,
you can download the JDK 1.6 for your operating system at />technetwork/java/javase/downloads/jdk-6u31-download-1501634.html
.
How to do it
1. As introduced before, GateIn can be installed using different packages, so now you
can download your preferred bundle depending on which application server you need
to use for your installation.
2. Typically, the right application server can be chosen by thinking about what you need

for your software architecture. Let's assume that you need to deploy GateIn together
with other standard Java EE applications that need explicit support for middleware
components such as DataSource, Enterprise Java Bean (EJB), Java Message Service
(JMS), or an Enterprise Service Bus (ESB). You would then probably want to use the
JBoss AS bundle. JBoss AS is completely focused on middleware support having the
availability of a total J2EE-compliant application server. Otherwise, if you only need to
use a standard servlet container, you can choose to download the Tomcat bundle.
Chapter 1
9
3. Once you have chosen the right bundle for yourself, you are ready to download it from
/>4. After downloading the GateIn package, you can extract it in your preferred directory in
your le system.
How it works
You have just installed GateIn from binary package.
There's more
The difference between the various bundles is related to application server-specic
conguration les and directories, with some added artifacts. For example, the JBoss 6.x
directory structure consists of the following folders:
f bin
f client
f common
f docs
f lib
f server
The Tomcat 6.x bundle is based on a different structure:
f bin
f conf
f gatein
f lib
f logs

f temp
f webapps
f work
The Tomcat bundle also has a further execution script compared to the JBoss bundle, but
we will see how to run a GateIn instance for all the different application servers later in the
chapter, in another recipe.
Getting Started
10
See also
f The Building and installing GateIn from the source code recipe
f The Running GateIn on your machine recipe
Building and installing GateIn from the
source code
Another way to install GateIn is by getting the source code from the JBoss SVN repository and
then compiling it to generate the build artifacts as you found in the binary package.
The goal of building GateIn from the source code is to have the possibility to freely customize
it. Another useful reason for building from source is that you simply want to contribute to the
project and test your xes before applying the patch on the issue tracker.
Notice that this book is based on GateIn 3.2.0, which has its source code
based on the SVN repository. From GateIn 3.3.x the source code is based on
a GitHub repository. For more information about how to build from GitHub,
please see />Getting ready
Let's rst see if you have installed in your machine the following needed components:
f Java Development Kit (JDK) 1.6
f Subversion client (SVN)
f Apache Maven 3.x
Let's check your environment for the see following required tools:
1. You can test and install JDK 1.6 following the Getting ready section of the Installing
GateIn from a binary package recipe.
2. To test if the SVN client is installed in your machine run the following command line:

svn version
If the SVN client is correctly installed you should see output similar to the following:
svn, version 1.6.17 (r1128011)
compiled Aug 25 2011, 17:31:03
Copyright (C) 2000-2009 CollabNet.
Subversion is open source software, see che.
org/
Chapter 1
11
If the svn command is not found in the scope of your operating system, then you can
install it by following the instructions available on the ofcial website, depending on
your operating system, at />3. Once the SVN client is installed, the next step is to test if Apache Maven is installed
on your machine, by running the following command line:
mvn version
After running the command, you should see an output similar to the following:
Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
Maven home: /Users/piergiorgiolucidi/tools/apache-maven-3.0.4
Java version: 1.6.0_29, vendor: Apple Inc.
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/
Contents/Home
Default locale: it_IT, platform encoding: MacRoman
OS name: "mac os x", version: "10.6.8", arch: "x86_64", family:
"mac"
If the mvn command is not found in your machine then it could mean either of the
following two things:
 You have to configure the PATH environment variable
 You have to install Apache Maven from scratch
We are going to assume that maven is not installed. In this way, we will describe both
the cases:
 Download the Apache Maven binary at />download.html

.
 Extract the binary package and follow the specific instructions that are
described in the web page according to your operating system.
Notice that you have to set two environment variables to allow Maven to work
correctly, so please be sure to set the
PATH and M2 variables before continuing.
For instance, for a Linux-based operating system, you should have a snippet in your
prole conguration le similar to the following:
export M2_HOME="/Users/piergiorgiolucidi/tools/apache-maven-3.0.4"
export M2=$M2_HOME/bin
export MAVEN_OPTS="-Xms512m -Xmx1024m -Xss1024k
-XX:MaxPermSize=256m -XX:NewSize=256m"
export PATH=$M2:$PATH
4. Finally, check if you have installed the latest stable release of Apache Maven before
continuing the recipe.
Getting Started
12
How to do it
Now we are ready to check out the source code. For this book, we will consider the current
latest stable version of GateIn Portal, which is version 3.2.0.
1. Check out the code on your machine by executing the following command line:
svn checkout />tags/3.2.0-GA/ gatein-portal-3.2.0
2. Once you have nished the download, you will nd a new subfolder gatein-
portal-3.2.0
in the folder where you have executed the command that contains
all the source code of the project.
3. Now we are ready to build the project using Apache Maven. For this step, we have
some parameters to set:
 Which type of bundle you have
 Whether the build process must download the application server distribution

 The path of the root folder of your application server distributions (if you have
an existing distribution package)
 The name of the folder related to the application server distribution to use
for building
4. Let's assume that you want to build GateIn with the Tomcat 6 bundle and, considering
that the Tomcat distribution is stored in the /Applications/Apache Tomcat/
apache-tomcat-6.0.32
folder, you have to execute the following command line
from the root folder of the project that contains the main pom.xml le:
mvn clean install -DskipTests -Ppkg-tomcat -Dexo.projects.
directory.dependencies=/Applications/Apache Tomcat -Dexo.projects.
app.tomcat.version=apache-tomcat-6.0.32
Upon completion, you should see the following output:
[INFO]
[INFO] BUILD SUCCESS
[INFO]
The binary artifacts will be available on your machine inside the /gatein-
portal-3.2.0/packaging/tomcat/pkg/tc6/target/tomcat6
folder.
How it works
As you have seen, the GateIn packaging process relies upon Apache Maven to execute the
build process of the project. However, Maven allows you to manage the entire lifecycle process
of the project and its own children modules by starting a command from a parent Project
Object Model (POM).

×