【问题标题】:How to create a specific path in a maven archetype? [duplicate]如何在 Maven 原型中创建特定路径? [复制]
【发布时间】:2019-09-20 20:43:41
【问题描述】:

我想创建一个具有以下目录结构的 Maven 原型:

/src/main/java/com/example/myapp/pages
/src/main/java/com/example/myapp/components
/src/main/java/com/example/myapp/services
...

artifactId = com.example
groupId = myapp

这是我的原型-metadata.xml:

<archetype-descriptor
        xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0
        http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd"
        xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        name="something">

    <requiredProperties>
        <requiredProperty key="artifact">
            <defaultValue>${artifactId}</defaultValue>
        </requiredProperty>
        <requiredProperty key="group">
            <defaultValue>${groupId}</defaultValue>
        </requiredProperty>
    </requiredProperties>

    <fileSets>
        <fileSet packaged="true">
            <directory>src/main/java/__group__/__artifact__/pages</directory>
        </fileSet>
</archetype-descriptor>

因此创建了以下内容:

/src/main/java/com.example/myapp/pages

我不知道如何去掉点并使其成为斜线。 有什么建议?谢谢!

【问题讨论】:

    标签: java maven tapestry


    【解决方案1】:

    使用create-from-project 可能会有所帮助

    我在github做了一个示例项目应该会有所帮助

    【讨论】:

      猜你喜欢
      • 2019-09-04
      • 1970-01-01
      • 1970-01-01
      • 2015-07-14
      • 2015-09-10
      • 1970-01-01
      • 1970-01-01
      • 2019-04-10
      • 2020-04-30
      相关资源
      最近更新 更多