From 48d6501894f07c9f17f787fe132b551d4cb28a67 Mon Sep 17 00:00:00 2001 From: Oliver Bertuch Date: Fri, 26 Mar 2021 01:28:47 +0100 Subject: [PATCH] revert(config): make web.xml variable substitution compatible with Payara 5.2020.6 #6953 Reverts commit ca354119 Due to the nature of the application server, when the web app context is initialised, it cannot yet access the deployments default MPCONFIG source within META-INF/microprofile-config.properties. As a consequence, as long as we do not update to Payara 5.2021.1, we cannot provide sane defaults within the variable. That means that every installation would need to set the variables in MPCONFIG sources available at startup time and before the deployment finished: any are possible that are baked into Payara. As this doesn't seem feasible, this PR will be blocked until #7700 is resolved. --- .../META-INF/microprofile-config.properties | 10 +--------- src/main/webapp/WEB-INF/web.xml | 12 ++++++------ 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/src/main/resources/META-INF/microprofile-config.properties b/src/main/resources/META-INF/microprofile-config.properties index 75dc4bc3f05..ef114f60dc1 100644 --- a/src/main/resources/META-INF/microprofile-config.properties +++ b/src/main/resources/META-INF/microprofile-config.properties @@ -2,12 +2,4 @@ dataverse.db.host=localhost dataverse.db.port=5432 dataverse.db.user=dataverse -dataverse.db.name=dataverse - -# WEB.XML / JSF -dataverse.jsf.project-stage=Production -dataverse.jsf.primefaces.theme=bootstrap -dataverse.jsf.empty-string-null=true -dataverse.jsf.skip-comments=true -dataverse.jsf.buffer-size=102400 -dataverse.jsf.refresh-period=-1 \ No newline at end of file +dataverse.db.name=dataverse \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index 9d4d5f6b989..8179ca970d5 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -29,12 +29,12 @@ javax.faces.PROJECT_STAGE - ${MPCONFIG=dataverse.jsf.project-stage} + ${MPCONFIG=dataverse.jsf.project-stage:Production} primefaces.THEME - ${MPCONFIG=dataverse.jsf.primefaces.theme} + ${MPCONFIG=dataverse.jsf.primefaces.theme:bootstrap} @@ -46,22 +46,22 @@ javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL - ${MPCONFIG=dataverse.jsf.empty-string-null} + ${MPCONFIG=dataverse.jsf.empty-string-null:true} javax.faces.FACELETS_SKIP_COMMENTS - ${MPCONFIG=dataverse.jsf.skip-comments} + ${MPCONFIG=dataverse.jsf.skip-comments:true} javax.faces.FACELETS_BUFFER_SIZE - ${MPCONFIG=dataverse.jsf.buffer-size} + ${MPCONFIG=dataverse.jsf.buffer-size:102400} javax.faces.FACELETS_REFRESH_PERIOD - ${MPCONFIG=dataverse.jsf.refresh-period} + ${MPCONFIG=dataverse.jsf.refresh-period:-1}