簡體   English   中英

處理POM時遇到一些問題:[錯誤]不可解析的導入POM

[英]some problems were encountered while processing the POMs: [error] non resolvable import POM

我想開始一個新的Jersey項目但是我在第一步失敗了,因為pom.xml顯示了一些錯誤並且無法構建項目。 錯誤 :

some problems were encountered while processing the POMs:
[error] non resolvable import POM: Could not transfer artifact org.glassfish.jersey: jersey-bom:pom...."

這是我的pom.xml:

    <?xml version="1.0" encoding="UTF-8"?>
    <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>JERSEYProject</groupId>
 <artifactId>JERSEYProject</artifactId>
 <packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>simple-service-webapp</name>

<build>
    <finalName>simple-service-webapp</finalName>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.5.1</version>
            <inherited>true</inherited>
            <configuration>
                <source>1.7</source>
                <target>1.7</target>
            </configuration>
        </plugin>
    </plugins>
</build>


<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.glassfish.jersey</groupId>
            <artifactId>jersey-bom</artifactId>
            <version>${jersey.version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

<dependencies>
<dependency>
    <groupId>org.glassfish.jersey.containers</groupId>
    <artifactId>jersey-container-servlet-core</artifactId>
</dependency>
</dependencies>

你能幫我解決這個問題嗎? 我嘗試了很多配置,但沒有一個主題有效。 我不知道我的IDE配置(IntelliJ)是否有問題。 謝謝!!

您需要指定glassfish的版本。直接或使用給定名稱jersey.version變量

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM