Description
The karaf-maven-plugin, in the install-kar goal, doesn't fully support wrap URL.
For instance, with a URL like:
wrap:mvn:jar:com.vaadin.addon/vaadin-touchkit-agpl/4.0.0.rc1/$Bundle-SymbolicName=vaadin-touchkit-agpl&Bundle-Version=4.0.0.rc1
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:
# 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:([^/ ]+)/([^/ ]+)/([^/\\$ ]*)(/([^/\\$ ]+)(/([^/\\$ ]+))?)?(/\\$.+)?");