<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (c) 2020 Oracle and/or its affiliates.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<archetype-descriptor modelVersion="1.0" name="helidon-quickstart-se">
    <properties>
        <property id="groupId" />
        <property id="artifactId" />
        <property id="version" value="1.0-SNAPSHOT" />
        <property id="name" value="myproject" />
        <property id="package" />
        <property id="gradle" exported="false" />
        <property id="maven" exported="false" />
        <property id="helidonVersion" exported="false" readonly="true" value="{{project.version}}"/>
    </properties>
    <transformations>
        <transformation id="packaged">
            <replace regex="__pkg__" replacement="${package/\./\/}"/>
        </transformation>
        <transformation id="mustache">
            <replace regex="\.mustache$" replacement=""/>
        </transformation>
    </transformations>
    <template-sets transformations="mustache">
        <template-set transformations="packaged">
            <directory>src/main/java</directory>
            <includes>
                <include>**/*.mustache</include>
            </includes>
        </template-set>
        <template-set transformations="packaged">
            <directory>src/test/java</directory>
            <includes>
                <include>**/*.mustache</include>
            </includes>
        </template-set>
        <template-set if="gradle">
            <directory>.</directory>
            <includes>
                <include>build.gradle.mustache</include>
                <include>README.md.mustache</include>
            </includes>
        </template-set>
        <template-set if="maven">
            <directory>.</directory>
            <includes>
                <include>pom.xml.mustache</include>
                <include>README.md.mustache</include>
            </includes>
        </template-set>
    </template-sets>
    <file-sets>
        <file-set transformations="packaged">
            <directory>src/main/java</directory>
            <excludes>
                <exclude>**/*.mustache</exclude>
            </excludes>
        </file-set>
        <file-set>
            <directory>src/main/resources</directory>
            <includes>
                <include>**/*</include>
            </includes>
        </file-set>
        <file-set transformations="packaged">
            <directory>src/test/java</directory>
            <excludes>
                <exclude>**/*.mustache</exclude>
            </excludes>
        </file-set>
        <file-set>
            <directory>src/test/resources</directory>
            <excludes>
                <exclude>**/*</exclude>
            </excludes>
        </file-set>
    </file-sets>
    <input-flow>
        <input property="name" text="Project name" default="${name}"/>
        <input property="groupId" text="Project groupId" if="maven" default="${groupId}"/>
        <input property="artifactId" text="Project artifactId" default="${artifactId}"/>
        <input property="version" text="Project version" default="${version}"/>
        <input property="package" text="Java package name" default="${package}"/>
    </input-flow>
</archetype-descriptor>
