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 Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0-alpha-5
    • Fix Version/s: 2.1
    • Component/s: Creator
    • Labels:
      None
    • Number of attachments :
      2

      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

        Hide
        Herve 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
        Herve 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
        Herve Boutemy added a comment -

        unit test added in r1073564
        fixed in r1073565

        Show
        Herve Boutemy added a comment - unit test added in r1073564 fixed in r1073565

          People

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

            Dates

            • Created:
              Updated:
              Resolved: