Maven Archetype
  1. Maven Archetype
  2. ARCHETYPE-305

rootArtifactId for modules isn't resolved when parent contains filsets

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows OS, maven 2.2.1

      Description

      I tried to make a multi-module Maven archetype.
      In my archetype metadata, when I only specify <modules> like this:

      <archetype-descriptor>
      <modules>
            <module id="${rootArtifactId}-jsf_core" dir="__rootArtifactId__-jsf_core" name="${rootArtifactId}-jsf_core">
                <fileSets>
                  <fileSet filtered="true" encoding="UTF-8">
                    <directory>src/main/webapp</directory>
                    <includes>
                      <include>**/*.xhtml</include>
                      <include>**/*.xml</include>
                    </includes>
                  </fileSet>
                  <fileSet filtered="true" encoding="UTF-8">
                    <directory>src/main/resources</directory>
                    <includes>
                      <include>**/*.xml</include>
                    </includes>
                  </fileSet>
                </fileSets>
              </module>
            </modules>
          </module>
        </modules>
      </archetype-descriptor>

      It works: folders are renamed and I'm happy.
      But when I want to also filter parent resources like this:

      <archetype-descriptor>
      <fileSets>
              <fileSet filtered="true" encoding="UTF-8">
                <directory>src/generation</directory>
      		  <includes>
                  <include>**/*.uml</include>
                </includes>
      		  <includes>
                  <include>**/*.umldi</include>
                </includes>
              </fileSet>
            </fileSets>
      <modules>
            <module id="${rootArtifactId}-jsf_core" dir="__rootArtifactId__-jsf_core" name="${rootArtifactId}-jsf_core">
                <fileSets>
                  <fileSet filtered="true" encoding="UTF-8">
                    <directory>src/main/webapp</directory>
                    <includes>
                      <include>**/*.xhtml</include>
                      <include>**/*.xml</include>
                    </includes>
                  </fileSet>
                  <fileSet filtered="true" encoding="UTF-8">
                    <directory>src/main/resources</directory>
                    <includes>
                      <include>**/*.xml</include>
                    </includes>
                  </fileSet>
                </fileSets>
              </module>
            </modules>
          </module>
        </modules>
      </archetype-descriptor>

      My modules folders aren't renamed and $

      {rootArtifactId}

      variable isn't resolved in children modules.

        Activity

        Charlie Mordant created issue -
        Hervé Boutemy made changes -
        Field Original Value New Value
        Project Maven Archetype [ 11095 ] Maven Archetype Bundles [ 12090 ]
        Key ARCHETYPE-298 MARCHETYPES-1
        Affects Version/s 2.0-alpha-4 [ 14253 ]
        Component/s Plugin [ 11867 ]
        Hervé Boutemy made changes -
        Key MARCHETYPES-1 ARCHETYPE-305
        Project Maven Archetype Bundles [ 12090 ] Maven Archetype [ 11095 ]
        Hervé Boutemy made changes -
        Description I tried to make a multi-module Maven archetype.
        In my archetype metadata, when I only specify <modules> like this:
        <archetype-descriptor>
        <modules>
              <module id="${rootArtifactId}-jsf_core" dir="__rootArtifactId__-jsf_core" name="${rootArtifactId}-jsf_core">
                  <fileSets>
                    <fileSet filtered="true" encoding="UTF-8">
                      <directory>src/main/webapp</directory>
                      <includes>
                        <include>**/*.xhtml</include>
                        <include>**/*.xml</include>
                      </includes>
                    </fileSet>
                    <fileSet filtered="true" encoding="UTF-8">
                      <directory>src/main/resources</directory>
                      <includes>
                        <include>**/*.xml</include>
                      </includes>
                    </fileSet>
                  </fileSets>
                </module>
              </modules>
            </module>
          </modules>
        </archetype-descriptor>


        It works: folders are renamed and I'm happy.
        But when I want to also filter parent resources like this:


        <archetype-descriptor>
        <fileSets>
                <fileSet filtered="true" encoding="UTF-8">
                  <directory>src/generation</directory>
        <includes>
                    <include>**/*.uml</include>
                  </includes>
        <includes>
                    <include>**/*.umldi</include>
                  </includes>
                </fileSet>
              </fileSets>
        <modules>
              <module id="${rootArtifactId}-jsf_core" dir="__rootArtifactId__-jsf_core" name="${rootArtifactId}-jsf_core">
                  <fileSets>
                    <fileSet filtered="true" encoding="UTF-8">
                      <directory>src/main/webapp</directory>
                      <includes>
                        <include>**/*.xhtml</include>
                        <include>**/*.xml</include>
                      </includes>
                    </fileSet>
                    <fileSet filtered="true" encoding="UTF-8">
                      <directory>src/main/resources</directory>
                      <includes>
                        <include>**/*.xml</include>
                      </includes>
                    </fileSet>
                  </fileSets>
                </module>
              </modules>
            </module>
          </modules>
        </archetype-descriptor>


        My modules folders aren't renamed and ${rootArtifactId} variable isn't resolved in children modules.
        I tried to make a multi-module Maven archetype.
        In my archetype metadata, when I only specify <modules> like this:
        {code:xml}<archetype-descriptor>
        <modules>
              <module id="${rootArtifactId}-jsf_core" dir="__rootArtifactId__-jsf_core" name="${rootArtifactId}-jsf_core">
                  <fileSets>
                    <fileSet filtered="true" encoding="UTF-8">
                      <directory>src/main/webapp</directory>
                      <includes>
                        <include>**/*.xhtml</include>
                        <include>**/*.xml</include>
                      </includes>
                    </fileSet>
                    <fileSet filtered="true" encoding="UTF-8">
                      <directory>src/main/resources</directory>
                      <includes>
                        <include>**/*.xml</include>
                      </includes>
                    </fileSet>
                  </fileSets>
                </module>
              </modules>
            </module>
          </modules>
        </archetype-descriptor>{code}


        It works: folders are renamed and I'm happy.
        But when I want to also filter parent resources like this:


        {code:xml}<archetype-descriptor>
        <fileSets>
                <fileSet filtered="true" encoding="UTF-8">
                  <directory>src/generation</directory>
        <includes>
                    <include>**/*.uml</include>
                  </includes>
        <includes>
                    <include>**/*.umldi</include>
                  </includes>
                </fileSet>
              </fileSets>
        <modules>
              <module id="${rootArtifactId}-jsf_core" dir="__rootArtifactId__-jsf_core" name="${rootArtifactId}-jsf_core">
                  <fileSets>
                    <fileSet filtered="true" encoding="UTF-8">
                      <directory>src/main/webapp</directory>
                      <includes>
                        <include>**/*.xhtml</include>
                        <include>**/*.xml</include>
                      </includes>
                    </fileSet>
                    <fileSet filtered="true" encoding="UTF-8">
                      <directory>src/main/resources</directory>
                      <includes>
                        <include>**/*.xml</include>
                      </includes>
                    </fileSet>
                  </fileSets>
                </module>
              </modules>
            </module>
          </modules>
        </archetype-descriptor>{code}


        My modules folders aren't renamed and ${rootArtifactId} variable isn't resolved in children modules.
        Michael Osipov made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Won't Fix [ 2 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 09:05:55 UTC 2015 [ 1428224755734 ]
        Mark Thomas made changes -
        Workflow jira [ 12716745 ] Default workflow, editable Closed status [ 12748285 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 22:17:37 UTC 2015 [ 1428272257260 ]
        Mark Thomas made changes -
        Workflow jira [ 12954173 ] Default workflow, editable Closed status [ 12991419 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Charlie Mordant
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development