找不到 org.primefaces.themes

Failure to find org.primefaces.themes

这是我的 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>

错误:

无法在项目 MorpheusTest 上执行目标:无法解析项目 com.edu 的依赖项:MorpheusTest:war:1.0-SNAPSHOT:找不到 org.primefaces.themes:morpheus:jar: http://repository.primefaces.org 中的 2.0.1 已缓存在本地存储库中,直到 prime-repo 的更新间隔结束或强制更新后才会重新尝试解析 -> [帮助 1]

我看到关于堆栈溢出的其他答案建议添加这个:

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

但是,我仍然有同样的错误。

如果我们访问 https://repository.primefaces.org/org/primefaces/themes/,没有名为 morpheus 的工件,这是 Failure to find org.primefaces.themes:morpheus:jar:2.0.1 ... 错误的根本原因。

此外,https://repository.primefaces.org/org/primefaces/themes/ 仅托管在 https://www.primefaces.org/themes/ 中提到的 community theme(开源) ,而 morpheus (https://www.primefaces.org/layouts/morpheus) 是我们必须购买的商业主题Primefaces 公司 (https://www.primefaces.org/store/),不在任何存储库中发布。