[ 
https://issues.apache.org/jira/browse/KARAF-4251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Grzegorz Grzybek reassigned KARAF-4251:
---------------------------------------

    Assignee:     (was: Grzegorz Grzybek)

> karaf-maven-plugin register its own URLStreamHandlerFactory for mvn
> -------------------------------------------------------------------
>
>                 Key: KARAF-4251
>                 URL: https://issues.apache.org/jira/browse/KARAF-4251
>             Project: Karaf
>          Issue Type: Question
>          Components: karaf-tooling
>    Affects Versions: 3.0.5
>            Reporter: Alexander Osterwald
>
> The karaf-maven-plugin registers its own URLStreamHandlerFactory for the 
> protocol _mvn_ [see 
> here|https://github.com/apache/karaf/blob/karaf-3.0.x/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/InstallKarsMojo.java#L56].
> {code:title=InstallKarsMojo.java|borderStyle=solid}
> static {
>         URL.setURLStreamHandlerFactory(new URLStreamHandlerFactory() {
>             public URLStreamHandler createURLStreamHandler(String protocol) {
>                 if ("wrap".equals(protocol)) {
>                     return new org.ops4j.pax.url.wrap.Handler();
>                 }
>                 if ("mvn".equals(protocol)) {
>                     return new org.ops4j.pax.url.mvn.Handler();
>                 }
>                 return null;
>             }
>         });
>     }
> {code} 
> 1. Why is this necessary? 
> 2. Why not using the system property _java.protocol.handler.pkgs_?
> I tried to set the URLStreamHandlerFactory in a project where I use the 
> karaf-maven-plugin which leads to the exception 'factory already set....'
> 3. Is it possible to implement a check whether the protocol _mvn_ is already? 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to