Uploaded image for project: 'Maven Archetype'
  1. Maven Archetype
  2. ARCHETYPE-684

Not providing a directory element in the fileset results in a null directory instead

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.2.1, 3.3.0
    • 3.3.1
    • Generator
    • None

    Description

      When you have a directory structure like:

      src/
        main/resources/
         src/
         example.yml

      And a fileSet in the archetype-descriptor like:

      <fileSet>      
      <!-- <directory></directory> -->
        <includes>
          <include>*.yml</include>      
        </includes>    
      </fileSet> 

      When you generate the archetype you won't get the .yml files, but instead you get an empty directory with the name `null`.
      When you explicitly provide the <directory> element, the `null` directory disappears and the .yml file is copied.

      I think it would make sense to either;

      a) Log an error or warning that the xml is incomplete

      b) When no directory is provided, use a default (of the root directory) instead

      Where option B makes to most sense to me.

       

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            sjaranowski Slawomir Jaranowski
            Giovds Giovanni van der Schelde
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment