Cargo
  1. Cargo
  2. CARGO-1017

UberWar: comma cannot serve as a pattern end mark

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0.6, 1.1.1
    • Fix Version/s: 1.1.2
    • Component/s: Maven2
    • Labels:
      None
    • Complexity:
      Intermediate
    • Number of attachments :
      0

      Description

      UberWar is unable to merge nodes when comma is used as patter end mark.
      This is a common case when Spring's "contextConfigLocation" parameter should be merged.

      Sample configuration:

      <strategy name="NodeMerge">
        <context-param>
          <param-name>$left:param-name</param-name>
          <param-value>$left:param-value,$right:param-value</param-value>
        </context-param>
      </strategy>
      

      Exception:

      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Merging exception creating UBERWAR

      Embedded error: Exception merging web.xml files
      Illegal group reference
      [INFO] ------------------------------------------------------------------------
      [INFO] Trace
      .....
      Caused by: java.lang.IllegalArgumentException: Illegal group reference
      at java.util.regex.Matcher.appendReplacement(Matcher.java:713)
      at java.util.regex.Matcher.replaceFirst(Matcher.java:861)
      at org.codehaus.cargo.module.merge.tagstrategy.NodeMergeStrategy.applyValues(NodeMergeStrategy.java:154)
      at org.codehaus.cargo.module.merge.tagstrategy.NodeMergeStrategy.applyValues(NodeMergeStrategy.java:140)
      at org.codehaus.cargo.module.merge.tagstrategy.NodeMergeStrategy.applyValues(NodeMergeStrategy.java:140)
      at org.codehaus.cargo.module.merge.tagstrategy.NodeMergeStrategy.inBoth(NodeMergeStrategy.java:92)
      at org.codehaus.cargo.module.merge.tagstrategy.AbstractChoiceMergeStrategy.inBoth(AbstractChoiceMergeStrategy.java:61)
      at org.codehaus.cargo.module.merge.DescriptorMergerByTag.merge(DescriptorMergerByTag.java:194)
      ... 24 more

        Activity

        Hide
        Anton Khitrenovich added a comment -

        Fix submitted (rev2992).

        Show
        Anton Khitrenovich added a comment - Fix submitted (rev2992).

          People

          • Assignee:
            Anton Khitrenovich
            Reporter:
            Anton Khitrenovich
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: