错误pom.xml错误解决版本和错误打包

时间:2017-11-23 10:53:55

标签: spring maven pom.xml

我在pom.xml中发现了错误。以下错误:

  

此行找到多个注释:      - 从存储库中解析插件'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)]:找不到任何插件   插件存储库      - 项目构建错误:无法解析的构建扩展:插件org.apache.felix:maven-bundle-plugin:2.3.7或其依赖项之一   无法解决:以下工件无法解决   已解决:org.apache.maven:maven-core:jar:2.0.7,   org.apache.maven:Maven的设置中:jar:2.0.7,   org.apache.maven:Maven的插件,参数记录器:罐子:      2.0.7,org.apache.maven:maven-profile:jar:2.0.7,org.apache.maven:maven-model:jar:2.0.7,   org.apache.maven:Maven的神器:罐子:2.0.7,   org.codehaus.plexus:丛-盛器
  默认值:罐:1.0-α-9-稳定-1,   org.apache.maven:Maven的存储库的元数据中:jar:2.0.7,   org.apache.maven:Maven的错误诊断:罐子:2.0.7,   org.apache.maven:maven-project:jar:2.0.7,   org.apache.maven:Maven的插件,注册表中:jar:2.0.7,   org.apache.maven:Maven的插件的API中:jar:2.0.7,   org.apache.maven:Maven的插件描述符中:jar:2.0.7,
  org.apache.maven:行家伪影经理:罐子:2.0.7,   org.apache.maven:Maven的显示器中:jar:2.0.7,   classworlds:classworlds:jar:1.1:无法转移神器
  org.apache.maven:maven-core:jar:2.0.7 from / to central   (https://repo.maven.apache.org/maven2):意外的流结束   连接{repo.maven.apache.org:443,proxy = HTTP @   idnproxy.pru.intranet.asia/10.171.74.5:8080 hostAddress = 10.171.74.5   cipherSuite =无协议= http / 1.1}(回收计数= 0)

     

项目构建错误:未知包装:捆绑

error pom.xml

如何解决这个问题?感谢。

2 个答案:

答案 0 :(得分:0)

Maven xml include似乎是很好的代码,所以我说你导入/安装了错误的东西,可能是不同的版本?

答案 1 :(得分:0)

这是我的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.prudential.integration.middleware.common</groupId>
    <artifactId>prudential-fuse-common-model</artifactId>
    <version>1.0.1</version>
    <packaging>bundle</packaging>

    <name>Prudential Fuse Common Model</name>
    <url>http://maven.apache.org</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </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-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.camel</groupId>
            <artifactId>camel-jaxb</artifactId>
            <version>2.15.1.redhat-620133</version>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>2.3.7</version>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                        <Bundle-Name>${project.name}</Bundle-Name>
                        <Bundle-Version>${project.version}</Bundle-Version>
                        <Import-Package>*</Import-Package>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>