Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-3224

Support wrap URL with option

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.1
    • 3.0.2, 4.0.0.M2, 4.0.0.M3
    • karaf
    • None

    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:([^/ ]+)/([^/ ]+)/([^/\\$ ]*)(/([^/\\$ ]+)(/([^/\\$ ]+))?)?(/\\$.+)?");
      

      Attachments

        Activity

          People

            jbonofre Jean-Baptiste Onofré
            jbonofre Jean-Baptiste Onofré
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: