Skip to content

Commit

Permalink
4.x: Verify Starter with 4.x archetypes (#7775)
Browse files Browse the repository at this point in the history
* jpms

Signed-off-by: tvallin <thibault.vallin@oracle.com>

* review changes

Signed-off-by: tvallin <thibault.vallin@oracle.com>

* fix Helidon starter

Signed-off-by: tvallin <thibault.vallin@oracle.com>

---------

Signed-off-by: tvallin <thibault.vallin@oracle.com>
  • Loading branch information
tvallin authored Oct 12, 2023
1 parent 529248b commit 9f3a065
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 30 deletions.
2 changes: 1 addition & 1 deletion archetypes/helidon/src/main/archetype/common/common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<includes>
<include>.helidon.mustache</include>
<include>README.md.mustache</include>
<include>src/main/java/**/*.java.mustache</include>
<include>src/main/java/**/Main.java.mustache</include>
</includes>
</templates>
<model>
Expand Down
3 changes: 2 additions & 1 deletion archetypes/helidon/src/main/archetype/common/media.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@

<step name="Media Support" optional="true">
<variables>
<text path="media.default-json-lib">jsonb</text>
<text path="media.default-json-lib" if="${flavor} == 'mp'">jsonb</text>
<text path="media.default-json-lib" if="${flavor} == 'se'">jsonp</text>
</variables>
<inputs>
<!-- TODO https://github.com/oracle/helidon-build-tools/issues/699 -->
Expand Down
14 changes: 14 additions & 0 deletions archetypes/helidon/src/main/archetype/common/packaging.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,20 @@ kubectl delete -f app.yaml
</templates>
</output>
</boolean>
<boolean id="jpms"
name="Module support (JPMS)"
description="Add a module-info to your project"
default="false"
optional="true">
<output>
<templates engine="mustache" transformations="mustache,packaged">
<directory>files</directory>
<includes>
<include>src/main/java/**/module-info.java.mustache</include>
</includes>
</templates>
</output>
</boolean>
</inputs>
</step>
</archetype-script>
1 change: 1 addition & 0 deletions archetypes/helidon/src/main/archetype/common/presets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,6 @@
<boolean path="docker.jlink-image">true</boolean>
<boolean path="k8s">true</boolean>
<boolean path="v8o">false</boolean>
<boolean path="jpms">false</boolean>
</presets>
</archetype-script>
10 changes: 5 additions & 5 deletions archetypes/helidon/src/main/archetype/flavor.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@
default="se"
global="true"
optional="true">
<option value="mp"
name="Helidon MP"
description="Declarative, MicroProfile compliant">
<exec src="mp/mp.xml"/>
</option>
<option value="se"
name="Helidon SE"
description="WebSever based on Virtual Threads">
<exec src="se/se.xml"/>
</option>
<option value="mp"
name="Helidon MP"
description="Declarative, MicroProfile compliant">
<exec src="mp/mp.xml"/>
</option>
</enum>
</inputs>
</step>
Expand Down
1 change: 1 addition & 0 deletions archetypes/helidon/src/main/archetype/mp/oci/oci-mp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ This will mount `~/.oci` as a volume in the running docker container.
<boolean path="docker.jlink-image">false</boolean>
<boolean path="k8s">true</boolean>
<boolean path="v8o">false</boolean>
<boolean path="jpms">false</boolean>
</presets>
<call method="pre-processed-models"/>
<exec src="/common/common.xml"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
<source src="/se/custom/database.xml"/>
<source src="/common/extra.xml"/>
<source src="/se/custom/extra.xml"/>
<exec src="/common/packaging.xml"/>
<source src="/common/observability.xml"/>
<source src="/se/custom/observability.xml"/>
<exec src="/common/packaging.xml"/>

<output>
<file source="files/src/main/resources/WEB/index.html" target="src/main/resources/WEB/index.html" if="${media} contains 'multipart'"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,9 @@
<archetype-script xmlns="https://helidon.io/archetype/2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://helidon.io/archetype/2.0 https://helidon.io/xsd/archetype-2.0.xsd">
<exec src="/common/presets.xml"/>
<presets>
<list path="media">
<value>json</value>
</list>
<boolean path="db">false</boolean>
<enum path="media.json-lib">jsonp</enum>
<boolean path="metrics">true</boolean>
<enum path="metrics.provider">microprofile</enum>
<boolean path="metrics.builtin">true</boolean>
<boolean path="health">true</boolean>
<boolean path="health.builtin">true</boolean>
<boolean path="tracing">false</boolean>
<list path="extra"/>
<boolean path="security">false</boolean>
<boolean path="docker">true</boolean>
<boolean path="docker.native-image">true</boolean>
<boolean path="docker.jlink-image">true</boolean>
<boolean path="k8s">false</boolean>
<boolean path="v8o">false</boolean>
</presets>
<exec src="/se/custom/custom-se.xml"/>
<source src="/common/sources.xml"/>
Expand Down
10 changes: 5 additions & 5 deletions archetypes/helidon/src/main/archetype/se/se.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@
description="Sample Helidon Nima project that includes multiple REST operations">
<exec src="quickstart/quickstart-se.xml"/>
</option>
<option value="custom"
name="Custom"
description="Custom Helidon SE project">
<exec src="custom/custom-se.xml"/>
</option>
<option value="database"
name="Database"
description="Helidon SE application that uses a database with JPA">
<exec src="database/database-se.xml"/>
</option>
<option value="custom"
name="Custom"
description="Custom Helidon SE project">
<exec src="custom/custom-se.xml"/>
</option>
</enum>
</inputs>
</step>
Expand Down

0 comments on commit 9f3a065

Please sign in to comment.