| How to add "pre-installed" plugins? [message #877879] |
Sun, 27 May 2012 21:21  |
Rafael Chaves Messages: 14 Registered: April 2012 |
Junior Member |
|
|
I am going to host my own instance of Orion. How do I extend Orion so my own plugins are pre-installed for any user accounts (just like Authentication, File Client, Jslint etc)?
Thanks,
Rafael
|
|
|
|
|
|
| Re: How to add "pre-installed" plugins? [message #880249 is a reply to message #878068] |
Fri, 01 June 2012 13:53   |
Leo R Messages: 5 Registered: August 2011 |
Junior Member |
|
|
In case you still want to deploy something that would otherwise conflict with the same-origin policy,
this is a description on how to provide a separate bundle that runs in the same domain as Orion does.
(Everything just as far as I understand it. Maybe there is a better way)
For that you need to modify the server.configurator bundle.
Its plugin.xml defines which bundle's folder gets loaded to what url path.
Of course, if you want to load your plugin at startup you would still have to modify the defaults.pref.
Let's say you have the following bundle structure
com.corp.myplugin (bundle id equals project root name)
|_ web
|_ html,js files
|_ myplugindefinition.html
In the server.configurator bundle you need to add some configuration code to its plugin.xml.
First you have to add an addtional httpcontext to the httpcontexts extension:
<extension point="org.eclipse.equinox.http.registry.httpcontexts">
<httpcontext
id="org.eclipse.orion.server.configurator.httpcontext.myplugin">
<resource-mapping
bundle="com.corp.myplugin"
path="/web">
</resource-mapping>
</httpcontext>
... other httpcontexts ...
</extension>
And finally you need to define to which path the http context is supposed to be delivered
<extension
point="org.eclipse.equinox.http.registry.resources">
<resource
alias="/myplugin"
httpcontextId="org.eclipse.orion.server.configurator.httpcontext.myplugin">
</resource>
.....
</extension>
On the next restart the embedded Jetty Server should deploy the content of your plugin's web folder to http: //oriondomain/myplugin
[Updated on: Fri, 01 June 2012 13:55] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.02281 seconds