You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by me...@apache.org on 2023/04/08 14:26:23 UTC
[myfaces] branch main updated: MYFACES-4598: 4.0 Quarkus reduce WARNING noise (#565)
This is an automated email from the ASF dual-hosted git repository.
melloware pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/myfaces.git
The following commit(s) were added to refs/heads/main by this push:
new 215819083 MYFACES-4598: 4.0 Quarkus reduce WARNING noise (#565)
215819083 is described below
commit 215819083150777d4625193c2e91e178944261ff
Author: Melloware <me...@gmail.com>
AuthorDate: Sat Apr 8 10:26:18 2023 -0400
MYFACES-4598: 4.0 Quarkus reduce WARNING noise (#565)
---
.../quarkus/deployment/MyFacesProcessor.java | 20 +++++++++++++++++---
extensions/quarkus/showcase/pom.xml | 21 +++++++++++++++++++--
2 files changed, 36 insertions(+), 5 deletions(-)
diff --git a/extensions/quarkus/deployment/src/main/java/org/apache/myfaces/core/extensions/quarkus/deployment/MyFacesProcessor.java b/extensions/quarkus/deployment/src/main/java/org/apache/myfaces/core/extensions/quarkus/deployment/MyFacesProcessor.java
index 83de7004a..12ffd5afd 100644
--- a/extensions/quarkus/deployment/src/main/java/org/apache/myfaces/core/extensions/quarkus/deployment/MyFacesProcessor.java
+++ b/extensions/quarkus/deployment/src/main/java/org/apache/myfaces/core/extensions/quarkus/deployment/MyFacesProcessor.java
@@ -772,10 +772,14 @@ class MyFacesProcessor
for (ClassInfo type : types)
{
+ String typeName = type.name().toString();
// register type
- reflectiveClass.produce(new ReflectiveClassBuildItem(true, false, type.name().toString()));
+ reflectiveClass.produce(new ReflectiveClassBuildItem(true, false, typeName));
// and try to register the ClientProxy
- reflectiveClass.produce(new ReflectiveClassBuildItem(true, false, type.name().toString() + "_ClientProxy"));
+ if (shouldProxy(typeName))
+ {
+ reflectiveClass.produce(new ReflectiveClassBuildItem(true, false, typeName + "_ClientProxy"));
+ }
}
@@ -788,10 +792,20 @@ class MyFacesProcessor
// register type
reflectiveClass.produce(new ReflectiveClassBuildItem(true, false, typeName));
// and try to register the ClientProxy
- reflectiveClass.produce(new ReflectiveClassBuildItem(true, false, typeName + "_ClientProxy"));
+ if (shouldProxy(typeName))
+ {
+ reflectiveClass.produce(new ReflectiveClassBuildItem(true, false, typeName + "_ClientProxy"));
+ }
}
}
+ boolean shouldProxy(String typeName)
+ {
+ return !(typeName.startsWith("java.lang")
+ || typeName.startsWith("java.util")
+ || typeName.startsWith("jakarta.faces"));
+ }
+
void collectPublicTypes(ClassInfo type, List<ClassInfo> publicTypes, CombinedIndexBuildItem combinedIndex)
{
if (type == null)
diff --git a/extensions/quarkus/showcase/pom.xml b/extensions/quarkus/showcase/pom.xml
index 16c072228..4ed48a350 100644
--- a/extensions/quarkus/showcase/pom.xml
+++ b/extensions/quarkus/showcase/pom.xml
@@ -133,9 +133,20 @@
</build>
<profiles>
<profile>
- <id>native</id>
+ <id>native-image</id>
+ <activation>
+ <property>
+ <name>native</name>
+ </property>
+ </activation>
<build>
<plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>${native.surefire.skip}</skipTests>
+ </configuration>
+ </plugin>
<plugin>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
@@ -143,7 +154,7 @@
<executions>
<execution>
<goals>
- <goal>native-image</goal>
+ <goal>build</goal>
</goals>
<configuration>
<enableHttpUrlHandler>true</enableHttpUrlHandler>
@@ -172,6 +183,12 @@
</plugin>
</plugins>
</build>
+ <properties>
+ <skipITs>false</skipITs>
+ <quarkus.package.type>native</quarkus.package.type>
+ <quarkus.native.container-build>true</quarkus.native.container-build>
+ <quarkus.native.builder-image>mandrel</quarkus.native.builder-image>
+ </properties>
</profile>
</profiles>
</project>