Maven Archetype
  1. Maven Archetype
  2. ARCHETYPE-398

Use velocity expressions in path names

    Details

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

      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

        There are no comments yet on this issue.

          People

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

            Dates

            • Created:
              Updated: