Skip to content

Commit

Permalink
Merge with master
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Bescos Gascon <[email protected]>
  • Loading branch information
jbescos committed Jun 26, 2023
2 parents 174cfd2 + 823bfd9 commit 127d608
Show file tree
Hide file tree
Showing 689 changed files with 16,410 additions and 14,951 deletions.
4 changes: 2 additions & 2 deletions applications/mp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<description>Parent pom for Helidon MP applications</description>

<properties>
<version.plugin.jandex>1.0.6</version.plugin.jandex>
<version.plugin.jandex>3.1.2</version.plugin.jandex>
<version.plugin.jaxb2>0.14.0</version.plugin.jaxb2>
<version.plugin.eclipselink>2.7.5.1</version.plugin.eclipselink>
<version.plugin.hibernate.enhance>6.1.7.Final</version.plugin.hibernate.enhance>
Expand All @@ -43,7 +43,7 @@
<pluginManagement>
<plugins>
<plugin>
<groupId>org.jboss.jandex</groupId>
<groupId>io.smallrye</groupId>
<artifactId>jandex-maven-plugin</artifactId>
<version>${version.plugin.jandex}</version>
<executions>
Expand Down
3 changes: 1 addition & 2 deletions applications/parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<maven.compiler.target>${maven.compiler.source}</maven.compiler.target>
<maven.compiler.release>${maven.compiler.source}</maven.compiler.release>
<version.plugin.compiler>3.8.1</version.plugin.compiler>
<version.plugin.dependency>3.1.2</version.plugin.dependency>
<version.plugin.dependency>3.6.0</version.plugin.dependency>
<version.plugin.exec>1.6.0</version.plugin.exec>
<version.plugin.failsafe>3.0.0-M5</version.plugin.failsafe>
<version.plugin.helidon>3.0.3</version.plugin.helidon>
Expand Down Expand Up @@ -108,7 +108,6 @@
<overWriteIfNewer>true</overWriteIfNewer>
<overWriteIfNewer>true</overWriteIfNewer>
<includeScope>runtime</includeScope>
<excludeScope>test</excludeScope>
</configuration>
</execution>
</executions>
Expand Down
6 changes: 3 additions & 3 deletions archetypes/helidon/src/main/archetype/mp/common/common-mp.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2021 Oracle and/or its affiliates.
Copyright (c) 2021, 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 @@ -28,7 +28,7 @@
<value key="parent-artifactId">helidon-mp</value>
<list key="dependencies">
<map>
<value key="groupId">org.jboss</value>
<value key="groupId">io.smallrye</value>
<value key="artifactId">jandex</value>
<value key="scope">runtime</value>
</map>
Expand All @@ -55,7 +55,7 @@
</list>
<list key="maven-plugins">
<value><![CDATA[ <plugin>
<groupId>org.jboss.jandex</groupId>
<groupId>io.smallrye</groupId>
<artifactId>jandex-maven-plugin</artifactId>
<executions>
<execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<build>
<plugins>
<plugin>
<groupId>org.jboss.jandex</groupId>
<groupId>io.smallrye</groupId>
<artifactId>jandex-maven-plugin</artifactId>
<executions>
<execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<properties>
<version.lib.jackson.databind.nullable>0.2.3</version.lib.jackson.databind.nullable>
<version.plugin.jandex>1.1.0</version.plugin.jandex>
<version.plugin.jandex>3.1.2</version.plugin.jandex>
<version.plugin.openapi>6.2.1</version.plugin.openapi>
</properties>

Expand All @@ -33,7 +33,7 @@
<pluginManagement>
<plugins>
<plugin>
<groupId>org.jboss.jandex</groupId>
<groupId>io.smallrye</groupId>
<artifactId>jandex-maven-plugin</artifactId>
<version>${version.plugin.jandex}</version>
<executions>
Expand Down
4 changes: 2 additions & 2 deletions archetypes/helidon/src/main/archetype/mp/oci/oci-mp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ ocimetrics:
<value key="scope">runtime</value>
</map>
<map>
<value key="groupId">org.jboss</value>
<value key="groupId">io.smallrye</value>
<value key="artifactId">jandex</value>
<value key="scope">runtime</value>
</map>
Expand All @@ -220,7 +220,7 @@ ocimetrics:
</list>
<list key="maven-plugins">
<value template="mustache"><![CDATA[ <plugin>
<groupId>org.jboss.jandex</groupId>
<groupId>io.smallrye</groupId>
<artifactId>jandex-maven-plugin</artifactId>
<executions>
<execution>
Expand Down
17 changes: 12 additions & 5 deletions bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,6 @@
<version>${helidon.version}</version>
</dependency>
<!-- WebClient -->
<dependency>
<groupId>io.helidon.reactive.webclient</groupId>
<artifactId>helidon-reactive-webclient-jaxrs</artifactId>
<version>${helidon.version}</version>
</dependency>
<dependency>
<groupId>io.helidon.reactive.webclient</groupId>
<artifactId>helidon-reactive-webclient</artifactId>
Expand Down Expand Up @@ -1492,6 +1487,18 @@
<version>${helidon.version}</version>
</dependency>

<!-- Pico Integrations related -->
<dependency>
<groupId>io.helidon.integrations.oci.sdk</groupId>
<artifactId>helidon-integrations-oci-sdk-processor</artifactId>
<version>${helidon.version}</version>
</dependency>
<dependency>
<groupId>io.helidon.integrations.oci.sdk</groupId>
<artifactId>helidon-integrations-oci-sdk-runtime</artifactId>
<version>${helidon.version}</version>
</dependency>

</dependencies>
</dependencyManagement>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
import io.helidon.common.types.TypeInfo;
import io.helidon.common.types.TypeName;
import io.helidon.common.types.TypeNameDefault;
import io.helidon.common.types.TypedElementName;
import io.helidon.common.types.TypedElementInfo;
import io.helidon.config.metadata.ConfiguredOption;

import static io.helidon.builder.config.spi.ConfigBeanInfo.LevelType;
Expand Down Expand Up @@ -124,7 +124,7 @@ protected void preValidate(TypeName implTypeName,
* Generic/simple map types are not supported on config beans, only &lt;String, &lt;Known ConfigBean types&gt;&gt;.
*/
private void assertNoGenericMaps(TypeInfo typeInfo) {
List<TypedElementName> list = typeInfo.elementInfo().stream()
List<TypedElementInfo> list = typeInfo.interestingElementInfo().stream()
.filter(it -> it.typeName().isMap())
.filter(it -> {
TypeName typeName = it.typeName();
Expand Down Expand Up @@ -292,7 +292,7 @@ protected void appendExtraBuilderMethods(StringBuilder builder,

int i = 0;
for (String attrName : ctx.allAttributeNames()) {
TypedElementName method = ctx.allTypeInfos().get(i);
TypedElementInfo method = ctx.allTypeInfos().get(i);
String configKey = toConfigKey(attrName, method, ctx.builderTriggerAnnotation());

// resolver.of(config, "port", int.class).ifPresent(this::port);
Expand Down Expand Up @@ -449,7 +449,7 @@ private void javaDocAcceptResolveConfigCtx(StringBuilder builder,
}

private String toConfigKey(String attrName,
TypedElementName method,
TypedElementInfo method,
AnnotationAndValue ignoredBuilderAnnotation) {
String configKey = null;
Optional<? extends AnnotationAndValue> configuredOptions = AnnotationAndValueDefault
Expand All @@ -473,7 +473,7 @@ private static void assertNoAnnotation(String annoTypeName,
+ " on " + typeInfo.typeName());
}

for (TypedElementName elem : typeInfo.elementInfo()) {
for (TypedElementInfo elem : typeInfo.interestingElementInfo()) {
anno = AnnotationAndValueDefault.findFirst(annoTypeName, elem.annotations());
if (anno.isEmpty()) {
anno = AnnotationAndValueDefault.findFirst(annoTypeName, elem.elementTypeAnnotations());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
import io.helidon.common.types.TypeInfoDefault;
import io.helidon.common.types.TypeName;
import io.helidon.common.types.TypeNameDefault;
import io.helidon.common.types.TypedElementName;
import io.helidon.common.types.TypedElementNameDefault;
import io.helidon.common.types.TypedElementInfo;
import io.helidon.common.types.TypedElementInfoDefault;

import org.junit.jupiter.api.Test;

Expand Down Expand Up @@ -111,11 +111,11 @@ void preValidateConfigBeansMustBeRootToHaveDefaults() {

@Test
void preValidateConfigBeansMustNotHaveDuplicateSingularNames() {
TypedElementName method1 = TypedElementNameDefault.builder()
TypedElementInfo method1 = TypedElementInfoDefault.builder()
.elementName("socket")
.typeName(String.class)
.build();
TypedElementName method2 = TypedElementNameDefault.builder()
TypedElementInfo method2 = TypedElementInfoDefault.builder()
.elementName("socketSet")
.typeName(String.class)
.addAnnotation(AnnotationAndValueDefault.create(Singular.class, "socket"))
Expand All @@ -124,7 +124,7 @@ void preValidateConfigBeansMustNotHaveDuplicateSingularNames() {
TypeInfo typeInfo = TypeInfoDefault.builder()
.typeKind(TypeInfo.KIND_INTERFACE)
.typeName(TypeNameDefault.create(getClass()))
.elementInfo(Set.of(method1, method2))
.interestingElementInfo(Set.of(method1, method2))
.build();
AnnotationAndValueDefault configBeanAnno = AnnotationAndValueDefault.builder()
.typeName(TypeNameDefault.create(ConfigBean.class))
Expand All @@ -141,7 +141,7 @@ void preValidateConfigBeansMustNotHaveDuplicateSingularNames() {

@Test
void preValidateConfigBeansMustHaveMapTypesWithNestedConfigBeans() {
TypedElementName method1 = TypedElementNameDefault.builder()
TypedElementInfo method1 = TypedElementInfoDefault.builder()
.elementName("socket")
.typeName(TypeNameDefault.builder()
.type(Map.class)
Expand All @@ -154,7 +154,7 @@ void preValidateConfigBeansMustHaveMapTypesWithNestedConfigBeans() {
TypeInfo typeInfo = TypeInfoDefault.builder()
.typeKind(TypeInfo.KIND_INTERFACE)
.typeName(TypeNameDefault.create(getClass()))
.elementInfo(Set.of(method1))
.interestingElementInfo(Set.of(method1))
.build();
AnnotationAndValueDefault configBeanAnno = AnnotationAndValueDefault.builder()
.typeName(TypeNameDefault.create(ConfigBean.class))
Expand All @@ -172,7 +172,7 @@ void preValidateConfigBeansMustHaveMapTypesWithNestedConfigBeans() {
creator.preValidate(implTypeName, typeInfo, configBeanAnno);

// now we will validate the exceptions when ConfigBeans are attempted to be embedded
TypedElementName method2 = TypedElementNameDefault.builder()
TypedElementInfo method2 = TypedElementInfoDefault.builder()
.elementName("unsupported1")
.typeName(TypeNameDefault.builder()
.type(Map.class)
Expand All @@ -182,7 +182,7 @@ void preValidateConfigBeansMustHaveMapTypesWithNestedConfigBeans() {
TypeNameDefault.create(getClass())))
.build())
.build();
TypedElementName method3 = TypedElementNameDefault.builder()
TypedElementInfo method3 = TypedElementInfoDefault.builder()
.elementName("unsupported2")
.typeName(TypeNameDefault.builder()
.type(Map.class)
Expand All @@ -195,7 +195,7 @@ void preValidateConfigBeansMustHaveMapTypesWithNestedConfigBeans() {
TypeInfo typeInfo2 = TypeInfoDefault.builder()
.typeKind(TypeInfo.KIND_INTERFACE)
.typeName(TypeNameDefault.create(getClass()))
.elementInfo(List.of(method2, method3))
.interestingElementInfo(List.of(method2, method3))
.referencedTypeNamesToAnnotations(Map.of(TypeNameDefault.create(getClass()),
List.of(AnnotationAndValueDefault.create(Builder.class))))
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import io.helidon.common.types.TypeInfo;
import io.helidon.common.types.TypeName;
import io.helidon.common.types.TypedElementName;
import io.helidon.common.types.TypedElementInfo;

/**
* Java {@link java.util.ServiceLoader} provider interface used to discover type info creators.
Expand Down Expand Up @@ -58,13 +58,13 @@ Optional<TypeInfo> createBuilderTypeInfo(TypeName annoTypeName,
* @param mirror the type mirror for the element being processed
* @param processingEnv the processing environment
* @param elementOfInterest the predicate filter to determine whether the element is of interest, and therefore should be
* included in {@link TypeInfo#elementInfo()}. Otherwise, if the predicate indicates it is not of
* included in {@link TypeInfo#interestingElementInfo()}. Otherwise, if the predicate indicates it is not of
* interest then the method will be placed under {@link TypeInfo#otherElementInfo()} instead
* @return the type info associated with the arguments being processed, or empty if not able to process the type
*/
Optional<TypeInfo> createTypeInfo(TypeElement element,
TypeMirror mirror,
ProcessingEnvironment processingEnv,
Predicate<TypedElementName> elementOfInterest);
Predicate<TypedElementInfo> elementOfInterest);

}
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public static boolean validateAndParseMethodName(String methodName,
* @return true if it appears to be a reserved word
*/
public static boolean isReservedWord(String word) {
return RESERVED.get().contains(word.toUpperCase());
return RESERVED.get().stream().anyMatch(word::equalsIgnoreCase);
}

/**
Expand Down
Loading

0 comments on commit 127d608

Please sign in to comment.