无法解析的构建扩展:或其中一个依赖项无法解析:无法读取工件描述符

时间:2017-11-22 10:16:48

标签: java eclipse apache maven

我遇到运行maven安装的问题。当我导入项目时,pom.xml文件显示错误:

  

此行找到多个注释:      - 项目构建错误:无法解析的构建扩展:插件org.apache.felix:maven-bundle-plugin:2.3.7或其依赖项之一   无法解决:无法读取工件描述符   org.apache.felix:行家束-插件中:jar:2.3.7      - 解决插件版本的错误' org.apache.maven.plugins:maven-site-plugin'从存储库   [local(C:\ Users \ c76266.m2 \ repository),release.fusesource.org   (http://repo.fusesource.com/nexus/content/repositories/releases),   ea.fusesource.org   (http://repo.fusesource.com/nexus/content/groups/ea),中央   (https://repo.maven.apache.org/maven2)]:找不到任何插件   插件库

我已更新项目,此步骤无法解决此问题。当我运行maven install或clean时显示错误:

[INFO] Scanning for projects...
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/apache/felix/maven-bundle-plugin/2.3.7/maven-bundle-plugin-2.3.7.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Unresolveable build extension: Plugin org.apache.felix:maven-bundle-plugin:2.3.7 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.felix:maven-bundle-plugin:jar:2.3.7 @ 
[ERROR] Unknown packaging: bundle @ line 9, column 13
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project com.prudential.integration.middleware:crm-services:1.0.0-SNAPSHOT (C:\Users\c76266\Documents\workspace-sts-3.8.3.RELEASE\crm-services\pom.xml) has 2 errors
[ERROR]     Unresolveable build extension: Plugin org.apache.felix:maven-bundle-plugin:2.3.7 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.felix:maven-bundle-plugin:jar:2.3.7: Could not transfer artifact org.apache.felix:maven-bundle-plugin:pom:2.3.7 from/to central (https://repo.maven.apache.org/maven2): unexpected end of stream on Connection{repo.maven.apache.org:443, proxy=HTTP @ /10.171.74.5:8080 hostAddress=10.171.74.5 cipherSuite=none protocol=http/1.1} (recycle count=0): \n not found: size=0 content=... -> [Help 2]
[ERROR]     Unknown packaging: bundle @ line 9, column 13
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginManagerException

如何解决这个问题?在我的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/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <groupId>com.prudential.integration.middleware</groupId>
    <artifactId>crm-services</artifactId>
    <packaging>bundle</packaging>
    <version>1.0.0-SNAPSHOT</version>

    <name>CRM SERVICES</name>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    </properties>

    <repositories>
        <repository>
            <id>release.fusesource.org</id>
            <name>FuseSource Release Repository</name>
            <url>http://repo.fusesource.com/nexus/content/repositories/releases</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <releases>
                <enabled>true</enabled>
            </releases>
        </repository>
        <repository>
            <id>ea.fusesource.org</id>
            <name>FuseSource Community Early Access Release Repository</name>
            <url>http://repo.fusesource.com/nexus/content/groups/ea</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <releases>
                <enabled>true</enabled>
            </releases>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>release.fusesource.org</id>
            <name>FuseSource Release Repository</name>
            <url>http://repo.fusesource.com/nexus/content/repositories/releases</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <releases>
                <enabled>true</enabled>
            </releases>
        </pluginRepository>
        <pluginRepository>
            <id>ea.fusesource.org</id>
            <name>FuseSource Community Early Access Release Repository</name>
            <url>http://repo.fusesource.com/nexus/content/groups/ea</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <releases>
                <enabled>true</enabled>
            </releases>
        </pluginRepository>
    </pluginRepositories>

    <dependencies>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-core</artifactId>
            <version>2.15.1.redhat-620133</version>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-jaxb</artifactId>
            <version>2.15.1.redhat-620133</version>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-jackson</artifactId>
            <version>2.15.1.redhat-620133</version>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-mail</artifactId>
            <version>2.15.1.redhat-620133</version>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-cxf</artifactId>
            <version>2.15.1.redhat-620133</version>
            <exclusions>
                <exclusion>
                    <artifactId>asm</artifactId>
                    <groupId>asm</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-frontend-jaxrs</artifactId>
            <version>3.0.4.redhat-620133</version>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-transports-http-jetty</artifactId>
            <version>3.0.4.redhat-620133</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-email</artifactId>
            <version>1.4</version>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.10</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.3.2</version>
        </dependency>

        <!-- Database -->
        <dependency>
            <groupId>commons-dbcp</groupId>
            <artifactId>commons-dbcp</artifactId>
            <version>1.4</version>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-sql</artifactId>
            <version>2.15.1.redhat-620133</version>
        </dependency>
        <dependency>
            <groupId>com.microsoft.sqlserver.jdbc</groupId>
            <artifactId>sqlserverjdbc</artifactId>
            <version>4.1</version>
        </dependency>
        <dependency>
            <groupId>postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>9.1-901-1.jdbc4</version>
        </dependency>

        <!-- logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.10</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.7.10</version>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
        </dependency>
        <dependency>
            <groupId>com.prudential.integration.middleware</groupId>
            <artifactId>common-utilities</artifactId>
            <version>1.0.1</version>
        </dependency>
        <dependency>
            <groupId>com.prudential.integration.middleware.common</groupId>
            <artifactId>prudential-fuse-common-dao</artifactId>
            <version>1.0.0</version>
        </dependency>
        <dependency>
            <groupId>com.prudential.integration.middleware.common</groupId>
            <artifactId>prudential-fuse-common-model</artifactId>
            <version>1.0.0</version>
        </dependency>
        <dependency>
            <groupId>com.prudential.enc</groupId>
            <artifactId>pruencutil</artifactId>
            <version>0.0.1-SNAPSHOT</version>
        </dependency>

    </dependencies>

    <build>
        <defaultGoal>install</defaultGoal>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.5.1</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>

            <!-- allows the route to be ran via 'mvn camel:run' -->
            <plugin>
                <groupId>org.apache.camel</groupId>
                <artifactId>camel-maven-plugin</artifactId>
                <version>2.15.1.redhat-620133</version>
            </plugin>

            <!-- to generate the MANIFEST-FILE of the bundle -->
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>2.3.7</version>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-SymbolicName>crm-service</Bundle-SymbolicName>
                        <Export-Package />
                        <Import-Package>*</Import-Package>
                        <Embed-Dependency>sqlserverjdbc,commons-lang3,commons-dbcp,commons-codec,commons-email,postgresql,pruencutil</Embed-Dependency>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>

1 个答案:

答案 0 :(得分:0)

问题可能发生在代理配置上(如Pierre B.提到的)

在我的开发人员上创建一个maven项目并安装你的pom。 它成功结束了。

IDE:Luna Service Release 2(4.4.2)构建ID:20150219-0600 MAVEN版本:apache-maven-3.3.3 JDK:java版“1.8.0_131” Java(TM)SE运行时环境(版本1.8.0_131-b11) Java HotSpot(TM)64位服务器VM(内置25.131-b11,混合模式)

注意:记得在maven安装中的conf文件夹中配置maven文件: settingsProxy.xml ,并在使用eclipse路径的情况下配置它:windows-preferences-Maven-User Settings < / p>

复制结果:

enter image description here