Skip to content

Commit ca8a46b

Browse files
Integrate Helidon Build Tools v3.0.0-RC3. (helidon-io#4580)
* Integrate Helidon Build Tools v3.0.0-RC3. Move the archetype input filters to a separate properties file. * Fix media support and broken permutations.
1 parent 615a043 commit ca8a46b

18 files changed

Lines changed: 227 additions & 103 deletions

File tree

applications/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
<version.plugin.dependency>3.1.2</version.plugin.dependency>
4848
<version.plugin.exec>1.6.0</version.plugin.exec>
4949
<version.plugin.failsafe>3.0.0-M5</version.plugin.failsafe>
50-
<version.plugin.helidon>3.0.0-RC2</version.plugin.helidon>
51-
<version.plugin.helidon-cli>3.0.0-RC2</version.plugin.helidon-cli>
50+
<version.plugin.helidon>3.0.0-RC3</version.plugin.helidon>
51+
<version.plugin.helidon-cli>3.0.0-RC3</version.plugin.helidon-cli>
5252
<version.plugin.jar>3.0.2</version.plugin.jar>
5353
<version.plugin.os>1.5.0.Final</version.plugin.os>
5454
<version.plugin.protobuf>0.5.1</version.plugin.protobuf>
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
#
2+
# Copyright (c) 2022 Oracle and/or its affiliates.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
# This file contains permutation input filters, the property names are not used only the values.
18+
#
19+
# The number of computed permutations can be very large and quickly become un-manageable.
20+
# The build will output warnings when the number of computed permutations for a node is > 150000.
21+
# Filters are used to restrain the computed permutations.
22+
#
23+
# Filters are taken into account when they evaluate successfully. If a variable is unresolved, the result is ignored.
24+
# A filter that needs to restrain a specific combination should only reference variables in the scope of the target node.
25+
26+
# never combine multipart with other media options
27+
multipart=${media} == 'multipart' || !(${media} contains 'multipart')
28+
29+
# group metrics, tracing and health together
30+
observability=!(${metrics} || ${tracing} || ${health}) || \
31+
(${metrics} && ${tracing} && ${health})
32+
33+
# force health.builtin=true
34+
health=!${health} || (${health.builtin})
35+
36+
# force metrics.builtin=true
37+
metrics=!${metrics} || (${metrics.builtin})
38+
39+
# force metrics.provider='microprofile' when tracing=true
40+
tracing=!${tracing} || (${tracing} && ${metrics.provider} == 'microprofile')
41+
42+
# group extra options
43+
extra=${extra} == [] || ${extra} == ['cors', 'webclient', 'fault-tolerance']
44+
45+
# group docker, k8s and v8o
46+
packaging=!(${docker} || ${k8s} || ${v8o}) || (${docker} && ${k8s} && ${v8o})
47+
48+
# force docker.native-image=true and docker.jlink-image=true when docker=true
49+
docker=!${docker} || (${docker.native-image} && ${docker.jlink-image})
50+
51+
# force single option for security.atn
52+
security-atn=\
53+
${security.atn} == ['oidc'] || \
54+
${security.atn} == ['jwt'] || \
55+
${security.atn} == ['google'] || \
56+
${security.atn} == ['http-signature']
57+
58+
# only combine security.atz with security.atn=oidc
59+
security-atz=\
60+
${security.atz} == [] || \
61+
(${security.atz} == 'abac' && ${security.atn} == 'oidc')
62+
63+
# do not combine media and security
64+
security-media=\
65+
${app-type} != 'custom' || (${app-type} == 'custom' && \
66+
(${security} && ${media} == []) || !${security})
67+
68+
# do not combine metrics and media
69+
metrics-media=\
70+
${app-type} != 'custom' || (${app-type} == 'custom' && \
71+
(${metrics} && ${media} == []) || !${metrics})
72+
73+
# do not combine metrics and security
74+
security-metrics=\
75+
${app-type} != 'custom' || (${app-type} == 'custom' && \
76+
(${metrics} && !${security}) || !${metrics})
77+
78+
# do not combine docker and media
79+
docker-media=\
80+
${app-type} != 'custom' || (${app-type} == 'custom' && \
81+
(${docker} && ${media} == []) || !${docker})
82+
83+
# do not combine docker and security
84+
docker-security=\
85+
${app-type} != 'custom' || (${app-type} == 'custom' && \
86+
(${docker} && !${security}) || !${docker})
87+
88+
# do not combine docker and tracing
89+
docker-tracing=\
90+
${app-type} != 'custom' || (${app-type} == 'custom' && \
91+
(${docker} && !${tracing}) || !${docker})
92+
93+
# do not combine docker and extra
94+
docker-extra=\
95+
${app-type} != 'custom' || (${app-type} == 'custom' && \
96+
(${docker} && ${extra} != []) || !${docker})
97+
98+
# do not combine security and extra
99+
extra-security=\
100+
${app-type} != 'custom' || (${app-type} == 'custom' && \
101+
(!${security} && ${extra} != []) || (${security} && ${extra} == []))
102+
103+
# do not combine custom and db
104+
custom-db=\
105+
${app-type} != 'custom' || (${app-type} == 'custom' && \
106+
!${db})
107+
108+
# do not combine media.json-lib=jackson when db.auto-ddl=true
109+
ddl-media=\
110+
${app-type} != 'database' || (${app-type} == 'database' && \
111+
(${db.auto-ddl} && ${media.json-lib} == 'jackson') || \
112+
(!${db.auto-ddl} && ${media.json-lib} != 'jackson'))
113+
114+
# do not combine media.json-lib=jackson when db.cp=hikaricp
115+
hikaricp-media=\
116+
${app-type} != 'database' || (${app-type} == 'database' && \
117+
(${db.cp} == 'hikaricp' && ${media.json-lib} == 'jackson') || \
118+
(${db.cp} != 'hikaricp' && ${media.json-lib} != 'jackson'))
119+
120+
# do not combine app-type=database when health=true
121+
db-health=\
122+
${app-type} != 'database' || (${app-type} == 'database' && \
123+
!${health})

archetypes/helidon/pom.xml

Lines changed: 1 addition & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -54,51 +54,7 @@
5454
</variables>
5555
<exec src="flavor.xml"/>
5656
</entrypoint>
57-
<inputFilters>
58-
<!-- TODO test cdata, if not go with a separate file -->
59-
<!-- TODO look at multiline expressions -->
60-
<!-- TODO look at equality with arrays (== ['foo'] ; == []) -->
61-
<!--suppress UnresolvedMavenProperty -->
62-
<filter>${media} == 'multipart' || !(${media} contains 'multipart')</filter>
63-
<!--suppress UnresolvedMavenProperty -->
64-
<filter>!(${metrics} || ${tracing} || ${health}) || (${metrics} &amp;&amp; ${tracing} &amp;&amp; ${health})</filter>
65-
<!--suppress UnresolvedMavenProperty -->
66-
<filter>!${health} || (${health.builtin})</filter>
67-
<!--suppress UnresolvedMavenProperty -->
68-
<filter>!${metrics} || (${metrics.builtin})</filter>
69-
<!--suppress UnresolvedMavenProperty -->
70-
<filter>!${tracing} || (${tracing} &amp;&amp; ${metrics.provider} == 'microprofile')</filter>
71-
<!--suppress UnresolvedMavenProperty -->
72-
<filter>${extra} == [] || (${extra} contains 'cors' &amp;&amp; ${extra} contains 'webclient' &amp;&amp; ${extra} contains 'fault-tolerance')</filter>
73-
<!--suppress UnresolvedMavenProperty -->
74-
<filter>!(${docker} || ${k8s} || ${v8o}) || (${docker} &amp;&amp; ${k8s} &amp;&amp; ${v8o})</filter>
75-
<!--suppress UnresolvedMavenProperty -->
76-
<filter>!${docker} || (${docker.native-image} &amp;&amp; ${docker.jlink-image})</filter>
77-
<!--suppress UnresolvedMavenProperty -->
78-
<filter>${security.atn} == 'oidc' || ${security.atn} == 'jwt' || ${security.atn} == 'google' || ${security.atn} == 'http-signature'</filter>
79-
<!--suppress UnresolvedMavenProperty -->
80-
<filter>(${security.atz} == 'abac' &amp;&amp; ${security.atn} == 'oidc') || ${security.atz} == 'none'</filter>
81-
<!--suppress UnresolvedMavenProperty -->
82-
<filter>(${app-type} == 'custom' &amp;&amp; ${security} == 'true' &amp;&amp; ${media} == 'none') || ${security} == 'false' || ${app-type} != 'custom'</filter>
83-
<!--suppress UnresolvedMavenProperty -->
84-
<filter>(${app-type} == 'custom' &amp;&amp; ${metrics} == 'true' &amp;&amp; ${media} == 'none') || ${metrics} == 'false' || ${app-type} != 'custom'</filter>
85-
<!--suppress UnresolvedMavenProperty -->
86-
<filter>(${app-type} == 'custom' &amp;&amp; ${metrics} == 'true' &amp;&amp; ${security} == 'false') || ${metrics} == 'false' || ${app-type} != 'custom'</filter>
87-
<!--suppress UnresolvedMavenProperty -->
88-
<filter>(${app-type} == 'custom' &amp;&amp; ${docker} == 'true' &amp;&amp; ${media} == 'none') || ${docker} == 'false' || ${app-type} != 'custom'</filter>
89-
<!--suppress UnresolvedMavenProperty -->
90-
<filter>(${app-type} == 'custom' &amp;&amp; ${docker} == 'true' &amp;&amp; ${security} == 'false') || ${docker} == 'false' || ${app-type} != 'custom'</filter>
91-
<!--suppress UnresolvedMavenProperty -->
92-
<filter>(${app-type} == 'custom' &amp;&amp; ${docker} == 'true' &amp;&amp; ${tracing} == 'false') || ${docker} == 'false' || ${app-type} != 'custom'</filter>
93-
<!--suppress UnresolvedMavenProperty -->
94-
<filter>(${app-type} == 'custom' &amp;&amp; ${db} == 'false') || ${app-type} != 'custom'</filter>
95-
<!--suppress UnresolvedMavenProperty -->
96-
<filter>(${app-type} == 'database' &amp;&amp; ${db.auto-ddl} == 'true') &amp;&amp; ${media.json-lib} == 'jackson' || (${db.auto-ddl} == 'false' &amp;&amp; ${media.json-lib} != 'jackson') || ${app-type} != 'database'</filter>
97-
<!--suppress UnresolvedMavenProperty -->
98-
<filter>(${app-type} == 'database' &amp;&amp; ${db.cp} == 'hikaricp') &amp;&amp; ${media.json-lib} == 'jackson' || (${db.cp} != 'hikaricp' &amp;&amp; ${media.json-lib} != 'jackson' ) || ${app-type} != 'database'</filter>
99-
<!--suppress UnresolvedMavenProperty -->
100-
<filter>(${app-type} == 'database' &amp;&amp; ${health} == 'false') || ${app-type} != 'database'</filter>
101-
</inputFilters>
57+
<inputFiltersFile>filters.properties</inputFiltersFile>
10258
</configuration>
10359
</plugin>
10460
<plugin>

archetypes/helidon/src/main/archetype/common/extra.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<step name="Extra" optional="true">
2424
<inputs>
2525
<list id="extra" name="Select Additional Components" optional="true">
26-
<option value="webclient" name="WebClient" description="Reactive HTTP client">
26+
<option value="webclient" name="WebClient" description="Reactive HTTP client" if="${flavor} == 'se'">
2727
<output>
2828
<templates engine="mustache" transformations="mustache,packaged">
2929
<directory>files</directory>

archetypes/helidon/src/main/archetype/common/files/pom.xml.mustache

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
{{#mainClass}}
1818
<mainClass>{{package}}.Main</mainClass>
1919
{{/mainClass}}
20-
<helidon.version>{{helidon-version}}</helidon.version>
2120
</properties>
2221

2322
<dependencies>

0 commit comments

Comments
 (0)