SlideShare une entreprise Scribd logo
1  sur  92
Télécharger pour lire hors ligne
CQ MAVEN METHODS
CQCON 2013
HELLO WORLD
I'm Andrew.
asavory@adobe.com
@savs
Joined Adobe in November 2012
CQ Newbie
JCR/CMS/TLA old hat
Background in Open Source, Content Management, Mobile
Talking today about what I learned so far...
FORK ME!
If you found this talk useful, or spotted mistakes:
github.com/savs/CQCon_2013_CQ_Maven_Methods
IN YOUR BROWSER
http://goo.gl/qqS1F
SEE ALSO
http://www.planetcq.org/
LET'S BUILD A CQ SITE
... uh, where to begin?
METHOD 1
Enthusiastically rush in, use CRXDE Lite
METHOD 2
I'm a guru, I use Eclipse and CRXDE
METHOD 3
I'm a ninja, I use emacs and vlt
METHOD 4
I'm a guru ninja, I use vi and curl
METHOD 5
See also: http://xkcd.com/378/ – Real Programmers
BUT WHAT ABOUT ...
reverting mistakes?
reproducible builds?
collaborating with others?
deploying to production?
WHY ISN'T IT EASIER TO BUILD A CQ SITE?
Laborious project inception
No two projects alike
Don't know project layout
Don't know project dependencies
Hard for others to reproduce
Hard to test
Lengthy RTFM or worse (no FM)
Documentation over convention
CQ SUCKS
$PRODUCT SUCKS
YOUR METHODOLOGY SUCKS
(sorry)
SO HOW DO WE FIX THIS?
Maven
Git
(or Subversion, or CVS ... ymmv)
Best Practices
MAVEN
“Maven is a software project management
and comprehension tool. Based on the
concept of a project object model (POM),
Maven can manage a project's build,
reporting and documentation from a central
piece of information.”
GIT
“Git is a free and open source distributed
version control system designed to handle
everything from small to very large projects
with speed and efficiency. ”
Version control is a system that records changes to a file or set of files over
time so that you can recall specific versions later.
BEST PRACTICES
“A best practice is a method or technique that
has consistently shown results superior to
those achieved with other means.”
In addition, a "best" practice can evolve to become better as improvements
are discovered.
WHAT DO WE WANT?
Minimal customisation
Standardised way to create a project
Standardised way to build a project
Standardised way to deploy a project
Standardised way to test a project
Standardised way to share a project
OUR TARGET
Success criteria:
IT'S EASY TO BUILD A CQ SITE!
GETTING STARTED
Install Maven: http://maven.apache.org/guides/getting-
started/
Install Git: http://git-scm.com/book/en/Getting-Started-
Installing-Git
CONFIGURING MAVEN
Maven has a settings file that defines things like
repositories where plugins can be downloaded (typically
~/.m2/settings.xml).
We need to add a profile to point to the Adobe repository.
We then specify this repository when we use the
archetype plugin.
See also: Obtaining the Content Package Maven Plugin
CONFIGURING MAVEN
<profile>
<id>adobe-public</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<releaseRepository-Id>adobe-public-releases</releaseRepository-Id>
<releaseRepository-Name>Adobe Public Releases</releaseRepository-Name>
<releaseRepository-URL>http://repo.adobe.com/nexus/content/groups/public</releaseRepository-URL>
</properties>
<repositories>
<repository>
<id>adobe-public-releases</id>
<name>Adobe Basel Public Repository</name>
<url>http://repo.adobe.com/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>adobe-public-releases</id>
<name>Adobe Basel Public Repository</name>
<url>http://repo.adobe.com/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
CONFIGURING MAVEN
Enable the repository:
Or use the -P option to activate profile(s):
<activeProfiles>
<activeProfile>adobe-public</activeProfile>
</activeProfiles>
mvn -P adobe-public [...]
USING MAVEN
STARTING A NEW PROJECT ...
... can sometimes feel like reinventing the wheel.
YOU ARE HERE
ARCHETYPES
archetype |ˈɑːkɪtʌɪp|
noun
a very typical example of a certain person or thing: he was
the archetype of the old-style football club chairman.
an original which has been imitated; a prototype: an
instrument which was the archetype of the early flute.
MAVEN ARCHETYPES
A prototype upon which others are
copied, patterned, or emulated.
WHAT CQ ARCHETYPES ARE THERE?
simple-content-package
Generates a simple
multimodule-content-package
Includes the folder structure for developing a CQ
application (content package and bundle).
cqblueprints multi-module
Third-party archetype encapsulating best practices for
working with e.g. OSGi bundles, taglibs, and CQ content
See also:
content package
How to work with packages
ON PACKAGES
Packages enable the importing and exporting of repository
content. They are used to install new functionality, transfer
content between instances, or back up the repository
A package is a zip file in file system (vault) serialization
format
Packages include meta information - filter definitions,
import configuration, package properties
Packages are often managed through the CQ
Package Manager
ON BUNDLES
Bundles are modular containers of functionality for OSGi –
essentially a java module that contains application logic
Bundles consist of java classes and other resources needed
to deliver functionality or to provide services to other
bundles.
Bundles can be managed through the CQ
See also:
Web Console
Creating OSGi bundles using CRXDE
HOW TO USE AN ARCHETYPE
archetypeGroupId: identifies the archetype project
uniquely across all projects
archetypeArtifactId: the name of the archetype jar
without a version number
archetypeRepository: where to get the archetype from
(based on pluginRepository in settings.xml)
See also: and
mvn archetype:generate
-DarchetypeGroupId=foo
-DarchetypeArtifactId=bar
-DarchetypeVersion=1.0.0
-DarchetypeRepository=baz
Maven: Introduction to Archetypes Maven: Naming conventions
SIMPLE CONTENT PACKAGE ARCHETYPE
From the fine manual:
“Creates a maven project that is suitable for
installing resources for a simple CQ
application. The folder structure is that used
below the /apps folder of the CQ repository.
The POM defines commands for packaging
the resources that you place in the folders and
installing the packages on the CQ server.”
SIMPLE CONTENT PACKAGE USAGE
archetypeGroupId: com.day.jcr.vault
identifies the archetype project uniquely across all projects
archetypeArtifactId: simple-content-package-archetype
the name of the archetype jar without a version number
archetypeRepository: adobe-public-releases
where to get the archetype from (based on
pluginRepository in settings.xml)
mvn archetype:generate
-DarchetypeGroupId=com.day.jcr.vault
-DarchetypeArtifactId=simple-content-package-archetype
-DarchetypeVersion=1.0.1
-DarchetypeRepository=adobe-public-releases
SIMPLE CONTENT PACKAGE IN ACTION
SIMPLE CONTENT PACKAGE PARAMETERS
groupId: Like a package name, e.g.
com.yourcompany.myproject
artifactId: name of the jar without the version, e.g.
myproject
version: accept the default
package: not used in simple-content-package
appsFolderName: name of /apps/myproject, e.g. myproject
artifactName: Description in Package Manager
packageGroup: Group in Package Manager
See also: Maven: Naming conventions
SIMPLE CONTENT PACKAGE OUTPUT
Template directories
pom.xml file
Instructions for compiling, creating bundles, deploying
to CQ in packages
FileVault configuration files
MULTIMODULE CONTENT PACKAGE USAGE
mvn archetype:generate
-DarchetypeGroupId=com.day.jcr.vault
-DarchetypeArtifactId=multimodule-content-package-archetype
-DarchetypeVersion=1.0.1
-DarchetypeRepository=adobe-public-releases
MULTIMODULE CONTENT PACKAGE OUTPUT
${artifactId}
|- pom.xml
|- bundle
|- pom.xml
|- src
|- main
|- java
|- ${groupId}
|- SimpleDSComponent.java
|- test
|- java
|- ${groupId}
|- SimpleUnitTest.java
|- content
|- pom.xml
|- src
|- main
|- content
|- jcr_root
|- apps
|- ${appsFolderName}
|- config
|- install
|- META-INF
|- vault
|- config.xml
|- filter.xml
|- nodetypes.cnd
|- properties.xml
|- definition
|- .content.xml
CQBLUEPRINTS MULTI-MODULE USAGE
First add the CQ Blueprints Maven Repository to Maven's
settings.xml, then:
archetypeGroupID: com.cqblueprints.archetypes
archetypeArtifactId: multi-module
archetypeVersion: 1.0.5
archetypeRepository: cqblueprints.plugins.releases
See also: and
mvn -P cqblueprints archetype:generate
-DarchetypeGroupId=com.cqblueprints.archetypes
-DarchetypeArtifactId=multi-module
-DarchetypeVersion=1.0.5
-DarchetypeRepository=cqblueprints.plugins.releases
Connecting to the CQ Blueprints Repository The CQ Project Maven Archetype
CQBLUEPRINTS MULTI-MODULE OUTPUT
${artifactId}
|- README
|- pom.xml
|- ${artifactId}-all
|- pom.xml
|- ${artifactId}-config
|- ${artifactId}-content
|- ${artifactId}-services
|- ${artifactId}-taglib
|- ${artifactId}-view
WHY USE CQBLUEPRINTS MULTI-MODULE?
The cqblueprint multi-module archetype is developed by
“The things we wanted to consider with our
archetype is to address concerns of larger
teams”
headwire.com
CQBLUEPRINTS MULTIMODULE DESIGN
foo-view subproject: where css/html/js developers (frontend)
do their work
foo-taglib foo-services: where java developers (backend) do
their work
foo-config: where the configuration (runmode configs stored)
foo-content: how we get initial content and site structure onto
the developer's box quickly
foo-all: how we hand off builds to the next environment
USING GIT
WHY GIT?
Local safety net
"The internet is my backup"
It's good to share
Enlightened self-interest
YOU ARE HERE
GIT PROJECT SETUP
cd projectname
git init
GIT IGNORE
Edit .gitignore, for example:
.classpath
.project
.vlt/
.settings/
target/
GET IT IN GIT
git add *
git commit -m 'Initial project version'
GET IT IN GITHUB (OPTIONAL)
hub-new-repo is a shortcut for creating a repository on
github and pushing your local repo into it
See also:
See also:
cd project
git hub-new-repo
CLI remote github repo creation
github
DEMO
... TIME PASSES ...
COMMIT PROJECT
git add filenames
git commit -m "meaningful message"
git push origin master
(BEST) PRACTICE(S)
YOU ARE HERE
“the three great virtues of a programmer:
laziness, impatience, and hubris”
BUILDING
HOW CAN WE BUILD SMARTER?
Create local zips and jars that you can upload:
mvn package
produces:
Content package output: target/yourapp-content-
1.0-SNAPSHOT.zip
Bundle output: target/testapp-bundle-1.0-
SNAPSHOT.jar
DEPLOYING
HOW CAN WE BUILD AND DEPLOY SMARTER?
Content package: mvn -PautoInstallPackage
install
Bundle: mvn -PautoInstallBundle install
cqblueprints: mvn -Pauto-deploy install
DEMO
DEVELOPING
YOU ARE HERE
How do we develop in a world of maven builds and deploys
and git saves?
THE FILEVAULT TOOL
You can use the FileVault tool (vlt) to check in, check out,
update and sync local content with the repository.
Install: extract crx-
quickstart/opt/filevault/filevault.
[tgz|zip] and add to your path
Usage: vlt --credentials admin:admin co --
force http://localhost:4502/crx
See also: How to use the VLT Tool
SAMPLE DEVELOPMENT WORKFLOW
Use maven to build and deploy
Initialise vlt
Create components, templates with CRXDE Lite
Use vlt to copy back into local filesystem
Change locally
Use vlt to copy back into the repository
Add to git
DEMO
TESTING
CONTINUOUS INTEGRATION?
with ,
as a
with and
Jenkins Git plugin GitHub plugin
Selenium server
Cucumber for java Jenkins plugin tests in java
INTEGRATION TESTING FRAMEWORK
... see Lydia's talk
PRODUCTION
How do we move to production in a world of maven builds and
deploys and git saves?
YOU ARE HERE
MAVEN PROFILE FOR PRODUCTION
Add this to pom.xml:
Deploy using this profile:
Or one-time override: mvn -
Dcrx.host=another.host,crx.port=4504 -
PautoInstallPackage install
See also:
<profile>
<id>auto-deploy-prod</id>
<properties>
<crx.host>production.server.hostname</crx.host>
<crx.port>4502</crx.port>
</properties>
</profile>
mvn -PautoInstallPackage,auto-deploy-prod install
Introduction to build profiles
DEPLOYMENT TESTING
... see Bertrand's talk
PUTTING IT ALL TOGETHER
0-60 IN 5 PSEUDO LINES
mvn archetype:generate
git init; git add *; git commit -m "Initial project"
mvn -PautoInstallPackage install
vlt checkout ; vlt update ; vlt commit
git add; git commit; git push
THANK YOU. QUESTIONS?
CREDITS
designed by from The Noun Project
designed by from The Noun Project
designed by from The Noun Project
designed by from The Noun Project
designed by from The Noun Project
designed by from The Noun Project
designed by from The Noun Project
designed by from The Noun Project
designed by from The Noun Project
designed by from The Noun Project
designed by from The Noun Project
Light Bulb Shane David Kenna
Question Anas Ramadan
Hard Disk Drive Eddie Alshehri
Time wayne25uk
Sync P.J. Onori
Sync Rohith M S
Cloud Upload Adam Whitcroft
Puzzle John O'Shea
Question Henry Ryder
Factory Adrijan Karavdic
Crash Test Dummy Luis Prado

Contenu connexe

Tendances

An introduction to maven gradle and sbt
An introduction to maven gradle and sbtAn introduction to maven gradle and sbt
An introduction to maven gradle and sbtFabio Fumarola
 
GR8Conf 2011: Grails, how to plug in
GR8Conf 2011: Grails, how to plug inGR8Conf 2011: Grails, how to plug in
GR8Conf 2011: Grails, how to plug inGR8Conf
 
Note - Apache Maven Intro
Note - Apache Maven IntroNote - Apache Maven Intro
Note - Apache Maven Introboyw165
 
Gradle - time for a new build
Gradle - time for a new buildGradle - time for a new build
Gradle - time for a new buildIgor Khotin
 
Buildr In Action @devoxx france 2012
Buildr In Action @devoxx france 2012Buildr In Action @devoxx france 2012
Buildr In Action @devoxx france 2012alexismidon
 
Hands On with Maven
Hands On with MavenHands On with Maven
Hands On with MavenSid Anand
 
Enterprise Maven Repository BOF
Enterprise Maven Repository BOFEnterprise Maven Repository BOF
Enterprise Maven Repository BOFMax Andersen
 
The world of gradle - an introduction for developers
The world of gradle  - an introduction for developersThe world of gradle  - an introduction for developers
The world of gradle - an introduction for developersTricode (part of Dept)
 
An Introduction to Maven Part 1
An Introduction to Maven Part 1An Introduction to Maven Part 1
An Introduction to Maven Part 1MD Sayem Ahmed
 
Groovy, Transforming Language
Groovy, Transforming LanguageGroovy, Transforming Language
Groovy, Transforming LanguageUehara Junji
 
Tycho - good, bad or ugly ?
Tycho - good, bad or ugly ?Tycho - good, bad or ugly ?
Tycho - good, bad or ugly ?Max Andersen
 
Gradle build tool that rocks with DSL JavaOne India 4th May 2012
Gradle build tool that rocks with DSL JavaOne India 4th May 2012Gradle build tool that rocks with DSL JavaOne India 4th May 2012
Gradle build tool that rocks with DSL JavaOne India 4th May 2012Rajmahendra Hegde
 
How to be effective with JBoss Developer Studio
How to be effective with JBoss Developer StudioHow to be effective with JBoss Developer Studio
How to be effective with JBoss Developer StudioMax Andersen
 
Gradle - the Enterprise Automation Tool
Gradle  - the Enterprise Automation ToolGradle  - the Enterprise Automation Tool
Gradle - the Enterprise Automation ToolIzzet Mustafaiev
 
Maven 3 Overview
Maven 3  OverviewMaven 3  Overview
Maven 3 OverviewMike Ensor
 
Drupal 8, Where Did the Code Go? From Info Hook to Plugin
Drupal 8, Where Did the Code Go? From Info Hook to PluginDrupal 8, Where Did the Code Go? From Info Hook to Plugin
Drupal 8, Where Did the Code Go? From Info Hook to PluginAcquia
 

Tendances (20)

An introduction to maven gradle and sbt
An introduction to maven gradle and sbtAn introduction to maven gradle and sbt
An introduction to maven gradle and sbt
 
GR8Conf 2011: Grails, how to plug in
GR8Conf 2011: Grails, how to plug inGR8Conf 2011: Grails, how to plug in
GR8Conf 2011: Grails, how to plug in
 
Gradle Introduction
Gradle IntroductionGradle Introduction
Gradle Introduction
 
Note - Apache Maven Intro
Note - Apache Maven IntroNote - Apache Maven Intro
Note - Apache Maven Intro
 
Gradle - time for a new build
Gradle - time for a new buildGradle - time for a new build
Gradle - time for a new build
 
Buildr In Action @devoxx france 2012
Buildr In Action @devoxx france 2012Buildr In Action @devoxx france 2012
Buildr In Action @devoxx france 2012
 
Liferay maven sdk
Liferay maven sdkLiferay maven sdk
Liferay maven sdk
 
Hands On with Maven
Hands On with MavenHands On with Maven
Hands On with Maven
 
Enterprise Maven Repository BOF
Enterprise Maven Repository BOFEnterprise Maven Repository BOF
Enterprise Maven Repository BOF
 
The world of gradle - an introduction for developers
The world of gradle  - an introduction for developersThe world of gradle  - an introduction for developers
The world of gradle - an introduction for developers
 
An Introduction to Maven Part 1
An Introduction to Maven Part 1An Introduction to Maven Part 1
An Introduction to Maven Part 1
 
Groovy, Transforming Language
Groovy, Transforming LanguageGroovy, Transforming Language
Groovy, Transforming Language
 
Tycho - good, bad or ugly ?
Tycho - good, bad or ugly ?Tycho - good, bad or ugly ?
Tycho - good, bad or ugly ?
 
Gradle build tool that rocks with DSL JavaOne India 4th May 2012
Gradle build tool that rocks with DSL JavaOne India 4th May 2012Gradle build tool that rocks with DSL JavaOne India 4th May 2012
Gradle build tool that rocks with DSL JavaOne India 4th May 2012
 
How to be effective with JBoss Developer Studio
How to be effective with JBoss Developer StudioHow to be effective with JBoss Developer Studio
How to be effective with JBoss Developer Studio
 
Gradle - the Enterprise Automation Tool
Gradle  - the Enterprise Automation ToolGradle  - the Enterprise Automation Tool
Gradle - the Enterprise Automation Tool
 
Maven 3 Overview
Maven 3  OverviewMaven 3  Overview
Maven 3 Overview
 
Maven tutorial
Maven tutorialMaven tutorial
Maven tutorial
 
YouDrup_in_Drupal
YouDrup_in_DrupalYouDrup_in_Drupal
YouDrup_in_Drupal
 
Drupal 8, Where Did the Code Go? From Info Hook to Plugin
Drupal 8, Where Did the Code Go? From Info Hook to PluginDrupal 8, Where Did the Code Go? From Info Hook to Plugin
Drupal 8, Where Did the Code Go? From Info Hook to Plugin
 

En vedette

AdaptTo 2013: Slinging multichannel content the BrowserMap way / Device Detec...
AdaptTo 2013: Slinging multichannel content the BrowserMap way / Device Detec...AdaptTo 2013: Slinging multichannel content the BrowserMap way / Device Detec...
AdaptTo 2013: Slinging multichannel content the BrowserMap way / Device Detec...Andrew Savory
 
Whose work is it anyway?
Whose work is it anyway?Whose work is it anyway?
Whose work is it anyway?Andrew Savory
 
Solr, Lucene, Apache, and You!
Solr, Lucene, Apache, and You!Solr, Lucene, Apache, and You!
Solr, Lucene, Apache, and You!Andrew Savory
 
Gnome, linux mobile stacks, and you
Gnome, linux mobile stacks, and youGnome, linux mobile stacks, and you
Gnome, linux mobile stacks, and youAndrew Savory
 
Marketing to the Mobile Elite
Marketing to the Mobile EliteMarketing to the Mobile Elite
Marketing to the Mobile EliteAndrew Savory
 

En vedette (7)

AdaptTo 2013: Slinging multichannel content the BrowserMap way / Device Detec...
AdaptTo 2013: Slinging multichannel content the BrowserMap way / Device Detec...AdaptTo 2013: Slinging multichannel content the BrowserMap way / Device Detec...
AdaptTo 2013: Slinging multichannel content the BrowserMap way / Device Detec...
 
Simplifying Cocoon
Simplifying CocoonSimplifying Cocoon
Simplifying Cocoon
 
Whose work is it anyway?
Whose work is it anyway?Whose work is it anyway?
Whose work is it anyway?
 
Solr, Lucene, Apache, and You!
Solr, Lucene, Apache, and You!Solr, Lucene, Apache, and You!
Solr, Lucene, Apache, and You!
 
Gnome, linux mobile stacks, and you
Gnome, linux mobile stacks, and youGnome, linux mobile stacks, and you
Gnome, linux mobile stacks, and you
 
CQ Mobile Apps
CQ Mobile AppsCQ Mobile Apps
CQ Mobile Apps
 
Marketing to the Mobile Elite
Marketing to the Mobile EliteMarketing to the Mobile Elite
Marketing to the Mobile Elite
 

Similaire à CQCON CQ Maven Methods

Introduction to maven, its configuration, lifecycle and relationship to JS world
Introduction to maven, its configuration, lifecycle and relationship to JS worldIntroduction to maven, its configuration, lifecycle and relationship to JS world
Introduction to maven, its configuration, lifecycle and relationship to JS worldDmitry Bakaleinik
 
Introduction to OSGi
Introduction to OSGiIntroduction to OSGi
Introduction to OSGipradeepfn
 
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...mfrancis
 
Java, Eclipse, Maven & JSF tutorial
Java, Eclipse, Maven & JSF tutorialJava, Eclipse, Maven & JSF tutorial
Java, Eclipse, Maven & JSF tutorialRaghavan Mohan
 
Maven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension toolMaven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension toolelliando dias
 
Maven 2 features
Maven 2 featuresMaven 2 features
Maven 2 featuresAngel Ruiz
 
Using Maven to build Java & Android program
Using Maven to build Java & Android programUsing Maven to build Java & Android program
Using Maven to build Java & Android programMu Chun Wang
 
From Dev to DevOps - FOSDEM 2012
From Dev to DevOps - FOSDEM 2012From Dev to DevOps - FOSDEM 2012
From Dev to DevOps - FOSDEM 2012Carlos Sanchez
 
Maven: Managing Software Projects for Repeatable Results
Maven: Managing Software Projects for Repeatable ResultsMaven: Managing Software Projects for Repeatable Results
Maven: Managing Software Projects for Repeatable ResultsSteve Keener
 
Introduction to JIB and Google Cloud Run
Introduction to JIB and Google Cloud RunIntroduction to JIB and Google Cloud Run
Introduction to JIB and Google Cloud RunSaiyam Pathak
 
modern module development - Ken Barber 2012 Edinburgh Puppet Camp
modern module development - Ken Barber 2012 Edinburgh Puppet Campmodern module development - Ken Barber 2012 Edinburgh Puppet Camp
modern module development - Ken Barber 2012 Edinburgh Puppet CampPuppet
 
Intelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest IstanbulIntelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest IstanbulMert Çalışkan
 

Similaire à CQCON CQ Maven Methods (20)

Introduction to maven, its configuration, lifecycle and relationship to JS world
Introduction to maven, its configuration, lifecycle and relationship to JS worldIntroduction to maven, its configuration, lifecycle and relationship to JS world
Introduction to maven, its configuration, lifecycle and relationship to JS world
 
Introduction to OSGi
Introduction to OSGiIntroduction to OSGi
Introduction to OSGi
 
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
 
Maven Introduction
Maven IntroductionMaven Introduction
Maven Introduction
 
Using Maven2
Using Maven2Using Maven2
Using Maven2
 
Java, Eclipse, Maven & JSF tutorial
Java, Eclipse, Maven & JSF tutorialJava, Eclipse, Maven & JSF tutorial
Java, Eclipse, Maven & JSF tutorial
 
Maven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension toolMaven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension tool
 
Maven 2 features
Maven 2 featuresMaven 2 features
Maven 2 features
 
Using Maven to build Java & Android program
Using Maven to build Java & Android programUsing Maven to build Java & Android program
Using Maven to build Java & Android program
 
Maven
MavenMaven
Maven
 
NUBOMEDIA Webinar
NUBOMEDIA WebinarNUBOMEDIA Webinar
NUBOMEDIA Webinar
 
From Dev to DevOps - FOSDEM 2012
From Dev to DevOps - FOSDEM 2012From Dev to DevOps - FOSDEM 2012
From Dev to DevOps - FOSDEM 2012
 
Maven: Managing Software Projects for Repeatable Results
Maven: Managing Software Projects for Repeatable ResultsMaven: Managing Software Projects for Repeatable Results
Maven: Managing Software Projects for Repeatable Results
 
Introduction to JIB and Google Cloud Run
Introduction to JIB and Google Cloud RunIntroduction to JIB and Google Cloud Run
Introduction to JIB and Google Cloud Run
 
modern module development - Ken Barber 2012 Edinburgh Puppet Camp
modern module development - Ken Barber 2012 Edinburgh Puppet Campmodern module development - Ken Barber 2012 Edinburgh Puppet Camp
modern module development - Ken Barber 2012 Edinburgh Puppet Camp
 
Maven
MavenMaven
Maven
 
Pyramid patterns
Pyramid patternsPyramid patterns
Pyramid patterns
 
Intelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest IstanbulIntelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest Istanbul
 
Spring Lab
Spring LabSpring Lab
Spring Lab
 
Unlocked package
Unlocked packageUnlocked package
Unlocked package
 

Plus de Andrew Savory

Economics of innovation in mobile
Economics of innovation in mobileEconomics of innovation in mobile
Economics of innovation in mobileAndrew Savory
 
Mobile distributions and upstream challenges
Mobile distributions and upstream challengesMobile distributions and upstream challenges
Mobile distributions and upstream challengesAndrew Savory
 
Open source in mobile
Open source in mobileOpen source in mobile
Open source in mobileAndrew Savory
 
Open Apps - Good, Bad or Ugly?
Open Apps - Good, Bad or Ugly?Open Apps - Good, Bad or Ugly?
Open Apps - Good, Bad or Ugly?Andrew Savory
 
Collaborative Development for the future of Mobile
Collaborative Development for the future of MobileCollaborative Development for the future of Mobile
Collaborative Development for the future of MobileAndrew Savory
 
A to z of open mobile
A to z of open mobileA to z of open mobile
A to z of open mobileAndrew Savory
 

Plus de Andrew Savory (8)

Economics of innovation in mobile
Economics of innovation in mobileEconomics of innovation in mobile
Economics of innovation in mobile
 
XML and XSLT
XML and XSLTXML and XSLT
XML and XSLT
 
What Students Want
What Students WantWhat Students Want
What Students Want
 
Mobile distributions and upstream challenges
Mobile distributions and upstream challengesMobile distributions and upstream challenges
Mobile distributions and upstream challenges
 
Open source in mobile
Open source in mobileOpen source in mobile
Open source in mobile
 
Open Apps - Good, Bad or Ugly?
Open Apps - Good, Bad or Ugly?Open Apps - Good, Bad or Ugly?
Open Apps - Good, Bad or Ugly?
 
Collaborative Development for the future of Mobile
Collaborative Development for the future of MobileCollaborative Development for the future of Mobile
Collaborative Development for the future of Mobile
 
A to z of open mobile
A to z of open mobileA to z of open mobile
A to z of open mobile
 

Dernier

What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 

Dernier (20)

What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 

CQCON CQ Maven Methods

  • 3. Joined Adobe in November 2012
  • 5. Background in Open Source, Content Management, Mobile
  • 6. Talking today about what I learned so far...
  • 7. FORK ME! If you found this talk useful, or spotted mistakes: github.com/savs/CQCon_2013_CQ_Maven_Methods
  • 10.
  • 11.
  • 12. LET'S BUILD A CQ SITE ... uh, where to begin?
  • 13. METHOD 1 Enthusiastically rush in, use CRXDE Lite
  • 14. METHOD 2 I'm a guru, I use Eclipse and CRXDE
  • 15. METHOD 3 I'm a ninja, I use emacs and vlt
  • 16. METHOD 4 I'm a guru ninja, I use vi and curl
  • 17. METHOD 5 See also: http://xkcd.com/378/ – Real Programmers
  • 18. BUT WHAT ABOUT ... reverting mistakes? reproducible builds? collaborating with others? deploying to production?
  • 19. WHY ISN'T IT EASIER TO BUILD A CQ SITE? Laborious project inception No two projects alike Don't know project layout Don't know project dependencies Hard for others to reproduce Hard to test Lengthy RTFM or worse (no FM) Documentation over convention
  • 23. SO HOW DO WE FIX THIS? Maven Git (or Subversion, or CVS ... ymmv) Best Practices
  • 24. MAVEN “Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information.”
  • 25. GIT “Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. ” Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later.
  • 26. BEST PRACTICES “A best practice is a method or technique that has consistently shown results superior to those achieved with other means.” In addition, a "best" practice can evolve to become better as improvements are discovered.
  • 27. WHAT DO WE WANT? Minimal customisation Standardised way to create a project Standardised way to build a project Standardised way to deploy a project Standardised way to test a project Standardised way to share a project
  • 29. Success criteria: IT'S EASY TO BUILD A CQ SITE!
  • 30. GETTING STARTED Install Maven: http://maven.apache.org/guides/getting- started/ Install Git: http://git-scm.com/book/en/Getting-Started- Installing-Git
  • 31. CONFIGURING MAVEN Maven has a settings file that defines things like repositories where plugins can be downloaded (typically ~/.m2/settings.xml). We need to add a profile to point to the Adobe repository. We then specify this repository when we use the archetype plugin. See also: Obtaining the Content Package Maven Plugin
  • 32. CONFIGURING MAVEN <profile> <id>adobe-public</id> <activation> <activeByDefault>false</activeByDefault> </activation> <properties> <releaseRepository-Id>adobe-public-releases</releaseRepository-Id> <releaseRepository-Name>Adobe Public Releases</releaseRepository-Name> <releaseRepository-URL>http://repo.adobe.com/nexus/content/groups/public</releaseRepository-URL> </properties> <repositories> <repository> <id>adobe-public-releases</id> <name>Adobe Basel Public Repository</name> <url>http://repo.adobe.com/nexus/content/groups/public</url> <releases> <enabled>true</enabled> <updatePolicy>never</updatePolicy> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>adobe-public-releases</id> <name>Adobe Basel Public Repository</name> <url>http://repo.adobe.com/nexus/content/groups/public</url> <releases> <enabled>true</enabled> <updatePolicy>never</updatePolicy> </releases> <snapshots> <enabled>false</enabled> </snapshots> </pluginRepository> </pluginRepositories> </profile>
  • 33. CONFIGURING MAVEN Enable the repository: Or use the -P option to activate profile(s): <activeProfiles> <activeProfile>adobe-public</activeProfile> </activeProfiles> mvn -P adobe-public [...]
  • 35. STARTING A NEW PROJECT ... ... can sometimes feel like reinventing the wheel.
  • 37. ARCHETYPES archetype |ˈɑːkɪtʌɪp| noun a very typical example of a certain person or thing: he was the archetype of the old-style football club chairman. an original which has been imitated; a prototype: an instrument which was the archetype of the early flute.
  • 38. MAVEN ARCHETYPES A prototype upon which others are copied, patterned, or emulated.
  • 39. WHAT CQ ARCHETYPES ARE THERE? simple-content-package Generates a simple multimodule-content-package Includes the folder structure for developing a CQ application (content package and bundle). cqblueprints multi-module Third-party archetype encapsulating best practices for working with e.g. OSGi bundles, taglibs, and CQ content See also: content package How to work with packages
  • 40. ON PACKAGES Packages enable the importing and exporting of repository content. They are used to install new functionality, transfer content between instances, or back up the repository A package is a zip file in file system (vault) serialization format Packages include meta information - filter definitions, import configuration, package properties Packages are often managed through the CQ Package Manager
  • 41. ON BUNDLES Bundles are modular containers of functionality for OSGi – essentially a java module that contains application logic Bundles consist of java classes and other resources needed to deliver functionality or to provide services to other bundles. Bundles can be managed through the CQ See also: Web Console Creating OSGi bundles using CRXDE
  • 42. HOW TO USE AN ARCHETYPE archetypeGroupId: identifies the archetype project uniquely across all projects archetypeArtifactId: the name of the archetype jar without a version number archetypeRepository: where to get the archetype from (based on pluginRepository in settings.xml) See also: and mvn archetype:generate -DarchetypeGroupId=foo -DarchetypeArtifactId=bar -DarchetypeVersion=1.0.0 -DarchetypeRepository=baz Maven: Introduction to Archetypes Maven: Naming conventions
  • 43. SIMPLE CONTENT PACKAGE ARCHETYPE From the fine manual: “Creates a maven project that is suitable for installing resources for a simple CQ application. The folder structure is that used below the /apps folder of the CQ repository. The POM defines commands for packaging the resources that you place in the folders and installing the packages on the CQ server.”
  • 44. SIMPLE CONTENT PACKAGE USAGE archetypeGroupId: com.day.jcr.vault identifies the archetype project uniquely across all projects archetypeArtifactId: simple-content-package-archetype the name of the archetype jar without a version number archetypeRepository: adobe-public-releases where to get the archetype from (based on pluginRepository in settings.xml) mvn archetype:generate -DarchetypeGroupId=com.day.jcr.vault -DarchetypeArtifactId=simple-content-package-archetype -DarchetypeVersion=1.0.1 -DarchetypeRepository=adobe-public-releases
  • 46. SIMPLE CONTENT PACKAGE PARAMETERS groupId: Like a package name, e.g. com.yourcompany.myproject artifactId: name of the jar without the version, e.g. myproject version: accept the default package: not used in simple-content-package appsFolderName: name of /apps/myproject, e.g. myproject artifactName: Description in Package Manager packageGroup: Group in Package Manager See also: Maven: Naming conventions
  • 47. SIMPLE CONTENT PACKAGE OUTPUT Template directories pom.xml file Instructions for compiling, creating bundles, deploying to CQ in packages FileVault configuration files
  • 48. MULTIMODULE CONTENT PACKAGE USAGE mvn archetype:generate -DarchetypeGroupId=com.day.jcr.vault -DarchetypeArtifactId=multimodule-content-package-archetype -DarchetypeVersion=1.0.1 -DarchetypeRepository=adobe-public-releases
  • 49. MULTIMODULE CONTENT PACKAGE OUTPUT ${artifactId} |- pom.xml |- bundle |- pom.xml |- src |- main |- java |- ${groupId} |- SimpleDSComponent.java |- test |- java |- ${groupId} |- SimpleUnitTest.java |- content |- pom.xml |- src |- main |- content |- jcr_root |- apps |- ${appsFolderName} |- config |- install |- META-INF |- vault |- config.xml
  • 50. |- filter.xml |- nodetypes.cnd |- properties.xml |- definition |- .content.xml
  • 51. CQBLUEPRINTS MULTI-MODULE USAGE First add the CQ Blueprints Maven Repository to Maven's settings.xml, then: archetypeGroupID: com.cqblueprints.archetypes archetypeArtifactId: multi-module archetypeVersion: 1.0.5 archetypeRepository: cqblueprints.plugins.releases See also: and mvn -P cqblueprints archetype:generate -DarchetypeGroupId=com.cqblueprints.archetypes -DarchetypeArtifactId=multi-module -DarchetypeVersion=1.0.5 -DarchetypeRepository=cqblueprints.plugins.releases Connecting to the CQ Blueprints Repository The CQ Project Maven Archetype
  • 52. CQBLUEPRINTS MULTI-MODULE OUTPUT ${artifactId} |- README |- pom.xml |- ${artifactId}-all |- pom.xml |- ${artifactId}-config |- ${artifactId}-content |- ${artifactId}-services |- ${artifactId}-taglib |- ${artifactId}-view
  • 53. WHY USE CQBLUEPRINTS MULTI-MODULE? The cqblueprint multi-module archetype is developed by “The things we wanted to consider with our archetype is to address concerns of larger teams” headwire.com
  • 54. CQBLUEPRINTS MULTIMODULE DESIGN foo-view subproject: where css/html/js developers (frontend) do their work foo-taglib foo-services: where java developers (backend) do their work foo-config: where the configuration (runmode configs stored) foo-content: how we get initial content and site structure onto the developer's box quickly foo-all: how we hand off builds to the next environment
  • 56. WHY GIT? Local safety net "The internet is my backup" It's good to share Enlightened self-interest
  • 58. GIT PROJECT SETUP cd projectname git init
  • 59. GIT IGNORE Edit .gitignore, for example: .classpath .project .vlt/ .settings/ target/
  • 60. GET IT IN GIT git add * git commit -m 'Initial project version'
  • 61. GET IT IN GITHUB (OPTIONAL) hub-new-repo is a shortcut for creating a repository on github and pushing your local repo into it See also: See also: cd project git hub-new-repo CLI remote github repo creation github
  • 62. DEMO
  • 64. COMMIT PROJECT git add filenames git commit -m "meaningful message" git push origin master
  • 67. “the three great virtues of a programmer: laziness, impatience, and hubris”
  • 68.
  • 70. HOW CAN WE BUILD SMARTER? Create local zips and jars that you can upload: mvn package produces: Content package output: target/yourapp-content- 1.0-SNAPSHOT.zip Bundle output: target/testapp-bundle-1.0- SNAPSHOT.jar
  • 72. HOW CAN WE BUILD AND DEPLOY SMARTER? Content package: mvn -PautoInstallPackage install Bundle: mvn -PautoInstallBundle install cqblueprints: mvn -Pauto-deploy install
  • 73. DEMO
  • 76. How do we develop in a world of maven builds and deploys and git saves?
  • 77. THE FILEVAULT TOOL You can use the FileVault tool (vlt) to check in, check out, update and sync local content with the repository. Install: extract crx- quickstart/opt/filevault/filevault. [tgz|zip] and add to your path Usage: vlt --credentials admin:admin co -- force http://localhost:4502/crx See also: How to use the VLT Tool
  • 78. SAMPLE DEVELOPMENT WORKFLOW Use maven to build and deploy Initialise vlt Create components, templates with CRXDE Lite Use vlt to copy back into local filesystem Change locally Use vlt to copy back into the repository Add to git
  • 79. DEMO
  • 81. CONTINUOUS INTEGRATION? with , as a with and Jenkins Git plugin GitHub plugin Selenium server Cucumber for java Jenkins plugin tests in java
  • 84. How do we move to production in a world of maven builds and deploys and git saves?
  • 86. MAVEN PROFILE FOR PRODUCTION Add this to pom.xml: Deploy using this profile: Or one-time override: mvn - Dcrx.host=another.host,crx.port=4504 - PautoInstallPackage install See also: <profile> <id>auto-deploy-prod</id> <properties> <crx.host>production.server.hostname</crx.host> <crx.port>4502</crx.port> </properties> </profile> mvn -PautoInstallPackage,auto-deploy-prod install Introduction to build profiles
  • 87. DEPLOYMENT TESTING ... see Bertrand's talk
  • 88. PUTTING IT ALL TOGETHER
  • 89. 0-60 IN 5 PSEUDO LINES mvn archetype:generate git init; git add *; git commit -m "Initial project" mvn -PautoInstallPackage install vlt checkout ; vlt update ; vlt commit git add; git commit; git push
  • 90.
  • 92. CREDITS designed by from The Noun Project designed by from The Noun Project designed by from The Noun Project designed by from The Noun Project designed by from The Noun Project designed by from The Noun Project designed by from The Noun Project designed by from The Noun Project designed by from The Noun Project designed by from The Noun Project designed by from The Noun Project Light Bulb Shane David Kenna Question Anas Ramadan Hard Disk Drive Eddie Alshehri Time wayne25uk Sync P.J. Onori Sync Rohith M S Cloud Upload Adam Whitcroft Puzzle John O'Shea Question Henry Ryder Factory Adrijan Karavdic Crash Test Dummy Luis Prado