GrizzlyOnFire
GrizzlyOnFire

Reputation: 21

"Reading config" Spring Boot-App with Joinfaces and JSF is different between bootRun and bootJar (Gradle Build)

I'm desperate to build a Spring Boot-Applikation with JSF. The Build-Tool is Gradle and to integrate JSF in Spring we use Joinfaces. If I start the application from Spring Tool Suite(STS) or with Gradle bootRun, it loads all the available config files and everything works just fine.

If I run bootJar and start the Application with java -jar it is missing several configs and the facesflows are not loaded.
We use joinfaces 4.1.5, SpringBoot 2.2.5 and Gradle 6.0.1

This is a part of the STS or bootRun log:

Loading prepared scan result took 0.4388ms
Reading config : jar:file:...org.primefaces.extensions/.../META-INF/faces-config.xml
Reading config : jar:file:...org.primefaces/primefaces.../faces-config.xml
Reading config : jar:file:.../weld-servlet-core-3.1.2.Final.jar!/META-INF/faces-config.xml
Reading config : jar:file:.../joinfaces-autoconfigure-4.1.5.jar!/META-INF/faces-config.xml
Reading config /dataTableLazy/dataTableLazy-flow.xml
Reading config /button/button-flow.xml
Reading config /confirmDialog/confirmDialog-flow.xml
Reading config /dataTable/dataTable-flow.xml
Reading config /main/main-flow.xml
Reading config /accordion/accordion-flow.xml
Artifact 'myfaces-api' was found in version '2.3.6' from path '...'
Artifact 'myfaces-impl' was found in version '2.3.6' from path '...'
MyFaces CDI support enabled


But the call of the jar as result of bootJar is missing the flow-xml files:

Loading prepared scan result took 0.6126ms
Reading config : jar:file:...org.primefaces.extensions/.../META-INF/faces-config.xml
Reading config : jar:file:...org.primefaces/primefaces.../faces-config.xml
Reading config : jar:file:.../weld-servlet-core-3.1.2.Final.jar!/META-INF/faces-config.xml
Reading config : jar:file:.../joinfaces-autoconfigure-4.1.5.jar!/META-INF/faces-config.xml
Artifact 'myfaces-api' was found in version '2.3.6' from path '...'
Artifact 'myfaces-impl' was found in version '2.3.6' from path '...'
MyFaces CDI support enabled

Our Resource-Tree:

src/main/resources
..META-INF
....resources
......accordion
........accordion.xthml
........accordion-flow.xml
......button
........button.xthml
........button-flow.xml
......main
........main.xthml
........main-flow.xml
......css
......etc...
..application.properties

Does anyone know why starting the Jar resulting from bootJar and starting with bootRun show different behaviour? Have anyone faced the same problem?

Upvotes: 1

Views: 813

Answers (1)

NeguGoriak
NeguGoriak

Reputation: 1

we have solved this by putting the flows in the file faces-config.xml. we use Maven and have the following structure:

- /src/main/resource/application.properties
- /src/main/resource/META-inf/faces-config.xml
- /src/main/resource/META-inf/resource/index.xhtml

Upvotes: 0

Related Questions