Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.2
    • Fix Version/s: None
    • Component/s: Plugin
    • Labels:
      None

      Description

      In required properties in an archetype descriptor, you can use expressions such as :

      <requiredProperty key="className">
      <defaultValue>${rootArtifactId.substring(0,1).toUpperCase()}${rootArtifactId.substring(1)}</defaultValue>
      </requiredProperty>

      But you can't in a path name (e.g. you can't name a folder as __rootArtifactId.substring(1)__).

      For such a case, another solution would be the ability to store a hidden value (not visible by the user who generates a project) in the Velocity context and to able to use it in a path name (e.g. define somewhere MyFolderName as rootArtifactId.substring(1) and then use __MyFolderName__ as a folder name).

        Activity

        Nicolas Dupont created issue -
        Hervé Boutemy made changes -
        Field Original Value New Value
        Description In required properties in an archetype descriptor, you can use expressions such as :
        <requiredProperty key="className">
        <defaultValue>${rootArtifactId.substring(0,1).toUpperCase()}${rootArtifactId.substring(1)}</defaultValue>
        </requiredProperty>

        But you can't in a path name (e.g. you can't name a folder as __rootArtifactId.substring(1)__).

        For such a case, another solution would be the ability to store a hidden value (not visible by the user who generates a project) in the Velocity context and to able to use it in a path name (e.g. define somewhere MyFolderName as rootArtifactId.substring(1) and then use __MyFolderName__ as a folder name).
        In required properties in an archetype descriptor, you can use expressions such as :
        {code:xml}<requiredProperty key="className">
        <defaultValue>${rootArtifactId.substring(0,1).toUpperCase()}${rootArtifactId.substring(1)}</defaultValue>
        </requiredProperty>{code}

        But you can't in a path name (e.g. you can't name a folder as {{\_\_rootArtifactId.substring(1)\_\_}}).

        For such a case, another solution would be the ability to store a hidden value (not visible by the user who generates a project) in the Velocity context and to able to use it in a path name (e.g. define somewhere MyFolderName as rootArtifactId.substring(1) and then use {{\_\_MyFolderName\_\_}} as a folder name).
        Mark Thomas made changes -
        Project Import Sun Apr 05 09:05:55 UTC 2015 [ 1428224755734 ]
        Mark Thomas made changes -
        Workflow jira [ 12716834 ] Default workflow, editable Closed status [ 12747996 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 22:17:37 UTC 2015 [ 1428272257260 ]
        Mark Thomas made changes -
        Workflow jira [ 12953830 ] Default workflow, editable Closed status [ 12990959 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Nicolas Dupont
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development