Maven Archetype
  1. Maven Archetype
  2. ARCHETYPE-339

create-from-project goal should default to using ${package} instead of ${packageInPathFormat}

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0-alpha-5
    • Fix Version/s: 2.1
    • Component/s: Creator
    • Labels:
      None

      Description

      In my particular case, $

      {packageInPathFormat} is used in all generated files when ${package} should have been. In my XML and java files, ${packageInPathFormat}

      did not make sense. Maybe there are other cases where it would work. Just seems like $

      {package}

      should either be the default, or there should be an option to specify. I attached a few generated files to illustrate the issue.

      1. entityProviders.xml
        2 kB
        Brian Sanders
      2. Installer.java
        2 kB
        Brian Sanders

        Activity

        Brian Sanders created issue -
        Hide
        Hervé Boutemy added a comment -

        I just hit the same issue, caused by the fact that the initial project had a one-level-only package name
        then package == packageInPathFormat, and the archetype creation replaces the packageInPathFormat variable before package
        FYI, I just fixed my case by having the sample project in foo.bar package instead of foo: see r1073199

        BTW, I'll have a look at the code to try to detect this cas and force $

        {package}

        instead of ${packageInPathFormat] when their value is the same

        Show
        Hervé Boutemy added a comment - I just hit the same issue, caused by the fact that the initial project had a one-level-only package name then package == packageInPathFormat, and the archetype creation replaces the packageInPathFormat variable before package FYI, I just fixed my case by having the sample project in foo.bar package instead of foo: see r1073199 BTW, I'll have a look at the code to try to detect this cas and force $ {package} instead of ${packageInPathFormat] when their value is the same
        Hide
        Hervé Boutemy added a comment -

        unit test added in r1073564
        fixed in r1073565

        Show
        Hervé Boutemy added a comment - unit test added in r1073564 fixed in r1073565
        Hervé Boutemy made changes -
        Field Original Value New Value
        Status Open [ 1 ] Closed [ 6 ]
        Assignee Herve Boutemy [ hboutemy ]
        Resolution Fixed [ 1 ]
        Fix Version/s 2.1 [ 16795 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 09:05:55 UTC 2015 [ 1428224755734 ]
        Mark Thomas made changes -
        Workflow jira [ 12716777 ] Default workflow, editable Closed status [ 12748116 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 22:17:37 UTC 2015 [ 1428272257260 ]
        Mark Thomas made changes -
        Workflow jira [ 12953864 ] Default workflow, editable Closed status [ 12990997 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        124d 12h 55m 1 Hervé Boutemy 22/Feb/11 18:49

          People

          • Assignee:
            Hervé Boutemy
            Reporter:
            Brian Sanders
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development