Archive for March, 2012

h1

What can I do with the MAVEN-VAULT-PLUGIN from Adobe for CRX/CQ?

March 22, 2012

The adobe maven vault plugin is very powerful, however, it seems not to be documented that well. Fear not, there is a way to look at all the options available by just executing the following command line:

mvn vault:help

Adobe File Vault Maven Plugin
Maven Plugin supporting various File Vault tasks

This plugin has 8 goals:

vault:build
Builds a content package defined on a remote CRX or Communique 5 system.

vault:help
Display help information on maven-vault-plugin.
Call
mvn vault:help -Ddetail=true -Dgoal=
to display parameter details.

vault:install
Install a Content Package on a remote CRX or Communique 5 system.

vault:ls
Lists packages installed on remote CRX or Communique 5 system.

vault:package
(no description available)

vault:rm
Removes a content package installed on a remote CRX or Communique 5 system.

vault:share
Share a Content Package on Adobe Package Share

vault:uninstall
Uninstalls a content package installed on a remote CRX or Communique 5 system.


As seen above, there is an option to get more detailed help (-Ddetail=true) that will give you the following output:

Adobe File Vault Maven Plugin
Maven Plugin supporting various File Vault tasks

This plugin has 8 goals:

vault:build
Builds a content package defined on a remote CRX or Communique 5 system.

Available parameters:

name
The name of the package to remove on the target system.

password (Default: admin)
The password to authenticate against the remote CRX system.

serverId
The server id with which to get the username and password from the user's
settings file.

targetURL (Default: http://localhost:4502/crx/packmgr/service.jsp)
The URL to the HTTP service API of the CRX package manager. See HTTP
Service Interface for details on this interface.

timeout (Default: 5)
The connection timeout to set when communicating with the package manager
service. Default value is 5 seconds. Value is specified in seconds.

useProxy (Default: true)
Setting this to false disables considering the use of any of the active
proxies configured in the Maven Settings. By default the first active
proxy configuration in the Maven Settings is used to proxy any request to
the package manager.

userId (Default: admin)
The user name to authenticate as against the remote CRX system.

verbose (Default: false)
Enable verbose logging when set to true.

vault:help
Display help information on maven-vault-plugin.
Call
mvn vault:help -Ddetail=true -Dgoal=
to display parameter details.

Available parameters:

detail (Default: false)
If true, display all settable properties for each goal.

goal
The name of the goal for which to show help. If unspecified, all goals
will be displayed.

indentSize (Default: 2)
The number of spaces per indentation level, should be positive.

lineLength (Default: 80)
The maximum length of a display line, should be positive.

vault:install
Install a Content Package on a remote CRX or Communique 5 system.

Available parameters:

artifact
A string of the form groupId:artifactId:version[:packaging].

artifactId
The artifactId of the artifact to install

groupId
The groupId of the artifact to install

install (Default: true)
Whether to install (unpack) the uploaded package automatically or not.

name (Default: ${project.artifactId})
The name of the content package

packageFile
The name of the content package file to install on the target system. If
not set, the primary artifact of the project is considered the content
package to be installed.

packaging (Default: zip)
The packaging of the artifact to install

password (Default: admin)
The password to authenticate against the remote CRX system.

repositoryId (Default: temp)
The id of the repository from which we'll download the artifact

repositoryUrl
The url of the repository from which we'll download the artifact

serverId
The server id with which to get the username and password from the user's
settings file.

targetURL (Default: http://localhost:4502/crx/packmgr/service.jsp)
The URL to the HTTP service API of the CRX package manager. See HTTP
Service Interface for details on this interface.

timeout (Default: 5)
The connection timeout to set when communicating with the package manager
service. Default value is 5 seconds. Value is specified in seconds.

useProxy (Default: true)
Setting this to false disables considering the use of any of the active
proxies configured in the Maven Settings. By default the first active
proxy configuration in the Maven Settings is used to proxy any request to
the package manager.

userId (Default: admin)
The user name to authenticate as against the remote CRX system.

verbose (Default: false)
Enable verbose logging when set to true.

version
The version of the artifact to install

vault:ls
Lists packages installed on remote CRX or Communique 5 system.

Available parameters:

password (Default: admin)
The password to authenticate against the remote CRX system.

serverId
The server id with which to get the username and password from the user's
settings file.

targetURL (Default: http://localhost:4502/crx/packmgr/service.jsp)
The URL to the HTTP service API of the CRX package manager. See HTTP
Service Interface for details on this interface.

timeout (Default: 5)
The connection timeout to set when communicating with the package manager
service. Default value is 5 seconds. Value is specified in seconds.

useProxy (Default: true)
Setting this to false disables considering the use of any of the active
proxies configured in the Maven Settings. By default the first active
proxy configuration in the Maven Settings is used to proxy any request to
the package manager.

userId (Default: admin)
The user name to authenticate as against the remote CRX system.

verbose (Default: false)
Enable verbose logging when set to true.

vault:package
(no description available)

Available parameters:

archive
The archive configuration to use. See the documentation for Maven
Archiver.

classesDirectory (Default: ${project.build.outputDirectory})
The directory containing the content to be packaged up into the content
package.

dependencies
(no description available)

embeddeds
(no description available)

embeddedTarget
(no description available)

filters
Defines the content of the filter.xml file

finalName (Default: ${project.build.finalName})
The name of the generated package ZIP file without the '.zip' file
extension.

group (Default: ${project.groupId})
The groupId used for the generated content package. This will be part of
the target installation path of the content package.

hotfix
Defines information about the generated hotfix. Specifically the hotfix id
must be defined for this project to be considered a hotfix.

name (Default: ${project.artifactId})
The name of the content package

outputDirectory (Default: ${project.build.directory})
(no description available)

prefix
(no description available)

properties
Specifies additional properties to be set in the properties.xml file.
These properties cannot overwrite the following predefined properties:
group
Use group parameter to set
name
Use name parameter to set
version
Use version parameter to set
description
Set from the project description
groupId
groupId of the Maven project descriptor
artifactId
artifactId of the Maven project descriptor
dependencies
Use dependencies parameter to set
createdBy
The value of the user.name system property
created
The current system time
requiresRoot
Use requiresRoot parameter to set
packagePath
Automatically generated from the group and package name

requiresRoot (Default: false)
Defines whether the package requires the root. This will become the
requiresRoot property of the properties.xml file.

subPackages
(no description available)

version (Default: ${project.version})
The version of the content package.

workDirectory (Default: ${project.build.directory}/vault-work)
The directory containing the content to be packaged up into the content
package.

vault:rm
Removes a content package installed on a remote CRX or Communique 5 system.

Available parameters:

name
The name of the package to remove on the target system.

password (Default: admin)
The password to authenticate against the remote CRX system.

serverId
The server id with which to get the username and password from the user's
settings file.

targetURL (Default: http://localhost:4502/crx/packmgr/service.jsp)
The URL to the HTTP service API of the CRX package manager. See HTTP
Service Interface for details on this interface.

timeout (Default: 5)
The connection timeout to set when communicating with the package manager
service. Default value is 5 seconds. Value is specified in seconds.

useProxy (Default: true)
Setting this to false disables considering the use of any of the active
proxies configured in the Maven Settings. By default the first active
proxy configuration in the Maven Settings is used to proxy any request to
the package manager.

userId (Default: admin)
The user name to authenticate as against the remote CRX system.

verbose (Default: false)
Enable verbose logging when set to true.

vault:share
Share a Content Package on Adobe Package Share

Available parameters:

name (Default: ${project.artifactId})
The name of the content package

packageFile
The name of the content package file to install on the target system. If
not set, the primary artifact of the project is considered the content
package to be installed.

password
The password to authenticate against Adobe Package Share.

serverId
The server id with which to get the username and password from the user's
settings file.

serverURL
(no description available)

timeout (Default: 30)
The connection timeout to set when communicating with Adobe Package Share.
Default value is 30 seconds. Value is specified in seconds.

useProxy (Default: true)
Setting this to false disables considering the use of any of the active
proxies configured in the Maven Settings. By default the first active
proxy configuration in the Maven Settings is used to proxy any request to
the package manager.

userId
The user name to authenticate as against Adobe Package Share.

verbose (Default: false)
Enable verbose logging when set to true.

vault:uninstall
Uninstalls a content package installed on a remote CRX or Communique 5 system.

Available parameters:

name
The name of the package to uninstall on the target system.

password (Default: admin)
The password to authenticate against the remote CRX system.

serverId
The server id with which to get the username and password from the user's
settings file.

targetURL (Default: http://localhost:4502/crx/packmgr/service.jsp)
The URL to the HTTP service API of the CRX package manager. See HTTP
Service Interface for details on this interface.

timeout (Default: 5)
The connection timeout to set when communicating with the package manager
service. Default value is 5 seconds. Value is specified in seconds.

useProxy (Default: true)
Setting this to false disables considering the use of any of the active
proxies configured in the Maven Settings. By default the first active
proxy configuration in the Maven Settings is used to proxy any request to
the package manager.

userId (Default: admin)
The user name to authenticate as against the remote CRX system.

verbose (Default: false)
Enable verbose logging when set to true.


Note: you need to have the adobe repository in your maven settings.xml file or pom and the maven vault plugin declared as a dependency for this to work:


<build>
<plugins>
<plugin>
<groupId>com.day.jcr.vault</groupId>
<artifactId>maven-vault-plugin</artifactId>
<extensions>true</extensions>
<executions>
<execution>
<goals>
<goal>install</goal>
</goals>
<configuration>
<targetURL>http://localhost:4504/crx/packmgr/service.jsp</targetURL&gt;
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

and


<repositories>
<repository>
<id>adobe</id>
<name>Adobe</name>
<url>http://repo.adobe.com/archiva/repository/day-central</url&gt;
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>

Advertisements
h1

Updated init script for CQ5.5

March 13, 2012

Jorg Hoh over at cqdump.wordpress.com has a nice article on how to write an init script for cq5.4 – since CQ5.5 changed a bit on how it starts/stops cq, I figured I’ll post a new version of his script that’s cq5.5 compatible

#!/bin/sh
### BEGIN INIT INFO
# Provides: cq55
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start, stop adobe cq5.5
# Description: Start, stop adobe cq5.5
### END INIT INFO

CQ5_ROOT=CQROOT
CQ5_USER=CQUSER

########
SERVER=${CQ5_ROOT}/crx-quickstart
START=${SERVER}/bin/start
STOP=${SERVER}/bin/stop
STATUS="${SERVER}/bin/status"

case "$1" in
start)
su - ${CQ5_USER} ${START}
;;
stop)
su - ${CQ5_USER} ${STOP}
;;
status)
su - ${CQ5_USER} ${STATUS}
;;
*)
echo "Unknown argument $1"
;;
esac

Replace CQROOT with the folder where you installed CQ, CQUSER with the user that you want to run CQ as. I also added a header for init script management into the script file. This will allow you to use update=rc.d on ubuntu or chkconfig on centos:

ubuntu:
sudo update-rc.d -f cq55 remove


centos:
sudo chkconfig --del cq55

let me know what you think, any feedback is greatly appreciated

h1

Adobe CQ5.5, first impressions

March 10, 2012

Adobe recently released a new version of it’s content management suite, now called CQ5.5 again – there was an effort to rebrand it last year to WEM but that seemed not to go over that well and was quite confusing.

The new version of CQ comes with a much better integration into the Adobe digital marketing suite (Omniture, Test & Target, Scene 7, etc) and there seems to be quite some work that has been done under the hood.

This slideshow requires JavaScript.

CQ5.5 now comes as two distributions, a WAR file that can be deployed into any JEE servlet container as well as a standalone version that runs in the apache felix OSGi container – CQ used to be distributed as 2 war files with an embedded servlet container and to get to run it in any other container there was quite some work involved.

Unfortunately, the new release also has some downsides especially for system administrators. Lots has changed and it seems some of the features that were there before got lost. For example, you used to be able to just rename the jar file and drive the type of server (author instance or publish instance) as well as the port CQ would run on from the name (cq-publish-4503.jar would make it run on port 4503 as a public instance). Now, this feature only works if you start the jar file directly (java -jar cq-publish-4503.jar) but the installed service scripts, such as start and stop to control the server from an init.d script for example are now hardcoded to run an author on port 4502 (the default instance).

It seems the best way to install CQ5.5 at the moment is to do the following:

java -jar cq5-5.5.0.20120220-generic.jar -unpack

this will just unpack CQ into a subfolder crx-quickstart. Once that’s complete, start modifying the files in crx-quickstart/bin. You want to change the port, the run mode (type of instance you’re running) and the memory settings.

The following few lines will change the settings for you (replace $NEWPORT, $RUNMODE and $MAXMEM with your desired configuration settings:

NEWPORT=4503
RUNMODE=publish
MAXMEM=1600

sed -i.old "s/4502/$NEWPORT/" crx-quickstart/bin/*
sed -i.old "s/author/$RUNMODE/" crx-quickstart/bin/*
sed -i.old "s/-Xmx1024/-Xmx$MAXMEM/" crx-quickstart/bin/start*

Your basic start., stop and quickstart scripts should be modified, starting and stopping CQ can now be done by executing these commands on linux or mac

./crx-quickstart/bin/start
./crx-quickstart/bin/stop

on windows, you can just use

crx-quickstart\bin\start.bat
crx-quickstart\bin\stop.bat

Note of advice: make sure you use Java6 and not Java7, there are still some problems with CQ on Java7 it seems.

Also visit updated-init-script for cq5.5 for an init script that works with cq5.5