you can has:
<Include-Resource>
{maven-resources}, {maven-dependencies},
templates=src/resources/templates
</Include-Resource>
inside maven-bundle-plugin
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.0.1</version>
<extensions>true</extensions>
<configuration>
<instructions>
...
<Include-Resource>
{maven-resources}, {maven-dependencies},
templates=src/resources/templates
</Include-Resource>
...
</instructions>
</configuration>
</plugin>
You need {maven-resources} and {maven-dependencies} or mvn packages fails.
And it is dst-pat-in-the-jar=src (templates=src/resources/templates)
Thursday, April 28, 2011
Wednesday, April 27, 2011
sling mapping /etc/map
You can test jcr resolving stuff under http://localhost:4502/system/console/jcrresolver
- make /etc/map nt:unstructured so that you can order stuff there in crxde lite (sling:match regexes are applied from top to bottom)
- I use only one level deep (/etc/map/foo, /etc/map/bar)
- The string matched against sling:match regexes have the following format: <protocol>/<host>.<port><path> (for example, http/example.com.4502/content/mcdonalds/en.html)
- you can use it to redirect /foo/bar/ to /content/site/en/foo/bar.html
- not sure how short paths like /foo/bar/ will work with replication :P
sling:OsgiConfig for multiple run modes
You can have multiple run modes and have CQ (or Sling.. I don't know) select proper sling:OsgiConfigs.
For example, if your run modes are a,b config.a.b are applied:
Probably order of run modes are important. And I'm not sure if more than two run modes will work.
TODO:
test what configuration is selected...
For example, if your run modes are a,b config.a.b are applied:
- author,production
- /apps/<foo>/config.author.production/*
- author,staging
- /apps/<foo>/config.author.staging/*
- publish,production
- /apps/<foo>/config.publish.production/*
Probably order of run modes are important. And I'm not sure if more than two run modes will work.
TODO:
- author,production,foo,bar
- /apps/<foo>/config.author.production.foo.bar/*
- /apps/<bar>/config.author.production.foo.bar/*
- /apps/<foo>/config/config.author.production.foo.bar/*
- /apps/<foo>/config.production.bar.foo.author/*
test what configuration is selected...
in place upgrade to CQ 5.4 GA
- turn off replication agents
- back up (snapshot or online backup.. in case something goes wrong)
- remove /etc/workflow/instances
- create /etc/workflow/instances :: sling:Folder
- remove /var/eventing/jobs
- create /var/eventing/jobs :: sling::OrderedFolder
- change admin password to "admin" (for CRX.. probably for other things too)
- shutdown CQ
- cp crx-quickstart/server/serverctl ~/backup/ (back up other stuff too if you want to)
- rm -rf crx-quickstart/launchpad
- rm -rf crx-quickstart/server
- rm -rf crx-quickstart/logs
- mv ~/Downloads/cq-quickstart-5.4.0.jar /opt/cq/
- sudo su day (MAKE SURE you are the same user CQ runs as)
- java -XX:MaxPermSize=256m -Xmx1024m -Dsling.run.modes=author,production -jar cq-quickstart-5.4.0.jar -v -p 4502
- deploy.sh <build-number> (launchpad is wiped out.. so need to redeploy stuff)
- enable replication agents
- test
- restart CQ using serverctl
CQ upgrade gotchas:
- admin password should be changed to "admin" or bad things happen.
- empting out /etc/workflow/instances saves time for upgrade.
- removing crx-quickstart/launchpad does you many good. otherwise, OSGi bundles don't get fully upgraded.
- make sure you restart CQ for upgrade as a proper user. Otherwise, crx-quickstart/repository will be messed up.
Subscribe to:
Posts (Atom)