|Integrates CRaSH in XWiki|
|License||GNU Lesser General Public License 2.1|
Table of contents
Integratesinto XWiki by allowing the following features:
- Run CRaSH inside XWiki to provide a shell for it
- Ability to start/stop CRaSH from the XWiki Admin UI
- Ability to add commands as wiki pages and to access XWiki script bindings
Connect using SSH
Before you can connect using SSH you'll need to edit XWiki's xwiki.properties and add 2 configuration variables (modify the username and password as you see fit!):
Then here's what you'll get connecting to XWiki's CRaSH instance:
Default XWiki Command
By default we provide an xwiki command (located in page Crash.XWikiCommand and you can use to run any XWQL query.
- Return the list of all users in the wiki: xwiki xwql "from doc.object(XWiki.XWikiUsers) as user"
- Return the list of all pages containing CRaSH commands in the wiki: xwiki xwql "from doc.object(Crash.CrashCommandClass) as user"
For reference, here's the definition of this command:
@Usage("execute an XWQL query")
public String xwql(
@Usage("The XWQL query")
Adding a new Command
Create a page and add an Object of type Crash.CrashCommandClass. For example:
And here's what you get when you execute it from SSH:
This extension has been tested with the following configurations.
|Extension Version||XWiki Flavor||Notes|
|1.0||XWiki Enterprise 5.0, 5.3M2|
On 5.3M2 - BC deps need to be fixed
Prerequisites & Installation Instructions
We recommend using theto install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager).
You can also use the following manual method, which is useful if this extension cannot be installed with the Extension Manager or if you're using an old version of XWiki that doesn't have the Extension Manager:
- Log in the wiki with a user having Administration rights
- Go to the Administration page and select the Import category
- Follow the on-screen instructions to upload the downloaded XAR
- Click on the uploaded XAR and follow the instructions
- org.xwiki.contrib:application-crash-api 1.0