Reputation: 2400
In our source code, we have some dialog.xml files to represent the structure of our dialog components. We deploy the project via maven to our local CQ server for development and testing. There are times we need to modify the dialog component via CRXDE Lite (in the CQ server) because it's much faster to edit the dialog that way.
The problem is: How do I export (from CRXDE Lite) the edited dialog component back to it's corresponding dialog.xml file?
Upvotes: 6
Views: 9349
Reputation: 29645
Another way of doing this (related to the third option described in Tomek Rękawek's answer) is to create a package using CRXDE Lite's Package Manager. Here is an easy step-by-step guide on how to do it:
Open CQ5, and go to CRXDE Lite.
Click on the "Package" icon on the top bar
Click on the "Create Package" link.
A pop-up will open, enter a name and version for the package that you want to create and assign it to a group:
Now the package that you created will be displayed in the list of packages, click on its title to get some additional options:
Click on edit and a new pop-up window will show up. Then click on the "Filters" tab, you should not have any as you just created the package:
Click on "Add filter" button, and enter the path of the component that you wan to export in the "Root path" field (for example, I created a textimage2 component for the Geometrixx app based on this tutorial):
Click on "Done", the filter should show now:
Click on the "Save" button.
The filter should display now in the description of the package. Click on the "Build" option:
A confirmation message will be displayed, click on "Build" again:
Now all the options for the package will be active. Click on the "Download" one to get the ZIP with all the files.
Extract the contents of the ZIP file, the dialog.xml file will be there for you to modify.
I know the process may seem a bit long, but it is really easy to complete, and it has the great advantage of being reusable: once you create a package, you only need to rebuild it to get the latest version of the component's code in ZIP.
It is really easy to import/share too once modified: just zip again all the files (keeping the folder structure) and use the "Upload Package" feature from CRX Package Manager.
Upvotes: 8
Reputation: 4257
WebDAV is one more way to export and import jcr-repository content; To get access to the repository, at first, you have to take any webdav client (Total Commander with WebDAV plugin is the best or BitKinex). Ensure 'Apache Sling Simple WebDAV Access to repositories (org.apache.sling.jcr.webdav)' bundle is in 'active' state (on the tab 'h t t p://host:port/system/console/bundles'); Just connect to your instance by webdav client by url: host:port\crx\repository\crx.default provide instance's login and password; As a result - you can download or upload files from or into repository to/from your file system. It works more stable than vlt synchronization starting from cq 5.5 (we had problems with cq 5.4); An we had many probles with vlt even on cq 5.6 (like '[ERROR] checkout: java.lang.NullPointerException: null' during check out process)
Upvotes: -1
Reputation: 9304
CRXDE Lite itself doesn't provide export-to-XML feature, but you can get your dialog.xml
in a few different ways. Let's assume you want to get dialog for the /libs/foundation/components/text
component:
1. Sling GET servlet - quick & dirty
Enter the dialog path to your browser and add .xml
extension:
http://localhost:4502/libs/foundation/components/text/dialog.xml
2. VLT - recommended way
Use VLT Tool which is a standard way to synchronize between JCR and local filesystem:
vlt export http://localhost:4502/crx /libs/foundation/components/text my-export
# cat my-export/jcr_root/libs/foundation/components/text/dialog.xml
3. Package manager
Open /crx/packmgr/index.jsp
and click Build on the package that contains the first version of dialog. It'll rebuild the package using current content. Download the package, unzip it and find appropriate dialog.xml
file inside.
Upvotes: 17