This question already has answers here:
How to force maven update?
                                
                                    (25个答案)
                                
                        
                                3年前关闭。
            
                    
我正在尝试resteasy Web服务example

在pom.xml文件的存储库错误中,当前项目和可用的插件组[]中未找到前缀为'war'的插件。

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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.javacodegeeks.areyes</groupId>
<artifactId>resteasy-sample</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>resteasy-sample Maven Webapp</name>
<url>http://maven.apache.org</url>
<repositories>
   <repository>
      <id>JBoss repository</id>
      <url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
   </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>org.jboss.resteasy</groupId>
        <artifactId>resteasy-jaxrs</artifactId>
        <version>2.2.1.GA</version>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>3.8.1</version>
        <scope>test</scope>
    </dependency>
</dependencies>
<build>
    <finalName>resteasy-sample</finalName>
</build>




已经在环境变量中添加了M2_HOME和路径。
我该如何解决?

最佳答案

您需要执行maven-war-plugin

关于java - 在当前项目和存储库中可用的插件组[]中找不到前缀为'war'的插件,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/40561536/

10-10 17:47