Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Orion (Archived) » How to add "pre-installed" plugins?
How to add "pre-installed" plugins? [message #877879] Mon, 28 May 2012 01:21 Go to next message
Rafael Chaves is currently offline Rafael ChavesFriend
Messages: 23
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 #877948 is a reply to message #877879] Mon, 28 May 2012 06:20 Go to previous messageGo to next message
Rafael Chaves is currently offline Rafael ChavesFriend
Messages: 23
Registered: April 2012
Junior Member
So far, I am suspecting the pre-installed plugins are baked in Orion by virtue of being part of the org.eclipse.orion.client.core bundle web/plugins directory.

If that is correct, I could as a workaround just add my plugin to that location post install as a file system link. But that wouldn't cut it, as my plugin makes HTTP requests and I believe same-origin policy requires me to publish it from the same server it sends requests to.
Re: How to add "pre-installed" plugins? [message #877952 is a reply to message #877948] Mon, 28 May 2012 06:37 Go to previous messageGo to next message
Rafael Chaves is currently offline Rafael ChavesFriend
Messages: 23
Registered: April 2012
Junior Member
Hah, it seems the defaults.pref file determines what plugins are loaded by default, and it does accept any plugin URL, I was wrong about bundled plugins having to be part of the Orion distro.

For now, I will get by with modifying that file (while I am there, I will remove the plugins I don't need). Any more civilized way of modifying the list of installed plugins (that would survive an Orion reinstall, for instance)?
Re: How to add "pre-installed" plugins? [message #878068 is a reply to message #877952] Mon, 28 May 2012 13:01 Go to previous messageGo to next message
John Arthorne is currently offline John ArthorneFriend
Messages: 176
Registered: July 2009
Senior Member
You've got it. The defaults.pref is the only way we currently configure the default set of installed plugins. I have entered a bug for finding a nicer way to do this on the server:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=380809
Re: How to add "pre-installed" plugins? [message #880249 is a reply to message #878068] Fri, 01 June 2012 17:53 Go to previous messageGo to next message
Leo R is currently offline Leo RFriend
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 17:55]

Report message to a moderator

Re: How to add "pre-installed" plugins? [message #1065100 is a reply to message #880249] Mon, 24 June 2013 11:32 Go to previous messageGo to next message
Pankaj Dhoolia is currently offline Pankaj DhooliaFriend
Messages: 2
Registered: June 2013
Junior Member
Leo,
I followed the process you outlined to pre-install a plugin.
Apparently, the plugin's content is not accessible at "http://{oriondomain}/{myplugin}
Are there any additional changes required?
thanks.
Re: How to add "pre-installed" plugins? [message #1693488 is a reply to message #878068] Fri, 24 April 2015 14:01 Go to previous messageGo to next message
Murali Kris is currently offline Murali KrisFriend
Messages: 27
Registered: July 2009
Junior Member
Hi,
We have created the Sample Reverse Text Plugin into a bundle and tried to auto-install by updating the defaults.pref file.
However the application launched through the web-ide launch configuration in the Eclipse workspace having Orion GIT Sources,
a. The login was successful,
b. The bundle was in active state
c. The plugin state under Settings->Plugins, i got the following error :
"Plugin could not be loaded".

Am i doing the right thing.
What is the best way to get your development environment for the same ?
Please advise on this and would appreciate the procedure on the auto/pre installation orion plugins.

Regards,
Murali
Re: How to add "pre-installed" plugins? [message #1693505 is a reply to message #1693488] Fri, 24 April 2015 15:27 Go to previous messageGo to next message
Mark Macdonald is currently offline Mark MacdonaldFriend
Messages: 35
Registered: July 2009
Member
@Murali: can you successfully install the "reverse text plugin" from this URL? https://orion-plugins.github.io/1.0/plugins/reverse/reversePlugin.html If so, that indicates that there is a problem with the local copy of Sample Reverse Text Plugin on your server.

To find out more, follow these steps for troubleshooting a plugin that fails to install: Troubleshooting plugin installation.
Re: How to add "pre-installed" plugins? [message #1693771 is a reply to message #1693505] Tue, 28 April 2015 09:40 Go to previous message
Murali Kris is currently offline Murali KrisFriend
Messages: 27
Registered: July 2009
Junior Member
Dear Marc,
Thanks a lot for the quick response.
I was able to get the plugin auto-installed by having the right contributions to the org.eclipse.equinox.http.registry.resources, org.eclipse.equinox.http.registry.httpcontexts extension points.It was done in a different (server)bundle and has a bundle reference to the client bundle having the web resources in it.
Once again appreciate your support in this regard.
Regards,
Murali
Previous Topic:Starting orion
Next Topic:Orion Plugin Auto/Pre-Installation in 8.0 version
Goto Forum:
  


Current Time: Thu Nov 14 09:24:44 GMT 2024

Powered by FUDForum. Page generated in 0.04269 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top