Maven 在原型中使用_ugroupid

Maven 在原型中使用_ugroupid,maven,maven-archetype,Maven,Maven Archetype,我正在尝试创建一个多模块原型,如下所示: __groupId__.plugin __groupId__.feature 我想通过groupId设置模块的名称。因此,我使用\uuuu groupId\uuuu来设置模块名称。问题是这些模板无法被识别。当我使用\uuuu rootArtifactId\uuuu时,我的代码工作正常。我是否使用了错误的模板名称 我的结构如下: archetype |--src |--main |--resources

我正在尝试创建一个多模块原型,如下所示:

__groupId__.plugin
__groupId__.feature
我想通过groupId设置模块的名称。因此,我使用
\uuuu groupId\uuuu
来设置模块名称。问题是这些模板无法被识别。当我使用
\uuuu rootArtifactId\uuuu
时,我的代码工作正常。我是否使用了错误的模板名称

我的结构如下:

archetype
 |--src
    |--main
        |--resources
            |--sonatype-resources
            |   |--__groupId__.plugin
            |   |--__groupId__.feature
            |   |--pom.xml
            |---META-INF
                |---maven
                    |---archetype-metadata.xml
archetype-metadata.xml中的模块描述如下所示:

<module id="${groupId}.plugin" dir="__groupId__.parent" name="${groupId}.plugin">
  <fileSets>
    <fileSet filtered="true" encoding="UTF-8">
      <directory></directory>
      <includes>
        <include>.project</include>
        <include>build.properties</include>
      </includes>
    </fileSet>
  </fileSets>
</module>
<module id="${groupId}.parent" dir="__groupId__.feature" name="${groupId}.feature">
  <fileSets>
    <fileSet filtered="true" encoding="UTF-8">
      <directory></directory>
      <includes>
        <include>.project</include>
        <include>build.properties</include>
      </includes>
    </fileSet>
  </fileSets>
</module>

.项目
构建属性
.项目
构建属性

您可以考虑使用文件集的“打包”属性。通过使用它,您可以更改“package”属性的默认值,并将文件直接添加到自定义文件夹中。