Maven Archetype
  1. Maven Archetype
  2. ARCHETYPE-362

Replacing properties in default value of other properties doesn't work due to faulty ordering.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.1
    • Component/s: Generator
    • Labels:
      None
    • Flags:
      Patch

      Description

      I would like to do something like:

      <requiredProperty key="name"/>
      <requiredProperty key="archetypeId">
        <defaultValue>some-prefix-${name}</defaultValue>
      </requiredProperty>

      This is now not working, because the name property does not declare a default value.

      Please see the attached test for an example.

      The other attachement is a patch that changes the comparator for sorting the required properties in such a way that it actually works.

        Issue Links

          Activity

          Maarten Winkels created issue -
          Maarten Winkels made changes -
          Field Original Value New Value
          Link This issue relates to ARCHETYPE-192 [ ARCHETYPE-192 ]
          Hervé Boutemy made changes -
          Description I would like to do something like:

          <requiredProperty key="name"/>
          <requiredProperty key="archetypeId">
            <defaultValue>some-prefix-${name}</defaultValue>
          </requiredProperty>

          This is now not working, because the name property does not declare a default value.

          Please see the attached test for an example.

          The other attachement is a patch that changes the comparator for sorting the required properties in such a way that it actually works.
          I would like to do something like:

          {code:xml}<requiredProperty key="name"/>
          <requiredProperty key="archetypeId">
            <defaultValue>some-prefix-${name}</defaultValue>
          </requiredProperty>{code}

          This is now not working, because the name property does not declare a default value.

          Please see the attached test for an example.

          The other attachement is a patch that changes the comparator for sorting the required properties in such a way that it actually works.
          Hervé Boutemy made changes -
          Fix Version/s 2.1 [ 16795 ]
          Assignee Herve Boutemy [ hboutemy ]
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 09:05:55 UTC 2015 [ 1428224755734 ]
          Mark Thomas made changes -
          Workflow jira [ 12716800 ] Default workflow, editable Closed status [ 12748095 ]
          Mark Thomas made changes -
          Patch Submitted Yes [ 10763 ]
          Flags Patch [ 10430 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 22:17:37 UTC 2015 [ 1428272257260 ]
          Mark Thomas made changes -
          Workflow jira [ 12953858 ] Default workflow, editable Closed status [ 12990994 ]

            People

            • Assignee:
              Hervé Boutemy
              Reporter:
              Maarten Winkels
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development