0

错误

我正在使用 Redhat Developer Studio 12.0 和 jboss EAP 7.1 作为我首先尝试快速入门 (helloworld) (jboss) 的服务器,所以我会知道一切是否正常。
我是 jboss 的新手,对此我真的不太了解。

这是 pom.xml

<?xml version="1.0" encoding="UTF-8" standalone="no"?>


<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>
    <parent>
           <groupId>org.jboss.eap.quickstarts</groupId>
           <artifactId>quickstart-parent</artifactId>
           <version>7.1.0.GA</version>
           <relativePath>../pom.xml</relativePath>
       </parent>
    <artifactId>helloworld</artifactId>
    <packaging>war</packaging>
    <name>${qs.name.prefix} helloworld</name>
    <description>Helloworld</description>


    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <distribution>repo</distribution>
            <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
        </license>
    </licenses>


    <dependencies>

        <!-- Import the CDI API, we use provided scope as the API is included in WildFly -->
        <dependency>
            <groupId>javax.enterprise</groupId>
            <artifactId>cdi-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- Import the Common Annotations API (JSR-250), we use provided scope
            as the API is included in WildFly -->
        <dependency>
            <groupId>org.jboss.spec.javax.annotation</groupId>
            <artifactId>jboss-annotations-api_1.2_spec</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- Import the Servlet API, we use provided scope as the API is included in WildFly -->
        <dependency>
            <groupId>org.jboss.spec.javax.servlet</groupId>
            <artifactId>jboss-servlet-api_3.1_spec</artifactId>
            <scope>provided</scope>
        </dependency>

    </dependencies>

</project>
4

1 回答 1

0

你的 pom 正在上层目录中寻找另一个父 pom

<parent>
   <groupId>org.jboss.eap.quickstarts</groupId>
   <artifactId>quickstart-parent</artifactId>
   <version>7.1.0.GA</version>
   <relativePath>../pom.xml</relativePath>
</parent>

父项目必须存在于所使用的路径中<relativePath>

希望能帮助到你!

于 2018-11-13T08:14:32.370 回答