Is it possible to upgrade xwiki extension to a new version automatically?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Is it possible to upgrade xwiki extension to a new version automatically?

abtv
I use InstalledExtensionScriptService class to retrieve a list of installed extensions. I would like automatically upgrade RTWysiwyg (or any other) extension if the current version less than the version in my jar file (hardcoded). When I try to use ExtensionManagerScriptService class to uninstall existing extension and then install the new one XWiki freezes. I studied xwiki docs and think it can be a conflict. What should I do?
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to upgrade xwiki extension to a new version automatically?

Thomas Mortagne
Administrator
On Thu, Apr 14, 2016 at 5:25 PM, abtv <[hidden email]> wrote:
> I use InstalledExtensionScriptService class to retrieve a list of installed
> extensions. I would like automatically upgrade RTWysiwyg (or any other)
> extension if the current version less than the version in my jar file
> (hardcoded). When I try to use ExtensionManagerScriptService class to
> uninstall existing extension and then install the new one XWiki freezes. I
> studied xwiki docs and think it can be a conflict. What should I do?

If you have a conflict it means you modified a standard document.

If you disabled interactive mode in the install request it won't
bother you again but if you mess with the standard documents you might
still have bad surprises...

You can look at
http://extensions.xwiki.org/xwiki/bin/view/Extension/Extension+Script+Module#HNon-interactiveandsynchronousinstall
for various example of how to use the scrip API.

>
>
>
> --
> View this message in context: http://xwiki.475771.n2.nabble.com/Is-it-possible-to-upgrade-xwiki-extension-to-a-new-version-automatically-tp7598987.html
> Sent from the XWiki- Dev mailing list archive at Nabble.com.
> _______________________________________________
> devs mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/devs



--
Thomas Mortagne
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to upgrade xwiki extension to a new version automatically?

abtv
Should I uninstall my extension before installing the new one? Or I can just call install functions with the new version of extension? And what about dependencies? Will it resolve and reinstall all the dependencies of the extension?
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to upgrade xwiki extension to a new version automatically?

Thomas Mortagne
Administrator
If you install a new version it will automatically replace any
matching extension and upgrade it but again if you modified standard
pages it will try to merge it and you might not get what you expect in
the end in non interactive mode.

On Thu, Apr 14, 2016 at 6:57 PM, abtv <[hidden email]> wrote:

> Should I uninstall my extension before installing the new one? Or I can just
> call install functions with the new version of extension? And what about
> dependencies? Will it resolve and reinstall all the dependencies of the
> extension?
>
>
>
> --
> View this message in context: http://xwiki.475771.n2.nabble.com/Is-it-possible-to-upgrade-xwiki-extension-to-a-new-version-automatically-tp7598987p7598993.html
> Sent from the XWiki- Dev mailing list archive at Nabble.com.
> _______________________________________________
> devs mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/devs



--
Thomas Mortagne
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs