Skip to content

Commit

Permalink
latest review changes
Browse files Browse the repository at this point in the history
Signed-off-by: tvallin <thibault.vallin@oracle.com>
  • Loading branch information
tvallin committed Jun 7, 2024
1 parent 909ad29 commit f2a3b63
Show file tree
Hide file tree
Showing 19 changed files with 219 additions and 104 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2024 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-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">

<inputs>
<boolean id="health"
name="Health Checks"
description="Monitor your application’s health"
default="false"
optional="true">
<inputs>
<boolean id="builtin"
name="Built-in Health Checks"
description="Report common health check statuses"
default="true"
optional="true"/>
</inputs>
</boolean>
</inputs>
</archetype-script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2024 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-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">

<inputs>
<boolean id="tracing"
name="Tracing"
description="Distributed tracing system"
default="false"
optional="true">
<inputs>
<enum id="provider"
name="Select a Tracing Provider"
default="jaeger"
optional="true">
<option value="jaeger"
name="Jaeger"
description="Send traces to a Jaeger backend"/>
<option value="zipkin"
name="Zipkin"
description="Send traces to a Zipkin backend"/>
</enum>
</inputs>
</boolean>
</inputs>
</archetype-script>

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,26 @@
<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">

<methods>
<method name="jaeger">
<output if="${tracing}">
<model if="${tracing.provider} == 'jaeger'">
<list key="readme-sections">
<value file="files/README.jaeger.md"/>
</list>
</model>
</output>
</method>
<method name="zipkin">
<output if="${tracing}">
<model if="${tracing.provider} == 'zipkin'">
<list key="readme-sections">
<value file="files/README.zipkin.md"/>
</list>
</model>
</output>
</method>
</methods>
<call method="jaeger"/>
<call method="zipkin"/>
</archetype-script>
2 changes: 0 additions & 2 deletions archetypes/archetypes/src/main/archetype/features/output.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
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/output.xml"/>
<exec src="extra/output.xml"/>
<exec src="media/output.xml"/>
<exec src="observability/output.xml"/>
<exec src="packaging/output.xml"/>
<exec src="security/output.xml"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<exec src="/features/security/inputs.xml"/>
<exec src="../features/database/inputs.xml"/>
<exec src="/features/extra/inputs.xml"/>
<exec src="/features/observability/inputs.xml"/>
<exec src="../features/observability/inputs.xml"/>
<exec src="/features/packaging/inputs.xml"/>
<exec src="/features/project-customization/inputs.xml"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
<call method="jsonb"/>
<call method="jackson"/>
<call method="multipart"/>
<source src="/features/media/media-sources.xml"/>
<source src="/features/media/includes/media-sources.xml"/>
<output>
<!-- TODO https://github.com/oracle/helidon-build-tools/issues/609 -->
<model>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,11 @@
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">

<step name="Observability" optional="true">
<inputs>
<exec src="metrics/inputs.xml"/>
<exec src="/features/observability/includes/inputs-health.xml"/>
<exec src="/features/observability/includes/inputs-tracing.xml"/>
</inputs>
</step>
</archetype-script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2024 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-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">

<inputs>
<boolean id="metrics"
name="Metrics"
description="Collect application metrics"
default="false"
optional="true">
<inputs>
<enum id="provider"
name="Select a Metrics Provider"
default="microprofile"
optional="true">
<option value="microprofile"
name="MicroProfile"
description="Expose metrics using the MicroProfile API"/>
<option value="micrometer"
name="Micrometer"
description="Expose metrics using the Micrometer API"/>
</enum>
<boolean id="builtin"
name="Built-in Metrics"
description="Expose common metrics"
default="true"
optional="true"/>
</inputs>
</boolean>
</inputs>
</archetype-script>
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
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="microprofile/output.xml" if="${metrics.provider} == 'microprofile'"/>
<exec src="micrometer/output.xml" if="${metrics.provider} == 'micrometer'"/>
<exec src="includes/output-microprofile.xml" if="${metrics.provider} == 'microprofile'"/>
<exec src="includes/output-micrometer.xml" if="${metrics.provider} == 'micrometer'"/>
</archetype-script>
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@
<value key="health.builtin" if="${health}">${health.builtin}</value>
<value key="tracing" if="${tracing}">true</value>
<value key="tracing.provider" if="${tracing}">${tracing.provider}</value>
<list key="dependencies" if="${extra} contains 'fault-tolerance'">
<map if="!(${metrics}) || ${metrics.provider} == 'micrometer'">
<value key="groupId">io.helidon.microprofile.metrics</value>
<value key="artifactId">helidon-microprofile-metrics</value>
</map>
</list>
</model>
</output>
</archetype-script>
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<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">
<source src="/features/media/media-sources.xml"/>
<source src="/features/media/includes/media-sources.xml"/>
<output>
<templates engine="mustache" transformations="mustache,packaged">
<directory>files</directory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<exec src="/features/security/inputs.xml"/>
<exec src="../features/database/inputs.xml"/>
<exec src="/features/extra/inputs.xml"/>
<exec src="/features/observability/inputs.xml"/>
<exec src="../features/observability/inputs.xml"/>
<exec src="/features/packaging/inputs.xml"/>
<exec src="/features/project-customization/inputs.xml"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
<call method="jsonb"/>
<call method="jackson"/>
<call method="multipart"/>
<source src="/features/media/media-sources.xml"/>
<source src="/features/media/includes/media-sources.xml"/>
<output>
<!-- TODO https://github.com/oracle/helidon-build-tools/issues/609 -->
<model>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,12 @@
<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">

<step name="Observability" optional="true">
<inputs>
<exec src="metrics/inputs.xml"/>
<exec src="/features/observability/includes/inputs-health.xml"/>
<exec src="/features/observability/includes/inputs-tracing.xml"/>
</inputs>
</step>
</archetype-script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2024 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-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">

<inputs>
<boolean id="metrics"
name="Metrics"
description="Collect application metrics"
default="false"
optional="true">
<inputs>
<boolean id="builtin"
name="Built-in Metrics"
description="Expose common metrics"
default="true"
optional="true"/>
</inputs>
</boolean>
</inputs>
</archetype-script>

0 comments on commit f2a3b63

Please sign in to comment.