avinator
avinator

Reputation: 118

Failure to find org.primefaces.themes

Here is my pom.xml

<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.edu</groupId>
<artifactId>MorpheusTest</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>MorpheusTest-1.0-SNAPSHOT</name>

<properties>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <failOnMissingWebXml>false</failOnMissingWebXml>
    <jakartaee>8.0</jakartaee>
</properties>

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

<dependencies>      
    <dependency>
        <groupId>org.primefaces</groupId>
        <artifactId>primefaces</artifactId>
        <version>8.0</version>
    </dependency>
    <dependency>
        <groupId>org.primefaces.extensions</groupId>
        <artifactId>all-themes</artifactId>
        <version>1.0.8</version>
    </dependency>
    <dependency>
        <groupId>org.primefaces.themes</groupId>
        <artifactId>morpheus</artifactId>
        <version>2.0.1</version>
        <type>jar</type>
    </dependency>
    <dependency>
        <groupId>javax</groupId>
        <artifactId>javaee-api</artifactId>
        <version>${jakartaee}</version>
        <scope>provided</scope>
    </dependency>
</dependencies>

 <build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.1</version>
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
                <compilerArguments>
                    <endorseddirs>${endorsed.dir}</endorseddirs>
                </compilerArguments>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <version>2.3</version>
            <configuration>
                <failOnMissingWebXml>false</failOnMissingWebXml>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <version>2.6</version>
            <executions>
                <execution>
                    <phase>validate</phase>
                    <goals>
                        <goal>copy</goal>
                    </goals>
                    <configuration>
                        <outputDirectory>${endorsed.dir}</outputDirectory>
                        <silent>true</silent>
                        <artifactItems>
                            <artifactItem>
                                <groupId>javax</groupId>
                                <artifactId>javaee-api</artifactId>
                                <version>${jakartaee}</version>
                                <type>jar</type>
                            </artifactItem>
                        </artifactItems>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

Error:

Failed to execute goal on project MorpheusTest: Could not resolve dependencies for project com.edu:MorpheusTest:war:1.0-SNAPSHOT: Failure to find org.primefaces.themes:morpheus:jar:2.0.1 in http://repository.primefaces.org was cached in the local repository, resolution will not be reattempted until the update interval of prime-repo has elapsed or updates are forced -> [Help 1]

I have seen other answers on stack overflow that suggest to add this:

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

However, I still have the same error.

Upvotes: 4

Views: 4810

Answers (1)

Charlee Chitsuk
Charlee Chitsuk

Reputation: 9069

If we visit the https://repository.primefaces.org/org/primefaces/themes/, there is no artifact named morpheus which is the root cause of the Failure to find org.primefaces.themes:morpheus:jar:2.0.1 ... error.

Furthermore, the https://repository.primefaces.org/org/primefaces/themes/ host only the community theme (open source) which is mentioned at https://www.primefaces.org/themes/, while the morpheus (https://www.primefaces.org/layouts/morpheus) is a commercial theme which we have to buy from the Primefaces company (https://www.primefaces.org/store/) and does not publish in any repository.

Upvotes: 7

Related Questions