Skip to content

Commit ab910d6

Browse files
committed
Fix multi-module directory generation
1 parent 6bb2091 commit ab910d6

File tree

5 files changed

+11
-35
lines changed

5 files changed

+11
-35
lines changed

archetypes/archetypes/src/main/archetype/features/multi-module/inputs.xml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@
2525
name="Multi-module Project"
2626
description="Generate a multi-module project with one submodule"
2727
optional="true"
28-
default="false">
29-
<inputs>
30-
<text id="module-name" name="Module name" optional="true" default="module1" global="true"/>
31-
</inputs>
32-
</boolean>
28+
default="false"/>
3329
</inputs>
3430
</archetype-script>

archetypes/archetypes/src/main/archetype/features/multi-module/output.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,15 @@
2121
xsi:schemaLocation="https://helidon.io/archetype/2.0 https://helidon.io/xsd/archetype-2.0.xsd">
2222

2323
<variables>
24-
<text path="basedir">${module-name}</text>
24+
<text path="basedir">module1</text>
2525
</variables>
2626
<output>
2727
<template source="files/pom.xml.hbs" target="../pom.xml" engine="mustache"/>
2828
<model>
29-
<value key="module-name">${module-name}</value>
3029
<list key="module-names">
31-
<value>${module-name}</value>
30+
<map>
31+
<value key="module-name">module1</value>
32+
</map>
3233
</list>
3334
</model>
3435
</output>

archetypes/archetypes/src/main/archetype/nodes/mp/nodes/oci/inputs.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@
3636
<boolean path="docker.jlink-image">false</boolean>
3737
<boolean path="k8s">true</boolean>
3838
<boolean path="jpms">false</boolean>
39-
<boolean path="multi-module">true</boolean>
39+
<boolean path="multi-module">false</boolean>
4040
</presets>
4141
</archetype-script>

archetypes/archetypes/src/main/archetype/nodes/mp/nodes/oci/output.xml

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
</method>
3333
<method name="parent">
3434
<output>
35-
<templates engine="mustache" transformations="basedir,hbs">
35+
<templates engine="mustache" transformations="hbs">
3636
<directory>/nodes/mp/files</directory>
3737
<includes>
3838
<include>.helidon.hbs</include>
@@ -48,31 +48,18 @@
4848
</method>
4949
<method name="client">
5050
<output>
51-
<transformation id="basedir-client">
52-
<replace regex="^(?![^}]+(?:[\\/]|$))(.*)$" replacement="client/$1"/>
53-
</transformation>
54-
<templates engine="mustache" transformations="basedir-client,hbs">
51+
<templates engine="mustache" transformations="hbs">
5552
<directory>files</directory>
5653
<includes>
5754
<include>client/pom.xml.hbs</include>
5855
<include>client/README.md.hbs</include>
5956
</includes>
6057
</templates>
61-
<model>
62-
<list key="module-names">
63-
<map>
64-
<value key="module-names">client</value>
65-
</map>
66-
</list>
67-
</model>
6858
</output>
6959
</method>
7060
<method name="server">
7161
<output>
72-
<transformation id="basedir-server">
73-
<replace regex="^(?![^}]+(?:[\\/]|$))(.*)$" replacement="server/$1"/>
74-
</transformation>
75-
<templates engine="mustache" transformations="basedir-server,hbs,packaged">
62+
<templates engine="mustache" transformations="hbs,packaged">
7663
<directory>files</directory>
7764
<includes>
7865
<include>server/src/main/resources/application.yaml</include>
@@ -87,11 +74,6 @@
8774
</includes>
8875
</templates>
8976
<model>
90-
<list key="module-names">
91-
<map>
92-
<value key="module-names">server</value>
93-
</map>
94-
</list>
9577
<list key="pom-properties">
9678
<map>
9779
<value key="key">mainClass</value>
@@ -210,10 +192,7 @@
210192
</method>
211193
<method name="spec">
212194
<output>
213-
<transformation id="basedir-spec">
214-
<replace regex="^(?![^}]+(?:[\\/]|$))(.*)$" replacement="spec/$1"/>
215-
</transformation>
216-
<files transformations="basedir-spec">
195+
<files>
217196
<directory>files</directory>
218197
<includes>
219198
<include>spec/api.yaml</include>

archetypes/archetypes/src/main/archetype/output.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<replace regex="version" replacement="${version}"/>
3636
</transformation>
3737
<transformation id="basedir">
38-
<replace regex="^(?![^}]+(?:[\\/]|$))(.*)$" replacement="${basedir}/$1"/>
38+
<replace regex="^(?!\Qmodule1\E)(.*)$" replacement="${basedir}/$1"/>
3939
</transformation>
4040
</output>
4141
</method>

0 commit comments

Comments
 (0)