Joinfaces - Springboot with Premium theme

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
romulofranco
Posts: 3
Joined: 13 Aug 2015, 19:11

27 Apr 2022, 19:09

Hi guys!

I just purchased Mirage template, but I am suffering a lot to set up this theme in my project.
I just need a simple springboot integration to provide some rest services integrated to primefaces project to reutilize services and other layers in the project.

So I've tried this one:
https://github.com/joinfaces/joinfaces- ... r-example/
https://github.com/code-not-found/jsf-p ... g-security

This last one, that I could make some progress, by using this:
application.yml

Code: Select all

joinfaces:
  primefaces: 
    theme: mirage-layout
    font-awesome: true
  jsf:
    webapp-resources-directory: /resources    
I tried mirage-layout, or mirage but in the console it puts primefaces-mirage.

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.codenotfound</groupId>
    <artifactId>MyLife</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>mylife</name>
    <description>JSF PrimeFaces Spring Security Example</description>
    <url>https://codenotfound.com/jsf-primefaces-spring-security-example.html</url>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.7.0-RC1</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>11</java.version>
        <joinfaces.version>4.7.0-rc1</joinfaces.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.joinfaces</groupId>
                <artifactId>joinfaces-dependencies</artifactId>
                <version>${joinfaces.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.joinfaces</groupId>
            <artifactId>primefaces-spring-boot-starter</artifactId>
        </dependency>

        <dependency>
            <groupId>jakarta.enterprise</groupId>
            <artifactId>jakarta.enterprise.cdi-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.joinfaces</groupId>
            <artifactId>security-spring-boot-starter</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
    <repositories>
        <repository>
            <id>spring-milestones</id>
            <url>https://repo.spring.io/milestone</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>spring-milestones</id>
            <url>https://repo.spring.io/milestone</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </pluginRepository>
        <pluginRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>
</project>

14:06:31.994 [http-nio-8080-exec-2] ERROR o.a.c.c.C.[.[.[/].[FacesServlet] - Servlet.service() for servlet [FacesServlet] in context with path [] threw exception [Error loading CSS, cannot find "theme.css" resource of "primefaces-mirage-layout" library] with root cause
javax.faces.FacesException: Error loading CSS, cannot find "theme.css" resource of "primefaces-mirage-layout" library
at org.primefaces.renderkit.HeadRenderer.encodeCSS(HeadRenderer.java:158)
at org.primefaces.renderkit.HeadRenderer.encodeBegin(HeadRenderer.java:102)
So the documentation fails a lot for this integration and in this momentum in the world, everything is working with native JVM and docker to provide microservices in Kubernetes.

I could be happy if this integration could be made by Quarkus as well. I already tried with Quarkus-faces, but this Springboot project that I already mentioned is the only one I could make some progress on.

What could be incredible, is a simple project in the Github already configured to use with an empty page, not the entire showcase, because this has a lot of high coupling between libraries and this is very difficult to reuse.

So thanks in advance

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

28 Apr 2022, 10:06

Hi,

Did you provide theme.css files using sass command? Or How do you integrate the theme in the project? theme.jar or theme scss files?

We don't have a doc about Spring Boot and Mirage Theme integration. Maybe, these links can help to you;
viewtopic.php?f=91&t=68293&p=193650

Best Regards,

romulofranco
Posts: 3
Joined: 13 Aug 2015, 19:11

30 Apr 2022, 18:10

Hi

I appreciate a lot your support and how fast is that... thanks!

So, by using the tag version included in the mirage zip file, I could include the dependencies of joinfaces and now it's working.
I had to change some settings to application.properties and use joinfaces.primefaces props and remove some dependencies.
For someone who needs support on that, this is my pom.xml

Code: Select all

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.primefaces</groupId>
    <artifactId>mirage</artifactId>
    <version>3.1.1</version>
    <packaging>${packaging.type}</packaging>

    <name>mirage</name>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <owb.version>2.0.20</owb.version>
        <mojarra.version>2.3.14</mojarra.version>
        <open-pdf.version>1.3.24</open-pdf.version>
        <poi.version>5.0.0</poi.version>
        <packaging.type>war</packaging.type>

        <joinfaces.version>4.7.0-rc1</joinfaces.version>
        <hibernate-validator.version>5.0.1.Final</hibernate-validator.version>
    </properties>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.7.0-RC1</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.joinfaces</groupId>
                <artifactId>joinfaces-dependencies</artifactId>
                <version>${joinfaces.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.joinfaces</groupId>
            <artifactId>primefaces-spring-boot-starter</artifactId>
        </dependency>
        <!--        <dependency>-->
        <!--            <groupId>org.joinfaces</groupId>-->
        <!--            <artifactId>jsf-spring-boot-starter</artifactId>-->
        <!--        </dependency>-->


        <!-- JEE dependencies -->
        <!--        <dependency>-->
        <!--            <groupId>org.hibernate</groupId>-->
        <!--            <artifactId>hibernate-validator</artifactId>-->
        <!--            <version>${hibernate-validator.version}</version>-->
        <!--        </dependency>-->


        <!--        <dependency>-->
        <!--            <groupId>org.glassfish</groupId>-->
        <!--            <artifactId>jakarta.faces</artifactId>-->
        <!--            <version>${mojarra.version}</version>-->
        <!--        </dependency>-->
        <!--        <dependency>-->
        <!--            <groupId>javax.el</groupId>-->
        <!--            <artifactId>javax.el-api</artifactId>-->
        <!--            <version>3.0.0</version>-->
        <!--            <scope>provided</scope>-->
        <!--        </dependency>-->
        <!--        <dependency>-->
        <!--            <groupId>javax.servlet</groupId>-->
        <!--            <artifactId>javax.servlet-api</artifactId>-->
        <!--            <version>3.1.0</version>-->
        <!--            <scope>provided</scope>-->
        <!--        </dependency>-->

        <!--        &lt;!&ndash; CDI required APIs &ndash;&gt;-->
        <!--        <dependency>-->
        <!--            <groupId>org.apache.geronimo.specs</groupId>-->
        <!--            <artifactId>geronimo-atinject_1.0_spec</artifactId>-->
        <!--            <version>1.0</version>-->
        <!--        </dependency>-->
        <!--        <dependency>-->
        <!--            <groupId>org.apache.geronimo.specs</groupId>-->
        <!--            <artifactId>geronimo-jcdi_2.0_spec</artifactId>-->
        <!--            <version>1.1</version>-->
        <!--        </dependency>-->
        <!--        <dependency>-->
        <!--            <groupId>org.apache.geronimo.specs</groupId>-->
        <!--            <artifactId>geronimo-interceptor_1.2_spec</artifactId>-->
        <!--            <version>1.0</version>-->
        <!--        </dependency>-->
        <!--        <dependency>-->
        <!--            <groupId>org.apache.geronimo.specs</groupId>-->
        <!--            <artifactId>geronimo-annotation_1.3_spec</artifactId>-->
        <!--            <version>1.0</version>-->
        <!--        </dependency>-->

        <!--        &lt;!&ndash; CDI Impl &ndash;&gt;-->
        <!--        <dependency>-->
        <!--            <groupId>org.apache.openwebbeans</groupId>-->
        <!--            <artifactId>openwebbeans-impl</artifactId>-->
        <!--            <version>${owb.version}</version>-->
        <!--        </dependency>-->
        <!--        <dependency>-->
        <!--            <groupId>org.apache.openwebbeans</groupId>-->
        <!--            <artifactId>openwebbeans-web</artifactId>-->
        <!--            <version>${owb.version}</version>-->
        <!--        </dependency>-->
        <!--        <dependency>-->
        <!--            <groupId>org.apache.openwebbeans</groupId>-->
        <!--            <artifactId>openwebbeans-jsf</artifactId>-->
        <!--            <version>${owb.version}</version>-->
        <!--        </dependency>-->

        <!-- Export Demo Impl -->
        <!--        <dependency>-->
        <!--            <groupId>org.apache.poi</groupId>-->
        <!--            <artifactId>poi</artifactId>-->
        <!--            <version>${poi.version}</version>-->
        <!--        </dependency>-->
        <!--        <dependency>-->
        <!--            <groupId>org.apache.poi</groupId>-->
        <!--            <artifactId>poi-ooxml</artifactId>-->
        <!--            <version>${poi.version}</version>-->
        <!--            <exclusions>-->
        <!--                <exclusion>-->
        <!--                    <groupId>org.apache.xmlgraphics</groupId>-->
        <!--                    <artifactId>batik-all</artifactId>-->
        <!--                </exclusion>-->
        <!--                <exclusion>-->
        <!--                    <groupId>de.rototor.pdfbox</groupId>-->
        <!--                    <artifactId>graphics2d</artifactId>-->
        <!--                </exclusion>-->
        <!--                <exclusion>-->
        <!--                    <groupId>org.apache.santuario</groupId>-->
        <!--                    <artifactId>xmlsec</artifactId>-->
        <!--                </exclusion>-->
        <!--                <exclusion>-->
        <!--                    <groupId>org.bouncycastle</groupId>-->
        <!--                    <artifactId>bcpkix-jdk15on</artifactId>-->
        <!--                </exclusion>-->
        <!--                <exclusion>-->
        <!--                    <groupId>com.github.virtuald</groupId>-->
        <!--                    <artifactId>curvesapi</artifactId>-->
        <!--                </exclusion>-->
        <!--                <exclusion>-->
        <!--                    <groupId>org.bouncycastle</groupId>-->
        <!--                    <artifactId>bcprov-jdk15on</artifactId>-->
        <!--                </exclusion>-->
        <!--            </exclusions>-->
        <!--        </dependency>-->
        <!--        <dependency>-->
        <!--            <groupId>com.github.librepdf</groupId>-->
        <!--            <artifactId>openpdf</artifactId>-->
        <!--            <version>${open-pdf.version}</version>-->
        <!--        </dependency>-->

        <dependency>
            <groupId>org.primefaces.themes</groupId>
            <artifactId>mirage</artifactId>
            <version>1.0</version>
        </dependency>
        <!--        <dependency>-->
        <!--            <groupId>org.springframework.boot</groupId>-->
        <!--            <artifactId>spring-boot-starter-thymeleaf</artifactId>-->
        <!--        </dependency>-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-webflux</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
        </dependency>

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>jakarta.enterprise</groupId>
            <artifactId>jakarta.enterprise.cdi-api</artifactId>
        </dependency>
        <!--        <dependency>-->
        <!--            <groupId>org.glassfish.jaxb</groupId>-->
        <!--            <artifactId>jaxb-runtime</artifactId>-->
        <!--        </dependency>-->

        <dependency>
            <groupId>org.joinfaces</groupId>
            <artifactId>joinfaces-autoconfigure</artifactId>
            <version>4.7.0-rc1</version>
        </dependency>
    </dependencies>

    <repositories>
        <repository>
            <id>prime-repo</id>
            <name>PrimeFaces Maven Repository</name>
            <url>http://repository.primefaces.org</url>
        </repository>

        <repository>
            <id>spring-milestones</id>
            <url>https://repo.spring.io/milestone</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>

    </repositories>

    <build>
        <resources>
<!--            <resource>-->
<!--                <directory>src/main/webapp/WEB-INF</directory>-->
<!--                <filtering>true</filtering>-->
<!--                <includes>-->
<!--                    <include>application.properties</include>-->
<!--                </includes>-->
<!--            </resource>-->
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <includes>
<!--                    <include>application.properties</include>-->
                    <include>web.xml</include>
                    <include>beans.xml</include>
                    <include>faces-config.xml</include>
                </includes>
                <targetPath>${project.build.directory}</targetPath>
            </resource>
            <!--            <resource>-->
            <!--                <directory>src/main/resources</directory>-->
            <!--                <includes>-->
            <!--                    <include>web.xml</include>-->
            <!--                </includes>-->
            <!--                <filtering>true</filtering>-->
            <!--                <targetPath>${project.build.directory}</targetPath>-->
            <!--            </resource>-->
        </resources>


        <plugins>

            <!--            <plugin>-->
            <!--                <groupId>org.primefaces.extensions</groupId>-->
            <!--                <artifactId>resources-optimizer-maven-plugin</artifactId>-->
            <!--                <version>2.3.8</version>-->
            <!--                <configuration>-->
            <!--                    <inputDir>${project.build.directory}/classes/META-INF/resources/wepapp</inputDir>-->
            <!--                    <imagesDir>${project.build.directory}/classes/META-INF/resources/webapp</imagesDir>-->
            <!--                    <useDataUri>true</useDataUri>-->
            <!--                </configuration>-->
            <!--                <executions>-->
            <!--                    <execution>-->
            <!--                        <id>optimize</id>-->
            <!--                        <phase>prepare-package</phase>-->
            <!--                        <goals>-->
            <!--                            <goal>optimize</goal>-->
            <!--                        </goals>-->
            <!--                    </execution>-->
            <!--                </executions>-->
            <!--            </plugin>-->

            <plugin>
                <groupId>nl.geodienstencentrum.maven</groupId>
                <artifactId>sass-maven-plugin</artifactId>
                <version>3.7.2</version>
                <executions>
                    <execution>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>update-stylesheets</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <sassSourceDirectory>${basedir}/src/main/webapp/resources/mirage-layout
                    </sassSourceDirectory>
                    <destination>${basedir}/src/main/webapp/resources/mirage-layout</destination>
                    <sassOptions>
                        <always_update>true</always_update>
                        <sourcemap>:none</sourcemap>
                    </sassOptions>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.jruby</groupId>
                        <artifactId>jruby-complete</artifactId>
                        <version>9.3.4.0</version>
                    </dependency>
                </dependencies>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.7</version>

            </plugin>

            <plugin>
                <groupId>org.joinfaces</groupId>
                <artifactId>joinfaces-maven-plugin</artifactId>
                <version>${joinfaces.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>classpath-scan</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.7.0</version>
                <configuration>
                    <source>11</source>
                    <target>11</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>distribute</id>
            <properties>
                <packaging.type>jar</packaging.type>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <version>3.3.0</version>
                        <executions>
                            <execution>
                                <id>build-layout</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>single</goal>
                                </goals>
                                <configuration>
                                    <descriptors>
                                        <descriptor>src/assemble/layout.xml</descriptor>
                                    </descriptors>
                                    <finalName>${project.name}-layout-${project.version}</finalName>
                                    <appendAssemblyId>false</appendAssemblyId>
                                </configuration>
                            </execution>
                            <execution>
                                <id>build-theme</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>single</goal>
                                </goals>
                                <configuration>
                                    <descriptors>
                                        <descriptor>src/assemble/theme.xml</descriptor>
                                    </descriptors>
                                    <finalName>${project.name}-theme-${project.version}</finalName>
                                    <appendAssemblyId>false</appendAssemblyId>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <!--                    <plugin>-->
                    <!--                        <groupId>org.apache.maven.plugins</groupId>-->
                    <!--                        <artifactId>maven-shade-plugin</artifactId>-->
                    <!--                        <configuration>-->
                    <!--                            <finalName>${project.name}-theme-${project.version}-jakarta</finalName>-->
                    <!--                            <shadedArtifactAttached>false</shadedArtifactAttached>-->
                    <!--                            <createDependencyReducedPom>false</createDependencyReducedPom>-->
                    <!--                            <promoteTransitiveDependencies>true</promoteTransitiveDependencies>-->
                    <!--                            <minimizeJar>true</minimizeJar>-->
                    <!--                            <shadeSourcesContent>true</shadeSourcesContent>-->
                    <!--                            <filters>-->
                    <!--                                <filter>-->
                    <!--                                    <artifact>*:*</artifact>-->
                    <!--                                    <includes>-->
                    <!--                                        <include>org/primefaces/${project.name}/component/*</include>-->
                    <!--                                        <include>META-INF/MANIFEST.MF</include>-->
                    <!--                                        <include>META-INF/faces-config.xml</include>-->
                    <!--                                        <include>META-INF/primefaces-${project.name}.taglib.xml</include>-->
                    <!--                                        <include>META-INF/resources/primefaces-${project.name}-*/*</include>-->
                    <!--                                    </includes>-->
                    <!--                                </filter>-->
                    <!--                            </filters>-->
                    <!--                        </configuration>-->
                    <!--                        <executions>-->
                    <!--                            <execution>-->
                    <!--                                <id>jakarta</id>-->
                    <!--                                <phase>package</phase>-->
                    <!--                                <goals>-->
                    <!--                                    <goal>shade</goal>-->
                    <!--                                </goals>-->
                    <!--                                <configuration>-->
                    <!--                                    <shadedArtifactAttached>true</shadedArtifactAttached>-->
                    <!--                                    <shadedClassifierName>jakarta</shadedClassifierName>-->
                    <!--                                    <createDependencyReducedPom>false</createDependencyReducedPom>-->
                    <!--                                    <transformers>-->
                    <!--                                        <transformer-->
                    <!--                                                implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>-->
                    <!--                                        <transformer-->
                    <!--                                                implementation="io.yupiik.maven.shade.transformer.RelocationTransformer">-->
                    <!--                                            <delegates>-->
                    <!--                                                <transformer-->
                    <!--                                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"/>-->
                    <!--                                                <transformer-->
                    <!--                                                        implementation="org.apache.maven.plugins.shade.resource.XmlAppendingTransformer">-->
                    <!--                                                    <resource>META-INF/faces-config.xml</resource>-->
                    <!--                                                </transformer>-->
                    <!--                                                <transformer-->
                    <!--                                                        implementation="org.apache.maven.plugins.shade.resource.XmlAppendingTransformer">-->
                    <!--                                                    <resource>META-INF/primefaces-${project.name}.taglib.xml</resource>-->
                    <!--                                                </transformer>-->
                    <!--                                            </delegates>-->
                    <!--                                        </transformer>-->
                    <!--                                    </transformers>-->
                    <!--                                    <artifactSet>-->
                    <!--                                        <includes>-->
                    <!--                                            <include>${project.groupId}:${project.artifactId}</include>-->
                    <!--                                        </includes>-->
                    <!--                                    </artifactSet>-->
                    <!--                                    <relocations>-->
                    <!--                                        <relocation>-->
                    <!--                                            <pattern>javax.faces</pattern>-->
                    <!--                                            <shadedPattern>jakarta.faces</shadedPattern>-->
                    <!--                                        </relocation>-->
                    <!--                                        <relocation>-->
                    <!--                                            <pattern>javax.el</pattern>-->
                    <!--                                            <shadedPattern>jakarta.el</shadedPattern>-->
                    <!--                                        </relocation>-->
                    <!--                                        <relocation>-->
                    <!--                                            <pattern>javax.annotation</pattern>-->
                    <!--                                            <shadedPattern>jakarta.annotation</shadedPattern>-->
                    <!--                                        </relocation>-->
                    <!--                                        <relocation>-->
                    <!--                                            <pattern>javax.servlet</pattern>-->
                    <!--                                            <shadedPattern>jakarta.servlet</shadedPattern>-->
                    <!--                                        </relocation>-->
                    <!--                                        <relocation>-->
                    <!--                                            <pattern>javax.persistence</pattern>-->
                    <!--                                            <shadedPattern>jakarta.persistence</shadedPattern>-->
                    <!--                                        </relocation>-->
                    <!--                                        <relocation>-->
                    <!--                                            <pattern>javax.enterprise</pattern>-->
                    <!--                                            <shadedPattern>jakarta.enterprise</shadedPattern>-->
                    <!--                                        </relocation>-->
                    <!--                                        <relocation>-->
                    <!--                                            <pattern>javax.xml.bind</pattern>-->
                    <!--                                            <shadedPattern>jakarta.xml.bind</shadedPattern>-->
                    <!--                                        </relocation>-->
                    <!--                                        <relocation>-->
                    <!--                                            <pattern>javax.validation</pattern>-->
                    <!--                                            <shadedPattern>jakarta.validation</shadedPattern>-->
                    <!--                                        </relocation>-->
                    <!--                                        <relocation>-->
                    <!--                                            <pattern>javax.inject</pattern>-->
                    <!--                                            <shadedPattern>jakarta.inject</shadedPattern>-->
                    <!--                                        </relocation>-->
                    <!--                                        <relocation>-->
                    <!--                                            <pattern>javax.activation</pattern>-->
                    <!--                                            <shadedPattern>jakarta.activation</shadedPattern>-->
                    <!--                                        </relocation>-->
                    <!--                                        <relocation>-->
                    <!--                                            <pattern>javax.ws.rs</pattern>-->
                    <!--                                            <shadedPattern>jakarta.ws.rs</shadedPattern>-->
                    <!--                                        </relocation>-->
                    <!--                                        <relocation>-->
                    <!--                                            <pattern>javax.jws</pattern>-->
                    <!--                                            <shadedPattern>jakarta.jws</shadedPattern>-->
                    <!--                                        </relocation>-->
                    <!--                                        <relocation>-->
                    <!--                                            <pattern>javax.cache</pattern>-->
                    <!--                                            <shadedPattern>jakarta.cache</shadedPattern>-->
                    <!--                                        </relocation>-->
                    <!--                                        <relocation>-->
                    <!--                                            <pattern>javax.xml.ws</pattern>-->
                    <!--                                            <shadedPattern>jakarta.xml.ws</shadedPattern>-->
                    <!--                                        </relocation>-->
                    <!--                                        <relocation>-->
                    <!--                                            <pattern>javax.xml.soap</pattern>-->
                    <!--                                            <shadedPattern>jakarta.xml.soap</shadedPattern>-->
                    <!--                                        </relocation>-->
                    <!--                                        <relocation>-->
                    <!--                                            <pattern>window.jsf</pattern>-->
                    <!--                                            <shadedPattern>window.faces</shadedPattern>-->
                    <!--                                        </relocation>-->
                    <!--                                        <relocation>-->
                    <!--                                            <pattern>jsf.ajax</pattern>-->
                    <!--                                            <shadedPattern>faces.ajax</shadedPattern>-->
                    <!--                                        </relocation>-->
                    <!--                                    </relocations>-->
                    <!--                                </configuration>-->
                    <!--                            </execution>-->
                    <!--                        </executions>-->
                    <!--                        <dependencies>-->
                    <!--                            <dependency>-->
                    <!--                                <groupId>io.yupiik.maven</groupId>-->
                    <!--                                <artifactId>maven-shade-transformers</artifactId>-->
                    <!--                                <version>0.0.1</version>-->
                    <!--                            </dependency>-->
                    <!--                        </dependencies>-->
                    <!--                    </plugin>-->
                </plugins>
            </build>
        </profile>
        <profile>
            <id>deploy</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-war-plugin</artifactId>
                        <version>3.2.0</version>
                        <configuration>
                            <webResources>
                                <resource>
                                    <filtering>false</filtering>
                                    <directory>src/main/webapp</directory>
                                    <includes>
                                        <include>**/web.xml</include>
                                    </includes>
                                </resource>
                            </webResources>
                            <warSourceDirectory>src/main/webapp</warSourceDirectory>
                            <webXml>${project.build.directory}/web.xml</webXml>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>


    <pluginRepositories>
        <pluginRepository>
            <id>spring-milestones</id>
            <url>https://repo.spring.io/milestone</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </pluginRepository>
        <pluginRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>

</project>
Some other settings files, it seems that is ignoring during the Springboot load, so none of the configurations in web.xml is working, but as I am using this dependency <artifactId>joinfaces-autoconfigure</artifactId> and application.properties these settings made all the difference. I have to test to take off some dependencies that I won't use just to keep war file the smallest size possible.

If you detect some wrong configuration in my pom.xml just let me know, I still studying joinfaces documentation and jsf and jakarta dependencies to get know how to use that.

Thanks
Rômulo Franco.

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

04 May 2022, 13:38

Woww! Thanks a lot @Rômulo ;) Maybe, you can add a comprehensive comment in this ticket or blog post on the subject. This will really be very useful for other users. I appreciate your update and information.

Best Regards,

Post Reply

Return to “Mirage - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest