<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ben Peter&#039;s Blog</title>
	<atom:link href="http://ben-peter.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://ben-peter.com/blog</link>
	<description>News and thoughts on IT, Content Management and life</description>
	<lastBuildDate>Sun, 11 Dec 2011 08:41:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Generating aggregate content-packages for CRX</title>
		<link>http://ben-peter.com/blog/generating-aggregate-content-packages-for-crx/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rss</link>
		<comments>http://ben-peter.com/blog/generating-aggregate-content-packages-for-crx/#comments</comments>
		<pubDate>Sun, 11 Dec 2011 08:41:13 +0000</pubDate>
		<dc:creator>Ben Peter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cq5]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://ben-peter.com/blog/?p=241</guid>
		<description><![CDATA[Your typical CQ or CRX project is multi-module, right? You have the typical collection of modules = artifacts = bundles and content packages: content, samplecontent, uiapp, core, taglib &#8211; you name them. For cutting releases, it&#8217;s convenient to have just &#8230; <a href="http://ben-peter.com/blog/generating-aggregate-content-packages-for-crx/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Your typical CQ or CRX project is multi-module, right? You have the typical collection of modules = artifacts = bundles and content packages: content, samplecontent, uiapp, core, taglib &#8211; you name them.</p>
<p>For cutting releases, it&#8217;s convenient to have just a single, defined artifact that aggregates all project artifacts into one, has a single version number, and is easily installed.</p>
<p>Including OSGi bundles for installation in a content package is easy enough, including content packages in other content packages on the other hand is not so common (but also easy enough). Here&#8217;s how it works:</p>
<ul>
<li>configure maven-vault-plugin</li>
<li>add the packages to include as dependencies</li>
<li>copy the packages into the aggregate package</li>
<li>adjust your vlt filter config</li>
<li>set the assembly package configuration (as usual)</li>
</ul>
<p><strong>configure maven-vault-plugin</strong>:</p>
<p>As always, configure maven-vault-plugin. Just use a different group than for your other packages, e.g. by appending &#8221; Releases&#8221;. Also, set your module&#8217;s packaging to content-bundle.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>com.day.jcr.vault<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>maven-vault-plugin<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;extensions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/extensions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;group<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>MyProject Releases<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/group<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;requiresRoot<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/requiresRoot<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;install<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/install<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;verbose<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/verbose<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;packageFile<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>${project.build.directory}/${project.build.finalName}.zip<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/packageFile<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>${project.version}<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p><strong>add the packages to include as dependencies:</strong></p>
<p>Just list them as regular dependencies, with the appropriate type (typically content-bundle).</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dependencies<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>my-project-groupid<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>uiapp<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>${project.version}<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;type<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>content-package<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/type<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>my-project-groupid<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>content<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>${project.version}<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;type<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>content-package<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/type<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>my-project-groupid<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>samplecontent<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>${project.version}<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;type<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>content-package<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/type<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dependencies<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p><strong>copy the packages into the aggregate package:</strong></p>
<p>Configure maven-dependency-plugin to copy the dependencies to /etc/packages/MyProject as shown below.<br />
You need to list out your artifacts in includeArtifacts.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>org.apache.maven.plugins<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>maven-dependency-plugin<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;executions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;execution<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>copy-packages<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;phase<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>prepare-package<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/phase<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;goals<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;goal<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>copy-dependencies<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/goal<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/goals<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;outputDirectory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    ${project.build.directory}/vault-work/jcr_root/etc/packages/MyProject
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/outputDirectory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;overWriteIfNewer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/overWriteIfNewer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;includeArtifactIds<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    uiapp,samplecontent,content
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/includeArtifactIds<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/execution<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/executions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p><b>adjust your vlt filter config (as usual)</b>:</p>
<p>Of course, your aggregate package needs to have an appropriate filter.xml, like so:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;workspaceFilter</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;filter</span> <span style="color: #000066;">root</span>=<span style="color: #ff0000;">&quot;/etc/packages/MyProject&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/workspaceFilter<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p><b>set the assembly package configuration (as usual)</b>:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>org.apache.maven.plugins<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>maven-assembly-plugin<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;executions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;execution<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>package-zip<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;phase<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>package<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/phase<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;goals<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;goal<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>single<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/goal<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/goals<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;appendAssemblyId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>false<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/appendAssemblyId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;descriptors<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;descriptor<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>src/main/assembly/package.xml<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/descriptor<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/descriptors<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/execution<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/executions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;assembly<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>zip<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;formats<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;format<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>zip<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/format<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/formats<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;includeBaseDirectory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>false<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/includeBaseDirectory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileSets<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileSet<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;directory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>${project.build.directory}/vault-work<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/directory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;outputDirectory</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/fileSet<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/fileSets<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/assembly<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>That&#8217;s it &#8211; now build your bundle with mvn package and you&#8217;ll get a neatly wrapped content bundle that contains your content bundles.</p>
<p><b>handling OSGi bundles</b></p>
<p>You can include your OSGi bundles directly in this bundle as well, or you can include them in your inner content bundles. Either way works. Above example takes the latter approach (so it cannot be seen and the examples are cleaner :)</p>
<p><b>adding metadata</b></p>
<p>As this is a regular content bundle, you can easily add custom content with release information, e.g. a file /etc/myapp-releaseinfo.txt that contains build number, etc.</p>
<div style='display:none' id="post-refEl-241"></div>]]></content:encoded>
			<wfw:commentRss>http://ben-peter.com/blog/generating-aggregate-content-packages-for-crx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FireCurl: copy a cURL command line from the Firebug net panel</title>
		<link>http://ben-peter.com/blog/firecurl-copy-a-curl-command-line-from-the-firebug-net-panel/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rss</link>
		<comments>http://ben-peter.com/blog/firecurl-copy-a-curl-command-line-from-the-firebug-net-panel/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 19:40:50 +0000</pubDate>
		<dc:creator>Ben Peter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ben-peter.com/blog/?p=194</guid>
		<description><![CDATA[I want exactly what my browser gets &#8211; at exactly the same price Get it:FireCurl-0.0.3.xpi AMO page FireCurl gives you a curl command line ready for pasting into your bash command line for any request in the Firebug net panel: &#8230; <a href="http://ben-peter.com/blog/firecurl-copy-a-curl-command-line-from-the-firebug-net-panel/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img src="http://ben-peter.com/blog/wp-content/uploads/firecurl-logo.png" alt="" title="firecurl-logo" width="256" height="256" class="aligncenter size-full wp-image-196" /></p>
<blockquote><p>I want exactly what my browser gets &#8211; at exactly the same price</p></blockquote>
<p><span id="more-194"></span><br />
<center><br />
Get it:<br /><a href="https://addons.mozilla.org/firefox/downloads/file/133893/firecurl-0.0.3-fx.xpi">FireCurl-0.0.3.xpi</a><br />
<a href="https://addons.mozilla.org/en-US/firefox/addon/firecurl/">AMO page</a><br />
</center></p>
<p>FireCurl gives you a curl command line ready for pasting into your bash command line for any request in the Firebug net panel:<br />
<img src="http://ben-peter.com/blog/wp-content/uploads/Screen-Shot-2011-10-05-at-16.10.56.png" alt="" title="FireCurl in action" width="882" height="707" class="aligncenter size-full wp-image-195" /></p>
<p>In:</p>
<ul>
<li>Request Parameters</li>
<li>Post and Put Parameters</li>
<li>Cookies</li>
<li>Headers</li>
</ul>
<p>Out:</p>
<ul>
<li>File Uploads</li>
</ul>
<div style='display:none' id="post-refEl-194"></div>]]></content:encoded>
			<wfw:commentRss>http://ben-peter.com/blog/firecurl-copy-a-curl-command-line-from-the-firebug-net-panel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building an XPI using Maven</title>
		<link>http://ben-peter.com/blog/building-an-xpi-using-maven/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rss</link>
		<comments>http://ben-peter.com/blog/building-an-xpi-using-maven/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 19:40:14 +0000</pubDate>
		<dc:creator>Ben Peter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://ben-peter.com/blog/?p=220</guid>
		<description><![CDATA[For FireCurl, I wanted to use maven to do the packaging of the resulting XPI file. Following below suggestions, you&#8217;ll be able to use the following for your Mozilla Extension project: # to build a new XPI mvn package &#160; &#8230; <a href="http://ben-peter.com/blog/building-an-xpi-using-maven/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>For FireCurl, I wanted to use maven to do the packaging of the resulting XPI file. </p>
<p>Following below suggestions, you&#8217;ll be able to use the following for your Mozilla Extension project:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># to build a new XPI</span>
mvn package
&nbsp;
<span style="color: #666666; font-style: italic;"># to cycle versions in the POM, tag and build</span>
mvn release:prepare</pre></div></div>

<p>Automatic submission to AMO is missing so far.<br />
<span id="more-220"></span><br />
The directory structure is pretty simple and what you&#8217;d expect:</p>
<pre>
.
└── src
    └── main
        ├── assembly
        └── resources
            ├── chrome
            │   ├── content
            │   │   └── firecurl
            │   ├── locale
            │   │   └── en-US
            │   └── skin
            │       └── classic
            └── defaults
                └── preferences
</pre>
<p>In your pom, you need to configure the maven assembly plugin to create a .xpi file from the contents in resources/. (lines 29-47 below).<br />
The descriptor (src/main/assembly/xpi.xml) defines how the file is packaged (more below).<br />
Unfortunately, the finalName configuration parameter is appending &#8220;-xpi.zip&#8221; and I couldn&#8217;t find how to prevent that. This is why starting at line 49, I use an antrun target to move the file.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;project</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://maven.apache.org/POM/4.0.0&quot;</span> <span style="color: #000066;">xmlns:xsi</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span> <span style="color: #000066;">xsi:schemaLocation</span>=<span style="color: #ff0000;">&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;modelVersion<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>4.0.0<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/modelVersion<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>cx.bp.moz<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>firecurl<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;packaging<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>pom<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/packaging<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>0.0.3-SNAPSHOT<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>FireCurl<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;scm<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;connection<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>scm:svn:http://ben-peter.jira.com/svn/FIRECURL/trunk<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/connection<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;developerConnection<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>scm:svn:https://ben-peter.jira.com/svn/FIRECURL/trunk<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/developerConnection<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;url<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>https://ben-peter.jira.com/source/browse/FIRECURL/trunk<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/url<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/scm<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;build<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugins<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>maven-release-plugin<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>2.2.1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;releaseProfiles<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>release<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/releaseProfiles<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;goals<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>package<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/goals<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;tagBase<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>https://ben-peter.jira.com/svn/FIRECURL/tags<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/tagBase<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>maven-assembly-plugin<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>2.2-beta-5<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;descriptors<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;descriptor<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>src/main/assembly/xpi.xml<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/descriptor<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/descriptors<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;finalName<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>${project.name}-${project.version}.xpi<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/finalName<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;executions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;execution<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>make-assembly<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;phase<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>prepare-package<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/phase<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;goals<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;goal<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>single<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/goal<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/goals<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/execution<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/executions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>maven-antrun-plugin<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1.6<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;executions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;execution<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;phase<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>package<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/phase<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;move</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${project.build.directory}/${project.name}-${project.version}.xpi-xpi.zip&quot;</span> <span style="color: #000066;">tofile</span>=<span style="color: #ff0000;">&quot;${project.build.directory}/${project.name}-${project.version}.xpi&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;goals<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;goal<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>run<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/goal<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/goals<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/execution<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/executions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugins<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/build<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/project<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>The assembly descriptor just packs all the stuff in resources/ into the XPI.<br />
The one exception is that it filters the install.rdf file, so that the version number can be substituted in that file</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;assembly</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0&quot;</span></span>
<span style="color: #009900;">          <span style="color: #000066;">xmlns:xsi</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span></span>
<span style="color: #009900;">          <span style="color: #000066;">xsi:schemaLocation</span>=<span style="color: #ff0000;">&quot;http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>xpi<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;includeBaseDirectory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>false<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/includeBaseDirectory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;formats<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;format<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>zip<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/format<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/formats<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileSets<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileSet<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;outputDirectory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>/<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/outputDirectory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;directory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>src/main/resources<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/directory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;excludes<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;exclude<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>install.rdf<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/exclude<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/excludes<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/fileSet<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileSet<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;outputDirectory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>/<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/outputDirectory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;directory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>src/main/resources<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/directory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;includes<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;include<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>install.rdf<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/include<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/includes<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;filtered<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/filtered<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/fileSet<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/fileSets<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/assembly<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Substitution in the install.rdf looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;RDF</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;</span></span>
<span style="color: #009900;">     <span style="color: #000066;">xmlns:em</span>=<span style="color: #ff0000;">&quot;http://www.mozilla.org/2004/em-rdf#&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Description</span> <span style="color: #000066;">about</span>=<span style="color: #ff0000;">&quot;urn:mozilla:install-manifest&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;em:id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>firecurl@bp.cx<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/em:id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;em:version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>${project.version}<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/em:version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;em:iconURL<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>chrome://firecurl/skin/firecurl32.png<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/em:iconURL<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;em:targetApplication<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;em:id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/em:id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;em:minVersion<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1.5<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/em:minVersion<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;em:maxVersion<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>7.*<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/em:maxVersion<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;em:type<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>2<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/em:type<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/em:targetApplication<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;em:name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>FireCurl<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/em:name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;em:description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Copy and paste a curl command line for any request in the Firebug Net Panel.<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/em:description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;em:creator<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Ben Peter, bp@ben-peter.com<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/em:creator<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;em:homepageURL<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>http://ben-peter.com/<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/em:homepageURL<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/RDF<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<div style='display:none' id="post-refEl-220"></div>]]></content:encoded>
			<wfw:commentRss>http://ben-peter.com/blog/building-an-xpi-using-maven/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing a jar file to your local maven repository (fast)</title>
		<link>http://ben-peter.com/blog/installing-a-jar-file-to-your-local-maven-repository-fast/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rss</link>
		<comments>http://ben-peter.com/blog/installing-a-jar-file-to-your-local-maven-repository-fast/#comments</comments>
		<pubDate>Thu, 15 Sep 2011 16:30:30 +0000</pubDate>
		<dc:creator>Ben Peter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://ben-peter.com/blog/?p=183</guid>
		<description><![CDATA[There&#8217;s mvn:install-file, yes. But it happens pretty often that the jar file you want to install already has a pom.xml in it that contains the information required on the command line and can be reused so that all you really &#8230; <a href="http://ben-peter.com/blog/installing-a-jar-file-to-your-local-maven-repository-fast/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s <a href="http://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html">mvn:install-file</a>, yes.<br />
But it happens pretty often that the jar file you want to install already has a pom.xml in it that contains the information required on the command line and can be reused so that all you really should need to specify is the jar file you want to install.<br />
The way it is, things are particularly inconvenient if you need to <a href="http://dev.day.com/docs/en/cq/current/developing/developmenttools/developing_with_eclipse.html#Central dependency management with Apache Archiva">get 150+ jar files into your local repository</a>.</p>
<p>Although this should go into mvn:install, here&#8217;s a quick-fix. Just call it with the filename of the jar file to install. Um, and do this in a tmp space, this leaves clutter.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #007800;">filename</span>=<span style="color: #007800;">$1</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;x<span style="color: #007800;">$filename</span>&quot;</span> = <span style="color: #ff0000;">&quot;x&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;please feed me a file&quot;</span>
	<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>;
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #007800;">POM</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span>jar tf <span style="color: #007800;">$filename</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> pom.xml<span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;$?&quot;</span> <span style="color: #660033;">-ne</span> <span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;no pom.xml in file <span style="color: #007800;">$filename</span>. cannot automatically install this&quot;</span>
	<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">2</span>;
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #007800;">POM</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$POM</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">head</span> -<span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;proceeding with POM <span style="color: #007800;">$POM</span>&quot;</span>
&nbsp;
jar xf <span style="color: #007800;">$filename</span> <span style="color: #007800;">$POM</span>
&nbsp;
mvn <span style="color: #c20cb9; font-weight: bold;">install</span>:install-file <span style="color: #660033;">-Dfile</span>=<span style="color: #007800;">$filename</span> <span style="color: #660033;">-DpomFile</span>=<span style="color: #007800;">$POM</span></pre></div></div>

<p>And here&#8217;s the complete goodness for shuffling all artefacts from a running CQ instance into your local maven repository:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-z</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$CRX_URL</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #007800;">CRX_URL</span>=http:<span style="color: #000000; font-weight: bold;">//</span>localhost:<span style="color: #000000;">4502</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-z</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$CRX_CREDENTIALS</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #007800;">CRX_CREDENTIALS</span>=admin:admin
&nbsp;
curl <span style="color: #660033;">-H</span> x-crxde-version:<span style="color: #000000;">1.0</span> <span style="color: #660033;">-H</span> x-crxde-os:mac <span style="color: #660033;">-H</span> x-crxde-profile:default <span style="color: #660033;">-u</span> <span style="color: #007800;">$CRX_CREDENTIALS</span> <span style="color: #007800;">$CRX_URL</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>crxde.classpath.xml <span style="color: #000000; font-weight: bold;">&gt;</span> .classpath
<span style="color: #007800;">FILE_LIST</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">cat</span> .classpath <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">'/lib/s/.*WebContent\(.*\)\&quot;.*/\1/p'</span><span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #000000; font-weight: bold;">for</span> <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #007800;">$FILE_LIST</span>; <span style="color: #000000; font-weight: bold;">do</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Downloading <span style="color: #007800;">$file</span>&quot;</span>
	curl <span style="color: #660033;">-u</span> <span style="color: #007800;">$CRX_CREDENTIALS</span> <span style="color: #007800;">$CRX_URL</span><span style="color: #007800;">$file</span> <span style="color: #660033;">-O</span>
<span style="color: #000000; font-weight: bold;">done</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">for</span> filename <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">*</span>.jar; <span style="color: #000000; font-weight: bold;">do</span>
	<span style="color: #007800;">POM</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span>jar tf <span style="color: #007800;">$filename</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> pom.xml<span style="color: #7a0874; font-weight: bold;">&#41;</span>
	<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;$?&quot;</span> <span style="color: #660033;">-ne</span> <span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
		<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;no pom.xml in file <span style="color: #007800;">$filename</span>. cannot automatically install this&quot;</span>
	<span style="color: #000000; font-weight: bold;">else</span>
		<span style="color: #007800;">POM</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$POM</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">head</span> -<span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
		<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;proceeding with POM <span style="color: #007800;">$POM</span>&quot;</span>
&nbsp;
		jar xf <span style="color: #007800;">$filename</span> <span style="color: #007800;">$POM</span>
&nbsp;
		mvn <span style="color: #c20cb9; font-weight: bold;">install</span>:install-file <span style="color: #660033;">-Dfile</span>=<span style="color: #007800;">$filename</span> <span style="color: #660033;">-DpomFile</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$POM</span>&quot;</span>
	<span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000; font-weight: bold;">done</span></pre></div></div>

<div style='display:none' id="post-refEl-183"></div>]]></content:encoded>
			<wfw:commentRss>http://ben-peter.com/blog/installing-a-jar-file-to-your-local-maven-repository-fast/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Content cake with data raisins</title>
		<link>http://ben-peter.com/blog/content-cake-with-data-raisins/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rss</link>
		<comments>http://ben-peter.com/blog/content-cake-with-data-raisins/#comments</comments>
		<pubDate>Fri, 28 Jan 2011 17:11:29 +0000</pubDate>
		<dc:creator>Ben Peter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ben-peter.com/blog/?p=154</guid>
		<description><![CDATA[(This post is also available on dev.day.com) In your typical CMS setup, most of the content is actively managed as such. But you often come across scenarios where other data needs to appear on a page, e.g. prices or product &#8230; <a href="http://ben-peter.com/blog/content-cake-with-data-raisins/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>(This post is also available on <a href="http://dev.day.com/content/ddc/blog/2011/01/content_cake_withda.html">dev.day.com</a>)</p>
<p>In your typical CMS setup, most of the content is actively managed as such. But you often come across scenarios where other data needs to appear on a page, e.g. prices or product data that are provided by external sources and change on their own schedule.</p>
<p>There are various way to handle such a requirement, each with its own upsides and downsides. </p>
<p><span id="more-154"></span></p>
<p><a href="http://ben-peter.com/blog/wp-content/uploads/iStock_000015286280XSmall.jpg"><img src="http://ben-peter.com/blog/wp-content/uploads/iStock_000015286280XSmall.jpg" alt="" title="Content cake with data raisins" width="283" height="424" class="alignright size-full wp-image-155" /></a> One obvious way would be to access the data from within the CMS domain, i.e. build a component that reaches out to the data source and renders the appropriate data accordingly. It&#8217;s straightforward to implement, the only variation being the complexity of data access (which is involved anyways).<br />
The one issue with this approach is that it will leave your page uncacheable to make sure that the data is always up to date. Every request to the page needs to hit the Publisher so that the component can reach out to the data source and pull the most recent data. Caching that page on a Dispatcher or CDN level is out of the question.</p>
<p>If you want a page that doesn&#8217;t hit the Publisher and can be cached by the Dispatcher and on the CDN, you can take a slightly different approach: build a component that in edit mode will allow you to pull updated data from the data source, and store it as part of the page&#8217;s content. In publish mode the data will be rendered just as the rest of the page&#8217;s content.<br />
The issue with data updates is not eliminated, but it&#8217;s now pushed to the authoring side. On the publisher, the page is fully cacheable, but you need to make sure that whenever the data changes, the page is activated. That can happen automatically, if you have technical ways to be notified of data changes, or can be organizational (read: phone call). Altough technically often not a problem, the automated update often is impossible because the involved pages contain other content that may or may not be ready for activation and still need to be checked by a human. Or they are simply part of a review and approval workflow that is not certain to complete within the time that the data is allowed to be out of date on the public-facing systems.<br />
From an implementation perspective, this option is slightly more complex than the previous option.</p>
<p>If there is a need to update the data in the page in a fully automated fashion, there are more options available that merge content and data not at the time the page is baked, but on the webserver or in the browser.</p>
<p>Bringing data and content together in the browser is easily done through AJAX requests, as long as you can expose the data source in a way that will give you the right data per page as e.g. JSON. For both performance and information control reasons, you want to put a layer on top of the data source that will not simply spit out all of the data, but just the data that are required for that particular page.<br />
This approach works well, is very simple to implement, and matches the second approach in terms of cacheability: the page can be cached at all levels. A request for the page can be offloaded at a CDN layer and from the Dispatcher cache. Only an activation of the page due to content changes will require these layers to be purged or invalidated. The delivery layer on top of the data source can follow its own caching strategy.<br />
The approach may be inappropriate if the display of data must not be deferred until the request for the data is complete, or if it must not depend on Javascript being available. While today such restrictions are typically not considered important from a user experience point of view, legal requirements can often enforce that a page be either displayed completely with accurate information and independent of Javascript, or not at all. </p>
<p>That leads to the fourth option that&#8217;s available which allows for good cacheability, data accuracy and user agent compatibility. Instead of aggregating in the browser, the aggregation is performed on the webserver.<br />
For that, a layer is built on top of the data source that renders HTML fragments that go into the page. The respective CQ component does nothing but render an appropriate SSI statement that fetches the HTML fragment from the data rendering layer and plugs it into the page. As typically SSI does not allow you to include remote sources, a reverse proxy is required to make the data available as a local path if the data source is not deployed within the same virtual host.<br />
That leaves the page cacheable on the publisher: the page including the SSI statement is pulled from the dispatcher cache, SSI statements are evaluated, and the page is then returned to the requesting layer &#8211; either the CDN, a proxy, or a browser. It can however not be cached at a CDN level, as for data consistency the webserver needs to re-perform the SSI on each request.<br />
In terms of implementation this option is pretty simple, but you want to make sure you have someone handy who knows your webserver well.</p>
<p>For completeness&#8217; sake, there&#8217;s an option that has similar characteristics as the first option in terms of cacheability and process interdependencies but is slightly more complex to implement. If you can afford to hit the Publisher on each request and your data source has a hierarchical structure, you can choose to make it visible to Sling as resources within the repository. This is typically only worth the effort if that data is used in many different scenarios and if it is semantically part of your content, but not managed as such because it comes from an established source that is outside of the system&#8217;s domain.</p>
<p>Which of these options is appropriate is up to the concrete situation. None of them can be generally ruled out or recommended, although it may be considered bad manners to introduce interdependencies between content publication and data update processes, which the first two and the fifth option do.</p>
<div style='display:none' id="post-refEl-154"></div>]]></content:encoded>
			<wfw:commentRss>http://ben-peter.com/blog/content-cake-with-data-raisins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exploiting Firefox Bookmark Keywords and %s for CQ5, CRX (and whatever)</title>
		<link>http://ben-peter.com/blog/exploiting-firefox-bookmark-keywords-and-s-for-cq5-crx-and-whatever/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rss</link>
		<comments>http://ben-peter.com/blog/exploiting-firefox-bookmark-keywords-and-s-for-cq5-crx-and-whatever/#comments</comments>
		<pubDate>Thu, 13 Jan 2011 14:03:48 +0000</pubDate>
		<dc:creator>Ben Peter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ben-peter.com/blog/?p=146</guid>
		<description><![CDATA[Having a hard time bookmarking all the relevant URLs to CRX, CRX Explorer, Felix Console, &#038;c. for all of those dozens of development, staging, production, stresstest, and so on environments? Here&#8217;s a simple hack for Firefox: create a bookmark to &#8230; <a href="http://ben-peter.com/blog/exploiting-firefox-bookmark-keywords-and-s-for-cq5-crx-and-whatever/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Having a hard time bookmarking all the relevant URLs to CRX, CRX Explorer, Felix Console, &#038;c. for all of those dozens of development, staging, production, stresstest, and so on environments?</p>
<p>Here&#8217;s a simple hack for Firefox:</p>
<ul>
<li>create a bookmark to the most common URL, including the endpoint in the system, and susbstitute the changing part with <code>%s</code> e.g. <code>http://%s.cq-vpn.company.com/crx/browser/index.jsp</code></li>
<li>Go to the bookmark&#8217;s preferences and give it a keyword, e.g. <code>crxb</code>.</li>
</ul>
<p>After that, all you need to type into the URL bar is <code>crxb author-1.development</code> to get to <code>http://author-1.development.cq-vpn.company.com/crx/browser/index.jsp</code></p>
<p>Granted, no big science here, but helps to get there quickly without maintaining dozens of bookmarks.</p>
<p><img src="http://ben-peter.com/blog/wp-content/uploads/fire.jpg" alt="" title="fire" width="693" height="289" class="aligncenter size-full wp-image-150" /></p>
<div style='display:none' id="post-refEl-146"></div>]]></content:encoded>
			<wfw:commentRss>http://ben-peter.com/blog/exploiting-firefox-bookmark-keywords-and-s-for-cq5-crx-and-whatever/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Poor man&#8217;s Voice 2 RTM on the iPhone (non-Jott)</title>
		<link>http://ben-peter.com/blog/poor-mans-voice-2-rtm-on-the-iphone-non-jott/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rss</link>
		<comments>http://ben-peter.com/blog/poor-mans-voice-2-rtm-on-the-iphone-non-jott/#comments</comments>
		<pubDate>Mon, 10 Jan 2011 12:08:35 +0000</pubDate>
		<dc:creator>Ben Peter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ben-peter.com/blog/?p=137</guid>
		<description><![CDATA[We buggers in the old world can&#8217;t use Jott. Sigh. I wish I could talk to my phone and have a task appear on RTM. Just that alone. I tried to sign up, as my mobile plan gives me free &#8230; <a href="http://ben-peter.com/blog/poor-mans-voice-2-rtm-on-the-iphone-non-jott/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>We buggers in the old world can&#8217;t use Jott. Sigh. I wish I could talk to my phone and have a task appear on RTM. Just that alone. I tried to sign up, as my mobile plan gives me free US calls, but alas: you actually need a US number to even sign up for Jott.</p>
<p><img src="http://ben-peter.com/blog/wp-content/uploads/7295210-man-yelling-into-telepone.jpg" alt="" title="talk to your phone" width="693" height="693" class="aligncenter size-full wp-image-141" /></p>
<p>So what then? The best alternative I found was to use <a href="http://www.dragonmobileapps.com/apple/dictation.html">Dragon Dictation on the iPhone</a>. It&#8217;s an impressive Voice-to-Text Application and allows you to copy to the clipboard, send by mail, post to twitter and facebook.</p>
<p><span id="more-137"></span><br />
That&#8217;s a start, but still a lot of steps to get a task from spoken words to RTM:</p>
<ul>
<li> talk, push &#8220;stop&#8221; (the &#8220;recognize end of text&#8221; option doesn&#8217;t work too well)</li>
<li>- hit &#8220;email&#8221;</li>
<li>- cut the text body and paste it to the subject line</li>
<li>- select &#8220;qqq&#8221; as the recipient (the alias of my RTM inbox)</li>
<li>- hit &#8220;send&#8221;</li>
</ul>
<p>Considering this as a collecting process in terms of TRO, that&#8217;s too much by far. Here&#8217;s a little tweak to elimiate the cut &#038; paste step, using procmail:</p>
<p>Step 1: create a script that rewrites the mail body to the subject line:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #007800;">MSGBODY</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span>formail <span style="color: #660033;">-I</span> <span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">tr</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\r</span>&quot;</span> <span style="color: #ff0000;">&quot;  &quot;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;List: Inbox&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> mail <span style="color: #660033;">-s</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$MSGBODY</span>&quot;</span> <span style="color: #ff0000;">&quot;yourinbox@rmilk.com&quot;</span></pre></div></div>

<p>Step 2: setup a procmail filter for a specific address that pipes to that script</p>
<pre>
:0 :
* ^To:.*yourownsecret@ddress.com
| rewrite-body-subject.sh
</pre>
<p>That condenses the steps to </p>
<ul>
<li> talk, push &#8220;stop&#8221; (the &#8220;recognize end of text&#8221; option doesn&#8217;t work too well)</li>
<li>- hit &#8220;email&#8221;</li>
<li>- select &#8220;qqq&#8221; as the recipient (the alias of my RTM inbox)</li>
<li>- hit &#8220;send&#8221;</li>
</ul>
<p>Still too long. My preferred solution would be a wristwatch that I can talk to to add a task to my RTM inbox. Not coming anytime soon I guess. Jott for Europe would do for a start.</p>
<div style='display:none' id="post-refEl-137"></div>]]></content:encoded>
			<wfw:commentRss>http://ben-peter.com/blog/poor-mans-voice-2-rtm-on-the-iphone-non-jott/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>.bat Scripted Content Backups in CQ 5.x</title>
		<link>http://ben-peter.com/blog/bat-scripted-content-backups-in-cq-5-x/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rss</link>
		<comments>http://ben-peter.com/blog/bat-scripted-content-backups-in-cq-5-x/#comments</comments>
		<pubDate>Tue, 07 Dec 2010 21:05:54 +0000</pubDate>
		<dc:creator>Ben Peter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cq5]]></category>
		<category><![CDATA[day]]></category>

		<guid isPermaLink="false">http://ben-peter.com/blog/?p=129</guid>
		<description><![CDATA[Here&#8217;s just a trivial bit of script that builds a defined content package and pulls it from the server. The curl part is pretty easy and didn&#8217;t take much after a brief look in Firebug (although I do miss a &#8230; <a href="http://ben-peter.com/blog/bat-scripted-content-backups-in-cq-5-x/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s just a trivial bit of script that builds a defined content package and pulls it from the server.</p>
<p>The curl part is pretty easy and didn&#8217;t take much after a brief look in Firebug (although I do miss a &#8220;copy as curl command&#8221; content menu entry in Firebug&#8217;s net panel ;-).</p>
<p>What was harder was to find a way to put a timestamp into a filename in a windows .bat file. I&#8217;m sure there are smarter ways to do this (including but not limited to installing bash ;-), but here&#8217;s what I came up with.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
</pre></td><td class="code"><pre class="dos" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">Rem set group and package name as in package manager</span>
<span style="color: #b1b100; font-weight: bold;">Set</span> GROUP=packagegroup
<span style="color: #b1b100; font-weight: bold;">Set</span> PACKAGE=packagename
<span style="color: #b1b100; font-weight: bold;">Set</span> HOST=hostname
&nbsp;
<span style="color: #b1b100; font-weight: bold;">Set</span> CURRDATE=<span style="color: #33cc33;">%</span><span style="color: #448888;">TEMP</span><span style="color: #33cc33;">%</span>\CURRDATE.TMP
<span style="color: #b1b100; font-weight: bold;">Set</span> CURRTIME=<span style="color: #33cc33;">%</span><span style="color: #448888;">TEMP</span><span style="color: #33cc33;">%</span>\CURRTIME.TMP
&nbsp;
DATE /T <span style="color: #33cc33;">&gt;</span> <span style="color: #33cc33;">%</span><span style="color: #448888;">CURRDATE</span><span style="color: #33cc33;">%</span>
TIME /T <span style="color: #33cc33;">&gt;</span> <span style="color: #33cc33;">%</span><span style="color: #448888;">CURRTIME</span><span style="color: #33cc33;">%</span>
&nbsp;
<span style="color: #b1b100; font-weight: bold;">Set</span> PARSEARG=&quot;eol=; tokens=1,2,3,4* delims=/, &quot;
<span style="color: #00b100; font-weight: bold;">For</span> /F <span style="color: #33cc33;">%</span><span style="color: #448888;">PARSEARG</span><span style="color: #33cc33;">%</span> <span style="color: #33cc33;">%%</span><span style="color: #448888;">i</span> <span style="color: #00b100; font-weight: bold;">in</span> <span style="color: #33cc33;">(%</span><span style="color: #448888;">CURRDATE</span><span style="color: #33cc33;">%)</span> <span style="color: #00b100; font-weight: bold;">Do</span> <span style="color: #b1b100; font-weight: bold;">SET</span> YYYYMMDD=<span style="color: #33cc33;">%%</span><span style="color: #448888;">l</span><span style="color: #33cc33;">%%</span><span style="color: #448888;">k</span><span style="color: #33cc33;">%%</span><span style="color: #448888;">j</span>
&nbsp;
<span style="color: #b1b100; font-weight: bold;">Set</span> PARSEARG=&quot;eol=; tokens=1,2,3* delims=:, &quot;
<span style="color: #00b100; font-weight: bold;">For</span> /F <span style="color: #33cc33;">%</span><span style="color: #448888;">PARSEARG</span><span style="color: #33cc33;">%</span> <span style="color: #33cc33;">%%</span><span style="color: #448888;">i</span> <span style="color: #00b100; font-weight: bold;">in</span> <span style="color: #33cc33;">(%</span><span style="color: #448888;">CURRTIME</span><span style="color: #33cc33;">%)</span> <span style="color: #00b100; font-weight: bold;">Do</span> <span style="color: #b1b100; font-weight: bold;">Set</span> HHMM=<span style="color: #33cc33;">%%</span><span style="color: #448888;">i</span><span style="color: #33cc33;">%%</span><span style="color: #448888;">j</span><span style="color: #33cc33;">%%</span><span style="color: #448888;">k</span>
<span style="color: #808080; font-style: italic;">
Rem -k is only needed if you have a self-signed cert</span>
curl -k -u admin:admin -o backup-<span style="color: #33cc33;">%</span><span style="color: #448888;">YYYYMMDD</span><span style="color: #33cc33;">%%</span><span style="color: #448888;">HHMM</span><span style="color: #33cc33;">%</span>.html -F cmd=build https://<span style="color: #33cc33;">%</span><span style="color: #448888;">HOST</span><span style="color: #33cc33;">%</span>/etc/packages/<span style="color: #33cc33;">%</span><span style="color: #448888;">GROUP</span><span style="color: #33cc33;">%</span>/<span style="color: #33cc33;">%</span><span style="color: #448888;">PACKAGE</span><span style="color: #33cc33;">%</span>.zip/jcr:content.console.html
curl -k -u admin:admin -o backup-<span style="color: #33cc33;">%</span><span style="color: #448888;">YYYYMMDD</span><span style="color: #33cc33;">%%</span><span style="color: #448888;">HHMM</span><span style="color: #33cc33;">%</span>.zip https://<span style="color: #33cc33;">%</span><span style="color: #448888;">HOST</span><span style="color: #33cc33;">%</span>/etc/packages/<span style="color: #33cc33;">%</span><span style="color: #448888;">GROUP</span><span style="color: #33cc33;">%</span>/<span style="color: #33cc33;">%</span><span style="color: #448888;">PACKAGE</span><span style="color: #33cc33;">%</span>.zip.res/<span style="color: #33cc33;">%</span><span style="color: #448888;">PACKAGE</span><span style="color: #33cc33;">%</span>.zip</pre></td></tr></table></div>

<div style='display:none' id="post-refEl-129"></div>]]></content:encoded>
			<wfw:commentRss>http://ben-peter.com/blog/bat-scripted-content-backups-in-cq-5-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Social Media: don&#8217;t invade, don&#8217;t shout or babble</title>
		<link>http://ben-peter.com/blog/social-media-dont-invade-dont-shout-or-babble/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rss</link>
		<comments>http://ben-peter.com/blog/social-media-dont-invade-dont-shout-or-babble/#comments</comments>
		<pubDate>Fri, 05 Nov 2010 08:32:50 +0000</pubDate>
		<dc:creator>Ben Peter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ben-peter.com/blog/?p=123</guid>
		<description><![CDATA[After I checked in at the airport on foursquare recently, I received a reply from the airport via twitter, wishing me a good flight. OK, thanks @Airport_FRA &#8211; have a great day and take care. This interaction was one permutation &#8230; <a href="http://ben-peter.com/blog/social-media-dont-invade-dont-shout-or-babble/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After I checked in at the airport on foursquare recently, I received a reply from the airport via twitter, wishing me a good flight. OK, thanks @<a href="http://twitter.com/Airport_FRA">Airport_FRA</a> &#8211; have a great day and take care.</p>
<p>This interaction was one permutation of an often-seen interpretation and implementation of personal interaction through social media. Some thoughs on this:</p>
<ul>
<li>Social media are the consumers&#8217; domain.</li>
<li>Make it easy to spread your message, don&#8217;t invade.</li>
<li>Listen and respond, don&#8217;t shout or babble.</li>
</ul>
<p><em><strong><span id="more-123"></span>Social media are the consumers&#8217; domain</strong></em><em>. </em>What&#8217;s facebook, twitter, youtube to a consumer? A medium to communicate with friends, with people they know personally (which does not necessarily mean they have met in person). It&#8217;s the fast and easy way to share something cool they&#8217;ve found. Yes, it does vary by channel &#8211; you find more people actually publishing on youtube and more 1:1 interaction on facebook. But the point here is: these are places that consumers use to update and be updated on their personal relationships (loose and close). They are not typically places where people go to pull information.</p>
<p><em><strong>Make it easy to spread your message, don&#8217;t invade</strong>. </em>So how do you approach social media from a marketing perspective? You certainly don&#8217;t want to flood the channels and hope that people will &#8220;Like&#8221; what you say or retweet. The channels are already full with non-statements and junk, and there&#8217;s no point in <em>you</em> repeating what you already said elsewhere.</p>
<p><a href="http://ben-peter.com/blog/wp-content/uploads/stonewall-ladder.jpg"><img class="aligncenter size-full wp-image-124" title="stonewall-ladder" src="http://ben-peter.com/blog/wp-content/uploads/stonewall-ladder.jpg" alt="" width="780" height="519" /></a></p>
<p>What does get you buzz and recognition is if <em>others</em> repeat what you already said, if people pick things up and tell their personal network about them. This takes an anonymous marketing message to a personal level, and actual someone is saying something about your brand or product, or at least quoting your message &#8211; with the effect that</p>
<p style="padding-left: 30px;">a) your message get&#8217;s heard (at all)<br />
b) it&#8217;s amplified by the recognition that the quoting person has</p>
<p>To enable that effect, the first thing you want to ensure is that people can easily relay your message to social networks, and that&#8217;s not hard to do. Tweet-Buttons, Like-Buttons are easy to start with, and it&#8217;s also not hard to go to the next levels of pointedness, like specifying what image and text goes with the user&#8217;s message if he shares on facebook.</p>
<p><em><strong>Listen and respond, don&#8217;t shout or babble.</strong> </em>So now people talk about your products, they pick up your campaign&#8217;s statements, amplify your message, great. The next thing to do is to listen carefully to what people have to say, both on your campaigns but also outside of them. On social media, people talk openly about you or directly to you. Get back to them and so engage in the conversation that&#8217;s taking place.</p>
<p>That&#8217;s also not something that is hard to do, but it requires people that mindfully respond to what consumers have to say. This is <em>not</em> about a bot that bounces back canned responses according to a smart rule set.</p>
<p><a href="http://ben-peter.com/blog/wp-content/uploads/shout.jpg"><img class="aligncenter size-full wp-image-125" title="shout" src="http://ben-peter.com/blog/wp-content/uploads/shout.jpg" alt="" width="566" height="422" /></a></p>
<p>Adding to the experience I made at the Frankfurt International Airport, after going through security, I followed the signs to the Lufthansa lounges, about a half-mile walk from my departure gate. When I got there, I found that they are redoing the lounge and had closed it for Frequent Travelers, allowing only Senators and HONs in. I vented my frustration and tweeted</p>
<p style="padding-left: 30px;">&#8220;@<a rel="nofollow" href="http://twitter.com/Lufthansa_DE">Lufthansa_DE</a> Lounge FRA closed for Business / Frequent Flyers, but no mention until you reach the lounge entry. <a title="#fail" rel="nofollow" href="http://twitter.com/#%21/search?q=%23fail">#fail</a>&#8220;</p>
<p>That&#8217;s the moments where it makes sense for a company to take action and respond, but the following tweet never came.</p>
<p style="padding-left: 30px;">&#8220;Sorry for the inconvenience @ben_peter! Shoot us your Miles and More number and we&#8217;ll credit you 1m miles&#8221;</p>
<p>Seriously: listen and respond to real concerns. That&#8217;ll be recognized, noted, appreciated. Don&#8217;t just pump out junk responses to get meaningless &#8220;buzz&#8221;.</p>
<div style='display:none' id="post-refEl-123"></div>]]></content:encoded>
			<wfw:commentRss>http://ben-peter.com/blog/social-media-dont-invade-dont-shout-or-babble/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Location based DRM: just a bad dream?</title>
		<link>http://ben-peter.com/blog/location-based-drm-just-a-bad-dream/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rss</link>
		<comments>http://ben-peter.com/blog/location-based-drm-just-a-bad-dream/#comments</comments>
		<pubDate>Thu, 21 Oct 2010 08:39:38 +0000</pubDate>
		<dc:creator>Ben Peter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ben-peter.com/blog/?p=119</guid>
		<description><![CDATA[Last night, I went to see Sting in Frankfurt. He&#8217;s currently on tour with the Royal Philharmonic Concert Orchestra, and it was a great concert. As usual, audio and video recording was forbidden, and just as usual everyone ignored it, &#8230; <a href="http://ben-peter.com/blog/location-based-drm-just-a-bad-dream/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Last night, I went to see <a href="http://www.sting.com/">Sting</a> in Frankfurt. He&#8217;s currently on tour with the Royal Philharmonic Concert Orchestra, and it was a great concert.</p>
<p>As usual, audio and video recording was forbidden, and just as usual everyone ignored it, taking pictures and videos with their mobiles.</p>
<p>Although I cannot see why exactly people do this, spending time with their devices instead of listening, I have a feeling that certain rights owners must be freaking out about this, but it would go too far to forbid mobile phones at concerts.</p>
<p>So I started wondering if at some point we&#8217;ll see some kind of location based DRM? Granted, not all devices have geolocation information, but for one thing coverage is getting greater (especially for devices which can shoot good videos), and there&#8217;s also some near-range communication technology that could be exploited (like Wifi, Bluetooth, RFID). Doesn&#8217;t have to be based on GPS.</p>
<p>Maybe this is far-fetched, but looking at the effort that is put into preventing people from digitizing what their eyes can see and their ears can see, it doesn&#8217;t seem completely out of range.</p>
<div style='display:none' id="post-refEl-119"></div>]]></content:encoded>
			<wfw:commentRss>http://ben-peter.com/blog/location-based-drm-just-a-bad-dream/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

