CRX Feature for Eclipse HOWTO
Last Updated: Friday, April 24th, 2009 by fmeschbe
This HOWTO has been written by Alexander Klimetschek. Thank you very much.
Prerequisite 1: Make sure the CRX has RMI enabled
- Inside the CRX directory, open
server/runtime/0/_crx/WEB-INF/web.xml with a text editor
- Look for the RMI Configuration section (by default in comments)
- Uncomment that section, default port is 1234
- Optionally, you can choose the RMI port if there are conflicts
- Restart CRX
Prerequisite 2: Install CRX 1.4 plugin
The latest CRX Feature for Eclipse Version 3.6.6 does not include the
support plugin for CRX 1.4. You can manually retrieve it and install it as
follows:
- Grab the CRX 1.4 support plugin:
com.day.crx.eclipse.rmi.crx14_1.0.0.jar
- Copy the JAR file into the plugins folder of your Eclipse
installation
- Restart Eclipse
Setup of the CRX Eclipse feature
- Install the feature (and maybe restart Eclipse).
- Open the JCR perspective
- In the left, there's a JCR Repository view, in which you can
configure multiple repositories to connect to
- Right-click in that view and select New -> Repository
- Select Configure a new RMI repository and Next
- For the repository RMI URL enter //localhost:1234 (port name
same as configured in the web.xml in crx above, hostname or IP
depending on where your CRX is reachable) and hit Browse
- If RMI is working, you should now see a dialog with a list of
registered repositories at localhost:1234; typcially this is only
one named //localhost:1234/crx
- Select the desired one and hit OK
- For the RMI Accessor choose the most appropriate version of
the remote repository (normally the dialog preselects the correct
version)
- Set the password for the JCR session login (admin/admin set by
default)
- Select the workspace to connect to under Workspace Name (you
might need to enlarge the dialog a bit to see that field below
the Save Password checkbox); use the Browse button if you
have the admin credentials; the default workspace in crx is
named crx.default
- Hit Finish
- Now right-click on the new entry in the JCR Repository view
and select Connect to create a new JCR session
- Below that node in the tree, a new node for the session (like
admin@....) will be visible. If you also open that
one, you'll see the root node of the workspace.
- Browse the tree including nodes and properties in the left view
- For JCR operations, right click nodes or properties to see a
context menu with all options
- Properties and other node metadata is visible in the
Properties view (at the bottom)
Note: The JCR Repository view can be opened in any perspective,
particularly I like to have it open in the Debug perspective. The JCR
perspective is mainly a convenience because it has all views of the CRX Feature
for Eclipse nicely setup.