Skip to content

Commit

Permalink
Merge branch 'main' into 6495-provided-vs-optional-2 - resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Captain1653 committed May 5, 2023
2 parents 363f81e + 7c7cd61 commit 2830996
Show file tree
Hide file tree
Showing 467 changed files with 6,651 additions and 11,823 deletions.
4 changes: 2 additions & 2 deletions archetypes/helidon/filters.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2022 Oracle and/or its affiliates.
# Copyright (c) 2022, 2023 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.
Expand Down Expand Up @@ -40,7 +40,7 @@ metrics=!${metrics} || (${metrics.builtin})
tracing=!${tracing} || (${tracing} && ${metrics.provider} == 'microprofile')

# group extra options
extra=${extra} == [] || ${extra} == ['cors', 'webclient', 'fault-tolerance']
extra=${extra} == [] || ${extra} == ['cors', 'fault-tolerance']

# group docker, k8s and v8o
packaging=!(${docker} || ${k8s} || ${v8o}) || (${docker} && ${k8s} && ${v8o})
Expand Down
10 changes: 10 additions & 0 deletions archetypes/helidon/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,16 @@
<exec src="flavor.xml"/>
</entrypoint>
<inputFiltersFile>filters.properties</inputFiltersFile>
<validations>
<validation>
<match>any</match>
<fail>true</fail>
<patterns>
<pattern>**/*.mustache</pattern>
<pattern>**/__pkg__/**</pattern>
</patterns>
</validation>
</validations>
</configuration>
</plugin>
<plugin>
Expand Down
7 changes: 2 additions & 5 deletions archetypes/helidon/src/main/archetype/common/docker.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2022 Oracle and/or its affiliates.
Copyright (c) 2022, 2023 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.
Expand Down Expand Up @@ -60,10 +60,7 @@
<value>src</value>
</list>
<list key="native-sections" if="${db} &amp;&amp; ${flavor} == 'mp'">
<value file="/se/database/files/README.native.md" if="${docker.native-image}" template="mustache"/>
</list>
<list key="native-sections" if="${db} &amp;&amp; ${flavor} == 'se'">
<value file="/se/database/files/README.native.md" if="${docker.native-image} &amp;&amp; ${db.server} != 'mongodb'" template="mustache"/>
<value file="files/README.native.md.mustache" if="${docker.native-image}" template="mustache"/>
</list>
<list key="readme-sections">
<value order="50" template="mustache">
Expand Down
75 changes: 22 additions & 53 deletions archetypes/helidon/src/main/archetype/common/extra.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2022 Oracle and/or its affiliates.
Copyright (c) 2022, 2023 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.
Expand All @@ -23,60 +23,44 @@
<step name="Extra" optional="true">
<inputs>
<list id="extra" name="Select Additional Components" optional="true">
<option value="webclient" name="WebClient" description="Reactive HTTP client" if="${flavor} == 'se'">
<output>
<templates engine="mustache" transformations="mustache,packaged">
<directory>files</directory>
<includes>
<include>src/*/java/**/WebClientMain.java.mustache</include>
<include>src/*/java/**/WebClientMainTest.java.mustache</include>
</includes>
</templates>
</output>
</option>
<option value="fault-tolerance" name="Fault Tolerance" description="System for building resilient applications">
<output>
<templates engine="mustache" transformations="mustache,packaged">
<directory>files</directory>
<includes>
<include>src/*/java/**/FtService.java.mustache</include>
<include>src/*/java/**/FtServiceTest.java.mustache</include>
<include>src/*/java/**/FtResource.java.mustache</include>
<include>src/*/java/**/FtResourceTest.java.mustache</include>
</includes>
</templates>
<model>
<list key="dependencies" if="${flavor} == 'se'">
<map>
<value key="groupId">io.helidon.reactive.fault-tolerance</value>
<value key="artifactId">helidon-reactive-fault-tolerance</value>
</map>
</list>
<list key="dependencies" if="${flavor} == 'mp'">
<map>
<value key="groupId">io.helidon.microprofile</value>
<value key="artifactId">helidon-microprofile-fault-tolerance</value>
</map>
<map>
<value key="groupId">io.helidon.microprofile.metrics</value>
<value key="artifactId">helidon-microprofile-metrics</value>
</map>
</list>
<list key="Main-helidon-imports">
<value>io.helidon.common.http.Http</value>
<value>io.helidon.reactive.faulttolerance.BulkheadException</value>
<value>io.helidon.reactive.faulttolerance.CircuitBreakerOpenException</value>
</list>
<list key="Main-other-imports">
<value>java.util.concurrent.TimeoutException</value>
</list>
<list key="Main-routingBuilder">
<value><![CDATA[ .register("/ft", new FtService())
.error(BulkheadException.class,
(req, res, ex) -> res.status(Http.Status.SERVICE_UNAVAILABLE_503).send("bulkhead"))
.error(CircuitBreakerOpenException.class,
(req, res, ex) -> res.status(Http.Status.SERVICE_UNAVAILABLE_503).send("circuit breaker"))
.error(TimeoutException.class,
(req, res, ex) -> res.status(Http.Status.REQUEST_TIMEOUT_408).send("timeout"))
.error(Throwable.class,
(req, res, ex) -> res.status(Http.Status.INTERNAL_SERVER_ERROR_500)
.send(ex.getClass().getName() + ": " + ex.getMessage()))]]></value>
<list key="maven-plugins">
<value><![CDATA[
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<sun.net.http.allowRestrictedHeaders>true</sun.net.http.allowRestrictedHeaders>
</systemPropertyVariables>
</configuration>
</plugin>
]]></value>
</list>
</model>
</output>
Expand All @@ -87,7 +71,6 @@
<directory>files</directory>
<includes>
<include>src/*/java/**/TestCORS.java.mustache</include>
<include if="${flavor} == 'se'">src/*/java/**/CorsService.java.mustache</include>
</includes>
</templates>
<model>
Expand All @@ -96,10 +79,6 @@
<value key="groupId">io.helidon.microprofile</value>
<value key="artifactId">helidon-microprofile-cors</value>
</map>
<map if="${flavor} == 'se'">
<value key="groupId">io.helidon.reactive.webserver</value>
<value key="artifactId">helidon-reactive-webserver-cors</value>
</map>
</list>
<list key="SimpleGreetService-imports" if="${flavor} == 'mp'">
<value>io.helidon.microprofile.cors.CrossOrigin</value>
Expand All @@ -108,22 +87,12 @@
<value>jakarta.ws.rs.core.Response</value>
<value>jakarta.ws.rs.HttpMethod</value>
</list>
<list key="Main-helidon-imports" if="${flavor} == 'se'">
<value>io.helidon.reactive.webserver.cors.CorsSupport</value>
<value>io.helidon.cors.CrossOriginConfig</value>
</list>
<list key="Main-createRouting" if="${flavor} == 'se'">
<value><![CDATA[
CorsSupport corsSupport = CorsSupport.builder()
.addCrossOrigin(CrossOriginConfig.builder()
.allowOrigins("http://foo.com", "http://there.com")
.allowMethods("PUT", "DELETE")
.build())
.addCrossOrigin(CrossOriginConfig.create())
.build();]]></value>

<list key="FileServiceTest-annotations" if="${media} contains 'multipart'">
<value>@AddExtension(CorsCdiExtension.class)</value>
</list>
<list key="Main-routingBuilder" if="${flavor} == 'se'">
<value><![CDATA[ .register("/cors", corsSupport, new CorsService())]]></value>
<list key="FileServiceTest-helidon-imports" if="${media} contains 'multipart'">
<value>io.helidon.microprofile.cors.CorsCdiExtension</value>
</list>
<list key="SimpleGreetService-methods" if="${flavor} == 'mp'">
<value><![CDATA[
Expand Down
Loading

0 comments on commit 2830996

Please sign in to comment.