Actually the right way would be to extend standard URL Java system. AttachmentClassLoaderFactory is not a very good name for something which is a lot more generic than just attachments, it also support any URL.
So what is actually needed here is to provide a protocol handler, that's basically http://jira.xwiki.org/browse/XWIKI-6211. On Fri, Jul 4, 2014 at 1:11 PM, Summer, Roman <roman.sum...@de-gmbh.com> wrote: > Hello > > I want to write a java script macro which is able to load jars from an > external currently not supported source (e.g. from a maven repository). > Therefore I want to exchange the used class loader. Overriding the > ScriptMacroParameters#getJars() method is not possible for me, because I only > want to load the classes in view and not in edit mode. > > My question: How is it possible to exchange the currently injected > implementation of the interface > org.xwiki.rendering.internal.macro.script.AttachmentClassLoaderFactory > for my macro to exchange the used class loader or is there another > recommended official way to ream my aim. > > Thank you very much for your help. > > Yours faithfully > > Roman Summer > > > _______________________________________________ > users mailing list > email@example.com > http://lists.xwiki.org/mailman/listinfo/users -- Thomas Mortagne _______________________________________________ users mailing list firstname.lastname@example.org http://lists.xwiki.org/mailman/listinfo/users