Hi Roman,

On 4 Jul 2014 at 13:11:23, Summer, Roman 
([email protected](mailto:[email protected])) wrote:

> Hello
>  
> I want to write a java script macro

I had to read this 3 times to understand it ;) (I kept thinking about 
"javascript 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.

See 
http://extensions.xwiki.org/xwiki/bin/view/Extension/ClassLoader+API#HAddinganewURLStreamHandler

Thanks
-Vincent

PS1: You should checkout OPS4J Pax URL: 
https://ops4j1.jira.com/wiki/display/paxurl/Mvn+Protocol

PS2: I think we would be interested by such a contribution. Actually a great 
contribution would be to bridge our code to use PAX URL (not even sure anything 
is needed for that!). We probably just need a tutorial explaining how to use 
PAX URL in XWiki.
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to