Skip to content

Commit

Permalink
Inline presets and media sources
Browse files Browse the repository at this point in the history
  • Loading branch information
tvallin committed Aug 28, 2024
1 parent a21234e commit b70dbfa
Show file tree
Hide file tree
Showing 9 changed files with 129 additions and 101 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,26 @@
<call method="jackson"/>
<call method="jsonb"/>
<call method="multipart"/>
<source src="/features/includes/media-sources.xml"/>

<output>
<templates engine="mustache" transformations="mustache,packaged" if="!(${media} contains 'json')">
<directory>files</directory>
<includes>
<include>src/*/java/**/SimpleGreetResource.java.mustache</include>
</includes>
</templates>
<templates engine="mustache" transformations="json-mustache,packaged" if="['jsonb', 'jackson'] contains ${media.json-lib}">
<directory>files</directory>
<includes>
<include>src/*/java/**/*.json.mustache</include>
</includes>
</templates>
<templates engine="mustache" transformations="multipart-mustache,packaged" if="${media} contains 'multipart'">
<directory>files</directory>
<includes>
<include>src/*/java/**/*.multipart.mustache</include>
</includes>
</templates>
<!-- TODO https://github.com/oracle/helidon-build-tools/issues/609 -->
<model>
<value key="media-json" if="${media} contains 'json'">true</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,24 @@
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="/features/includes/presets.xml"/>
<presets>
<list path="media">
<value>json</value>
</list>
<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">true</boolean>
<boolean path="v8o">false</boolean>
<boolean path="jpms">false</boolean>
<boolean path="db">true</boolean>
</presets>
<exec src="/nodes/mp/nodes/custom/inputs.xml"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,25 @@
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">

<source src="/features/includes/media-sources.xml"/>
<output>
<templates engine="mustache" transformations="mustache,packaged" if="!(${media} contains 'json')">
<directory>files</directory>
<includes>
<include>src/*/java/**/GreetService.java.mustache</include>
</includes>
</templates>
<templates engine="mustache" transformations="jsonp-mustache,packaged" if="${media.json-lib} == 'jsonp'">
<directory>files</directory>
<includes>
<include>src/*/java/**/*.java.jsonp.mustache</include>
</includes>
</templates>
<templates engine="mustache" transformations="json-mustache,packaged" if="['jsonb', 'jackson'] contains ${media.json-lib}">
<directory>files</directory>
<includes>
<include>src/*/java/**/*.json.mustache</include>
</includes>
</templates>
<templates engine="mustache" transformations="mustache,packaged">
<directory>files</directory>
<includes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,24 @@
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="/features/includes/presets.xml"/>
<presets>
<list path="media">
<value>json</value>
</list>
<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">true</boolean>
<boolean path="v8o">false</boolean>
<boolean path="jpms">false</boolean>
<boolean path="db">false</boolean>
</presets>
<exec src="/nodes/mp/nodes/custom/inputs.xml"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,33 @@
<call method="jackson"/>
<call method="jsonb"/>
<call method="multipart"/>
<source src="/features/includes/media-sources.xml"/>

<output>
<templates engine="mustache" transformations="mustache,packaged" if="!(${media} contains 'json')">
<directory>files</directory>
<includes>
<include>src/*/java/**/SimpleGreetResource.java.mustache</include>
<include>src/*/java/**/GreetService.java.mustache</include>
</includes>
</templates>
<templates engine="mustache" transformations="jsonp-mustache,packaged" if="${media.json-lib} == 'jsonp'">
<directory>files</directory>
<includes>
<include>src/*/java/**/*.java.jsonp.mustache</include>
</includes>
</templates>
<templates engine="mustache" transformations="json-mustache,packaged" if="['jsonb', 'jackson'] contains ${media.json-lib}">
<directory>files</directory>
<includes>
<include>src/*/java/**/*.json.mustache</include>
</includes>
</templates>
<templates engine="mustache" transformations="multipart-mustache,packaged" if="${media} contains 'multipart'">
<directory>files</directory>
<includes>
<include>src/*/java/**/*.multipart.mustache</include>
</includes>
</templates>
<file source="files/src/main/resources/WEB/index.html" target="src/main/resources/WEB/index.html" if="${media} contains 'multipart'"/>
<model>
<value key="media-json" if="${media} contains 'json'">true</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,24 @@
<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="/features/includes/presets.xml"/>
<presets>
<list path="media">
<value>json</value>
</list>
<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">true</boolean>
<boolean path="v8o">false</boolean>
<boolean path="jpms">false</boolean>
<boolean path="db">true</boolean>
</presets>
<exec src="/nodes/se/nodes/custom/inputs.xml"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,24 @@
<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="/features/includes/presets.xml"/>
<presets>
<list path="media">
<value>json</value>
</list>
<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">true</boolean>
<boolean path="v8o">false</boolean>
<boolean path="jpms">false</boolean>
<boolean path="db">false</boolean>
</presets>
<exec src="/nodes/se/nodes/custom/inputs.xml"/>
Expand Down

0 comments on commit b70dbfa

Please sign in to comment.