Jean-Baptiste Onofré created KARAF-3224:
-------------------------------------------

             Summary: Support wrap URL with option
                 Key: KARAF-3224
                 URL: https://issues.apache.org/jira/browse/KARAF-3224
             Project: Karaf
          Issue Type: Bug
          Components: karaf-tooling
    Affects Versions: 3.0.1
            Reporter: Jean-Baptiste Onofré
            Assignee: Jean-Baptiste Onofré
             Fix For: 4.0.0, 3.0.2


The karaf-maven-plugin, in the install-kar goal, doesn't fully support wrap URL.

For instance, with a URL like:

{code}
wrap:mvn:jar:com.vaadin.addon/vaadin-touchkit-agpl/4.0.0.rc1/$Bundle-SymbolicName=vaadin-touchkit-agpl&Bundle-Version=4.0.0.rc1
{code}

it causes issue with the / before the $ character.


The mvnToAether method in the class org.apache.karaf.tooling.features.MavenUtil 
 can’t handle this kind of url. With this patch both problem, bundles with 
character “/" and blueprint are fixed:

{code}
# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- Index
+++ Modified In Working Tree
@@ -41,7 +41,7 @
 
     static final DefaultRepositoryLayout layout = new 
DefaultRepositoryLayout();
     private static final Pattern aetherPattern = Pattern.compile("([^: 
]+):([^: ]+)(:([^: ]*)(:([^: ]+))?)?:([^: ]+)");
-    private static final Pattern mvnPattern = 
Pattern.compile("(?:wrap:)?mvn:([^/ ]+)/([^/ ]+)/([^/\\$ ]*)(/([^/\\$ 
]+)(/([^/\\$ ]+))?)?(\\$.+)?");
+    private static final Pattern mvnPattern = 
Pattern.compile("(?:(?:wrap:)|(?:blueprint:))?mvn:([^/ ]+)/([^/ ]+)/([^/\\$ 
]*)(/([^/\\$ ]+)(/([^/\\$ ]+))?)?(/\\$.+)?");
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to