From 12952ea2f538def99741011a350580935bfd4427 Mon Sep 17 00:00:00 2001 From: Melloware Date: Wed, 4 Dec 2024 13:35:54 -0500 Subject: [PATCH] PrimeFaces 15.0.0-RC1 (#302) --- pom.xml | 14 +++----- quarkus-primefaces/deployment/pom.xml | 7 +--- .../deployment/PrimeFacesProcessor.java | 14 +++----- quarkus-primefaces/runtime/pom.xml | 19 +++++----- .../primefaces/runtime/PrimeFacesFeature.java | 2 +- .../graal/DeleteApacheCommonsFileUpload.java | 35 ------------------- .../runtime/graal/DeleteFeedInput.java | 14 -------- .../runtime/graal/SubstituteChartUtils.java | 18 ---------- .../graal/SubstituteFeedReaderRenderer.java | 23 ------------ 9 files changed, 21 insertions(+), 125 deletions(-) delete mode 100644 quarkus-primefaces/runtime/src/main/java/io/quarkus/primefaces/runtime/graal/DeleteApacheCommonsFileUpload.java delete mode 100644 quarkus-primefaces/runtime/src/main/java/io/quarkus/primefaces/runtime/graal/DeleteFeedInput.java delete mode 100644 quarkus-primefaces/runtime/src/main/java/io/quarkus/primefaces/runtime/graal/SubstituteChartUtils.java delete mode 100644 quarkus-primefaces/runtime/src/main/java/io/quarkus/primefaces/runtime/graal/SubstituteFeedReaderRenderer.java diff --git a/pom.xml b/pom.xml index 0e3de7f..58a16cb 100644 --- a/pom.xml +++ b/pom.xml @@ -23,12 +23,12 @@ HEAD - 3.15.1 - 0.0.3 + 3.15.2 + 1.0.0 2.1.1 3.1.2 - 14.0.8 - 14.0.8 + 15.0.0-RC1 + 15.0.0-RC1 4.1.0-RC3 17 @@ -80,12 +80,6 @@ 2.0.0 test - - net.sourceforge.htmlunit - htmlunit - 2.70.0 - test - org.assertj assertj-core diff --git a/quarkus-primefaces/deployment/pom.xml b/quarkus-primefaces/deployment/pom.xml index 9f397c8..32ff3d1 100644 --- a/quarkus-primefaces/deployment/pom.xml +++ b/quarkus-primefaces/deployment/pom.xml @@ -38,12 +38,7 @@ io.quarkiverse.barcode - quarkus-barcode4j-deployment - ${quarkus-barcode.version} - - - io.quarkiverse.barcode - quarkus-qrcodegen-deployment + quarkus-okapi-deployment ${quarkus-barcode.version} diff --git a/quarkus-primefaces/deployment/src/main/java/io/quarkiverse/primefaces/deployment/PrimeFacesProcessor.java b/quarkus-primefaces/deployment/src/main/java/io/quarkiverse/primefaces/deployment/PrimeFacesProcessor.java index 996f805..b4d1d23 100644 --- a/quarkus-primefaces/deployment/src/main/java/io/quarkiverse/primefaces/deployment/PrimeFacesProcessor.java +++ b/quarkus-primefaces/deployment/src/main/java/io/quarkiverse/primefaces/deployment/PrimeFacesProcessor.java @@ -3,7 +3,6 @@ import java.util.ArrayList; import java.util.List; -import org.primefaces.model.file.CommonsUploadedFile; import org.primefaces.util.Constants; import org.primefaces.util.PropertyDescriptorResolver; @@ -23,7 +22,6 @@ import io.quarkus.deployment.pkg.builditem.UberJarMergedResourceBuildItem; import io.quarkus.primefaces.runtime.PrimeFacesFeature; import io.quarkus.primefaces.runtime.PrimeFacesRecorder; -import io.quarkus.undertow.deployment.ServletInitParamBuildItem; class PrimeFacesProcessor extends AbstractJandexProcessor { @@ -44,6 +42,8 @@ void indexTransitiveDependencies(BuildProducer index) index.produce(new IndexDependencyBuildItem("com.googlecode.owasp-java-html-sanitizer", "owasp-java-html-sanitizer")); index.produce(new IndexDependencyBuildItem("org.primefaces", "primefaces")); index.produce(new IndexDependencyBuildItem("software.xdev", "chartjs-java-model")); + index.produce(new IndexDependencyBuildItem("com.apptasticsoftware", "rssreader")); + } @BuildStep @@ -101,10 +101,13 @@ void substrateResourceBuildItems(BuildProducer nat resourceBundleBuildItem.produce(new NativeImageResourceBundleBuildItem("org.primefaces.Messages_fa")); resourceBundleBuildItem.produce(new NativeImageResourceBundleBuildItem("org.primefaces.Messages_fr")); resourceBundleBuildItem.produce(new NativeImageResourceBundleBuildItem("org.primefaces.Messages_hi")); + resourceBundleBuildItem.produce(new NativeImageResourceBundleBuildItem("org.primefaces.Messages_hr")); resourceBundleBuildItem.produce(new NativeImageResourceBundleBuildItem("org.primefaces.Messages_in")); resourceBundleBuildItem.produce(new NativeImageResourceBundleBuildItem("org.primefaces.Messages_it")); + resourceBundleBuildItem.produce(new NativeImageResourceBundleBuildItem("org.primefaces.Messages_ja")); resourceBundleBuildItem.produce(new NativeImageResourceBundleBuildItem("org.primefaces.Messages_ka")); resourceBundleBuildItem.produce(new NativeImageResourceBundleBuildItem("org.primefaces.Messages_ko")); + resourceBundleBuildItem.produce(new NativeImageResourceBundleBuildItem("org.primefaces.Messages_lt")); resourceBundleBuildItem.produce(new NativeImageResourceBundleBuildItem("org.primefaces.Messages_lv")); resourceBundleBuildItem.produce(new NativeImageResourceBundleBuildItem("org.primefaces.Messages_nl")); resourceBundleBuildItem.produce(new NativeImageResourceBundleBuildItem("org.primefaces.Messages_no")); @@ -175,7 +178,6 @@ void registerForSerialization(PrimeFacesRecorder recorder, BuildProducer models = collectClassesInPackage(combinedIndex, "org.primefaces.model"); - models.remove(CommonsUploadedFile.class.getName()); final List classNames = new ArrayList<>(models); // Chart XDev models @@ -189,10 +191,4 @@ void registerForSerialization(PrimeFacesRecorder recorder, BuildProducer initParam) { - // only native uploading is supported no need for Commons FileUpload - initParam.produce(new ServletInitParamBuildItem(Constants.ContextParams.UPLOADER, "native")); - } } \ No newline at end of file diff --git a/quarkus-primefaces/runtime/pom.xml b/quarkus-primefaces/runtime/pom.xml index 0c075a3..da71149 100644 --- a/quarkus-primefaces/runtime/pom.xml +++ b/quarkus-primefaces/runtime/pom.xml @@ -37,22 +37,23 @@ quarkus-openpdf ${quarkus-itext.version} + + + io.quarkiverse.barcode + quarkus-okapi + ${quarkus-barcode.version} + com.googlecode.owasp-java-html-sanitizer owasp-java-html-sanitizer 20240325.1 - - - io.quarkiverse.barcode - quarkus-barcode4j - ${quarkus-barcode.version} - + - io.quarkiverse.barcode - quarkus-qrcodegen - ${quarkus-barcode.version} + com.apptasticsoftware + rssreader + 3.9.0 org.graalvm.sdk diff --git a/quarkus-primefaces/runtime/src/main/java/io/quarkus/primefaces/runtime/PrimeFacesFeature.java b/quarkus-primefaces/runtime/src/main/java/io/quarkus/primefaces/runtime/PrimeFacesFeature.java index 5428210..6a93b74 100644 --- a/quarkus-primefaces/runtime/src/main/java/io/quarkus/primefaces/runtime/PrimeFacesFeature.java +++ b/quarkus-primefaces/runtime/src/main/java/io/quarkus/primefaces/runtime/PrimeFacesFeature.java @@ -11,7 +11,7 @@ public void afterRegistration(AfterRegistrationAccess access) { RuntimeClassInitialization.initializeAtRunTime("software.xdev.chartjs.model.color.Color"); RuntimeClassInitialization.initializeAtRunTime("software.xdev.chartjs.model.color.HSLAColor"); RuntimeClassInitialization.initializeAtRunTime("software.xdev.chartjs.model.color.RGBAColor"); - RuntimeClassInitialization.initializeAtRunTime(org.primefaces.util.ChartUtils.class.getName()); + RuntimeClassInitialization.initializeAtRunTime(com.apptasticsoftware.rssreader.AbstractRssReader.class.getName()); } @Override diff --git a/quarkus-primefaces/runtime/src/main/java/io/quarkus/primefaces/runtime/graal/DeleteApacheCommonsFileUpload.java b/quarkus-primefaces/runtime/src/main/java/io/quarkus/primefaces/runtime/graal/DeleteApacheCommonsFileUpload.java deleted file mode 100644 index ddc765b..0000000 --- a/quarkus-primefaces/runtime/src/main/java/io/quarkus/primefaces/runtime/graal/DeleteApacheCommonsFileUpload.java +++ /dev/null @@ -1,35 +0,0 @@ -package io.quarkus.primefaces.runtime.graal; - -import org.primefaces.component.fileupload.CommonsFileUploadDecoder; -import org.primefaces.model.file.CommonsUploadedFile; -import org.primefaces.webapp.MultipartRequest; -import org.primefaces.webapp.filter.FileUploadFilter; - -import com.oracle.svm.core.annotate.Delete; -import com.oracle.svm.core.annotate.TargetClass; - -/** - * Apache Commons FileUpload is not used in GraalVM mode only native JSF servlet uploading. - */ -public final class DeleteApacheCommonsFileUpload { -} - -@Delete -@TargetClass(CommonsFileUploadDecoder.class) -final class DeleteCommonsFileUploadDecoder { -} - -@Delete -@TargetClass(FileUploadFilter.class) -final class DeleteFileUploadFilter { -} - -@Delete -@TargetClass(CommonsUploadedFile.class) -final class DeleteCommonsUploadedFile { -} - -@Delete -@TargetClass(MultipartRequest.class) -final class DeleteMultipartRequest { -} diff --git a/quarkus-primefaces/runtime/src/main/java/io/quarkus/primefaces/runtime/graal/DeleteFeedInput.java b/quarkus-primefaces/runtime/src/main/java/io/quarkus/primefaces/runtime/graal/DeleteFeedInput.java deleted file mode 100644 index e59dd49..0000000 --- a/quarkus-primefaces/runtime/src/main/java/io/quarkus/primefaces/runtime/graal/DeleteFeedInput.java +++ /dev/null @@ -1,14 +0,0 @@ -package io.quarkus.primefaces.runtime.graal; - -import org.primefaces.component.feedreader.FeedInput; - -import com.oracle.svm.core.annotate.Delete; -import com.oracle.svm.core.annotate.TargetClass; - -/** - * Rome RSS library uses JDOM XML parsing and its failing so not worth investigating. - */ -@Delete -@TargetClass(FeedInput.class) -public final class DeleteFeedInput { -} diff --git a/quarkus-primefaces/runtime/src/main/java/io/quarkus/primefaces/runtime/graal/SubstituteChartUtils.java b/quarkus-primefaces/runtime/src/main/java/io/quarkus/primefaces/runtime/graal/SubstituteChartUtils.java deleted file mode 100644 index 36f1f25..0000000 --- a/quarkus-primefaces/runtime/src/main/java/io/quarkus/primefaces/runtime/graal/SubstituteChartUtils.java +++ /dev/null @@ -1,18 +0,0 @@ -package io.quarkus.primefaces.runtime.graal; - -import java.io.IOException; -import java.io.Writer; - -import org.primefaces.util.ChartUtils; - -import com.oracle.svm.core.annotate.Substitute; -import com.oracle.svm.core.annotate.TargetClass; - -@TargetClass(ChartUtils.class) -final class SubstituteChartUtils { - - @Substitute - public static void writeDataValue(Writer fsw, String optionName, Object value, boolean hasComma) throws IOException { - throw new IllegalArgumentException("ChartUtils is deprecated and should not be used"); - } -} \ No newline at end of file diff --git a/quarkus-primefaces/runtime/src/main/java/io/quarkus/primefaces/runtime/graal/SubstituteFeedReaderRenderer.java b/quarkus-primefaces/runtime/src/main/java/io/quarkus/primefaces/runtime/graal/SubstituteFeedReaderRenderer.java deleted file mode 100644 index 8a7c188..0000000 --- a/quarkus-primefaces/runtime/src/main/java/io/quarkus/primefaces/runtime/graal/SubstituteFeedReaderRenderer.java +++ /dev/null @@ -1,23 +0,0 @@ -package io.quarkus.primefaces.runtime.graal; - -import java.io.IOException; - -import jakarta.faces.component.UIComponent; -import jakarta.faces.context.FacesContext; - -import org.primefaces.component.feedreader.FeedReaderRenderer; - -import com.oracle.svm.core.annotate.Substitute; -import com.oracle.svm.core.annotate.TargetClass; - -/** - * Rome RSS library uses JDOM XML parsing and its failing so not worth investigating. - */ -@TargetClass(FeedReaderRenderer.class) -final class SubstituteFeedReaderRenderer { - - @Substitute - public void encodeEnd(FacesContext context, UIComponent component) throws IOException { - throw new IOException("FeedReader component is not supported in native mode."); - } -} \ No newline at end of file