Saturday, May 26, 2018

Spring Boot 2 and Primefaces 6..... JoinFaces

http://joinfaces.org/ and https://github.com/joinfaces/joinfaces

Their started app is https://joinfaces-example.herokuapp.com/starter.jsf admin is persapiens/123)

git clone https://github.com/joinfaces/joinfaces-maven-jar-example.git
cd joinfaces-maven-jar-example
mvn clean install
(there are some test errors.... ignore them)

java -jar target/joinfaces-example-3.2.1-SNAPSHOT.jar

http://localhost:8080/starter.jsf


Unfortunately they use a parent pom....in Maven you can use only 1 parent pom (another reason to HATE MAVEN who is BROKEN BY DESIGN).... so if your application is already based on a parent pom, you are royally screwed.

Problem is, when I generate a project from Spring Boot Starters, the parent pom is:

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


while using joinfaces it's


<parent>
        <groupId>org.joinfaces</groupId>
        <artifactId>joinfaces-parent</artifactId>
        <version>3.2.1</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>


you can clearly see from http://central.maven.org/maven2/org/joinfaces/joinfaces-parent/3.2.1/joinfaces-parent-3.2.1.pom that joinfaces includes all these dependencies http://central.maven.org/maven2/org/joinfaces/joinfaces-dependencies/3.2.1/joinfaces-dependencies-3.2.1.pom which entail also a parent:

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

No doubt, they have sorted out for you a massive dependency tree, saving a lot of time.

When I see such massive dependency tree, the question arises, why the Java world in 2018 is so ridiculously complicated and only getting worse. Please stop proliferation, focus on consolidation.











No comments: