这是我的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。主题:http://repository.primefaces.org中的morpheus:jar:2.0.1已缓存在本地存储库中,在超过主存储库的更新间隔或强制更新之前,将不会重试解析->帮助1
我看过关于堆栈溢出的其他答案,它们建议添加以下内容:
<repositories>
<repository>
<id>prime-repo</id>
<name>PrimeFaces Maven Repository</name>
<url>http://repository.primefaces.org</url>
<layout>default</layout>
</repository>
</repositories>但是,我仍然有相同的错误。
发布于 2021-01-14 08:41:39
如果我们访问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/)购买,并且不会在任何存储库中发布。
https://stackoverflow.com/questions/65709928
复制相似问题