JBoss Fuse/Red Hat JBoss developer Studio,Fuse 集成项目错误

JBoss Fuse/ Red Hat JBoss developer Studio, Fuse Integration Project error

我在 运行 maven 安装时遇到错误,或者在图形 Camel 项目中对以下 POM 文件进行 maven 清理时出错。我正在使用 Red Hat JBoss Developer Studio

我的pom flie如下

<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.mycompany</groupId>
  <artifactId>camel-blueprint</artifactId>
  <version>1.0.0-SNAPSHOT</version>
  <packaging>bundle</packaging>
  <name>Camel Blueprint Quickstart</name>
  <description>Empty Camel Blueprint Example</description>
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

    <properties>
    <camel.version>2.17.3</camel.version>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <version.maven-bundle-plugin>2.3.7</version.maven-bundle-plugin>
    **<jboss.fuse.bom.version>6.3.0.redhat-187</jboss.fuse.bom.version>**
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties> 



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

  <dependencies>
    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-core</artifactId>
      <version>2.17.3</version>
    </dependency>

    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-blueprint</artifactId>
      <version>2.17.3</version>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.5.4</version>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
        <version>1.7.5</version>
    </dependency>

    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
        <version>2.7</version>
    </dependency>

    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-test-blueprint</artifactId>
      <version>2.17.3</version>
      <scope>test</scope>
    </dependency>
  </dependencies>


  <repositories>

    <repository>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>fuse-public-repository</id>
      <name>FuseSource Community Release Repository</name>
      **<url>https://repo.fusesource.com/nexus/content/groups/public</url>**
    </repository>

    <repository>
            <id>redhat-ea-repository</id>
            <url>https://maven.repository.redhat.com/earlyaccess/all</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>

    <repository>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>red-hat-ga-repository</id>
      <name>Red Hat GA Repository</name>
      <url>https://maven.repository.redhat.com/ga</url>
    </repository>

  </repositories>

  <pluginRepositories>

    <pluginRepository>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>fuse-public-repository</id>
      <name>FuseSource Community Release Repository</name>
      <url>https://repo.fusesource.com/nexus/content/groups/public</url>
    </pluginRepository>

    <pluginRepository>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>red-hat-ga-repository</id>
      <name>Red Hat GA Repository</name>
      <url>https://maven.repository.redhat.com/ga</url>
    </pluginRepository>

  </pluginRepositories>


  <build>
    <defaultGoal>install</defaultGoal>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>${version.maven-bundle-plugin}</version>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Bundle-SymbolicName>cameltry</Bundle-SymbolicName>
            <Bundle-Name>Empty Camel Blueprint Example [cameltry]</Bundle-Name></instructions></configuration>
      </plugin>

      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.5.1</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <version>3.0.1</version>
        <configuration>
          <encoding>UTF-8</encoding>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-maven-plugin</artifactId>
        <version>${camel.version}</version>
        <configuration>
          <useBlueprint>true</useBlueprint>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>

我在控制台得到的错误信息如下

Non-resolvable import POM: Failure to find org.jboss.fuse.bom:jboss-fuse-parent:pom:6.3.0.redhat-187 in https://(our nexus repository)/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of (our nexus repository).com has elapsed or updates are forced @ line 29, column 19 -> [Help 2] [ERROR]

任何和所有的帮助都将结束我为解决问题而进行的长期搜索,从而获得我永远的感激之情。

P.S。我已经完成了 Maven 配置,以便按照 Redhat Documentation Website

上的建议设置所需的依赖配置文件

第二版 POM 基于 28.12.16 1500 小时 CET 的建议。

<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.mycompany</groupId>
  <artifactId>camel-blueprint</artifactId>
  <version>1.0.0-SNAPSHOT</version>
  <packaging>bundle</packaging>
  <name>Camel Blueprint Quickstart</name>
  <description>Empty Camel Blueprint Example</description>
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

    <properties>
    <camel.version>2.17.3</camel.version>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <version.maven-bundle-plugin>2.3.7</version.maven-bundle-plugin>
    **<jboss.fuse.bom.version>6.3.0.redhat-189</jboss.fuse.bom.version>**
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties> 



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

  <dependencies>
    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-core</artifactId>
      <version>2.17.3</version>
    </dependency>

    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-blueprint</artifactId>
      <version>2.17.3</version>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.5.4</version>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
        <version>1.7.5</version>
    </dependency>

    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
        <version>2.7</version>
    </dependency>

    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-test-blueprint</artifactId>
      <version>2.17.3</version>
      <scope>test</scope>
    </dependency>
  </dependencies>


  <repositories>

    <repository>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>fuse-public-repository</id>
      <name>FuseSource Community Release Repository</name>
      **<url>https://repository.jboss.org/nexus/content/groups/ea/org/jboss/fuse/bom/jboss-fuse-parent/</url>**
    </repository>



      <!--<repository>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>6.3.0 jboss parent</id>
      <name>jbp</name>
      <url>https://repository.jboss.org/nexus/content/groups/ea/org/jboss/fuse/bom/jboss-fuse-parent/ /</url>
    </repository>  -->

          <repository>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>Jboss Fuse snapshots repo</id>
      <name>JFSR</name>
      <url>https://repo.fusesource.com/nexus/content/groups/public-snapshots/</url>
    </repository>



    <repository>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>red-hat-ga-repository</id>
      <name>Red Hat GA Repository</name>
      <url>https://maven.repository.redhat.com/ga</url>
    </repository>

  </repositories>

  <pluginRepositories>

    <pluginRepository>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>fuse-public-repository</id>
      <name>FuseSource Community Release Repository</name>
      <url>https://repo.fusesource.com/nexus/content/groups/public</url>
    </pluginRepository>

    <pluginRepository>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>red-hat-ga-repository</id>
      <name>Red Hat GA Repository</name>
      <url>https://maven.repository.redhat.com/ga</url>
    </pluginRepository>

  </pluginRepositories>


  <build>
    <defaultGoal>install</defaultGoal>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>${version.maven-bundle-plugin}</version>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Bundle-SymbolicName>cameltry</Bundle-SymbolicName>
            <Bundle-Name>Empty Camel Blueprint Example [cameltry]</Bundle-Name></instructions></configuration>
      </plugin>

      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.5.1</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <version>3.0.1</version>
        <configuration>
          <encoding>UTF-8</encoding>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-maven-plugin</artifactId>
        <version>${camel.version}</version>
        <configuration>
          <useBlueprint>true</useBlueprint>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>

检查您的浏览器是否依赖项 org.jboss.fuse.bom:jboss-fuse-parent:pom:6.3.0.redhat-187 存在于您正在使用的任何存储库中。 您的 nexus 存储库是否包含(确切地!)这个工件?

如果是: 原因可能是身份验证或连接失败。确保您为此存储库的凭据配置正确,并且存储库授予您的帐户对工件的权限。 (还要考虑潜在的代理问题)

运行 使用参数 -X 的构建可能有助于获取更多信息。

如果没有: (您的 pom 中的 repo 不包含版本 187: https://repo.fusesource.com/nexus/content/groups/public/org/jboss/fuse/bom/jboss-fuse-parent/ ) 添加一个包含缺失人工制品的仓库或(如果可接受)将人工制品更改为您的仓库中存在的版本。

https://repository.jboss.org/nexus/content/groups/ea/org/jboss/fuse/bom/jboss-fuse-parent/ 是一个候选者,但它不包含确切的版本 187。 是否可以接受对版本 6.3.0.redhat-187-05 的更改?

问题已解决。问题是 maven 被我的 settings.xml 指示在我们的仓库而不是 jboss 仓库中查找文件。这是因为 settings.xml 的配置告诉 maven 这些 repos 没有在我们的联系中镜像。因此在我的 settings.xml 的 mirrorOf 部分添加 '!jbossRepo(X)' 告诉 Maven 这些文件没有镜像到我们的关系中,应该在以下配置文件中搜索这些文件。

可以按照 link 上的说明在您的 settings.xml 中配置上述配置文件。

因此,如果您想 运行 jBoss Red Hat Developer Studio 从像我这样的大量代理后面,简单地说,

  1. 根据以上link.
  2. 为studio配置maven
  3. 在 settings.xml 文件的 'mirrorsOf' 前面的镜像块中添加 '!jbossRepos(x)'。
  4. 完成!

感谢 RobE,为我指明了正确的方向。我很感激。