这是我的 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>
Run Code Online (Sandbox Code Playgroud)
错误:
无法在项目 MorpheusTest 上执行目标:无法解析项目 com.edu:MorpheusTest:war:1.0-SNAPSHOT 的依赖项:无法在http://repository.primefaces中找到 org.primefaces.themes:morpheus:jar:2.0.1 .org已缓存在本地存储库中,直到 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>
Run Code Online (Sandbox Code Playgroud)
但是,我仍然有同样的错误。
如果我们访问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
中提到的(开源),而(https:// www.primefaces.org/layouts/morpheus)是一个商业主题,我们必须从 Primefaces 公司(https://www.primefaces.org/store/)购买,并且不会在任何存储库中发布。morpheus
归档时间: |
|
查看次数: |
3474 次 |
最近记录: |