JBoss Fuse / Red Hat JBoss开发人员Studio,Fuse Integration Project错误

时间:2016-12-28 08:59:55

标签: maven jboss apache-camel redhat eai

我在运行maven install时遇到错误,或者在图形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>

我在控制台中收到的错误消息如下

  

不可解析的导入POM:未找到   org.jboss.fuse.bom:jboss-fuse-parent:pom:6.3.0.redhat-187 in   https://(our nexus存储库)/ content / groups / public被缓存在   本地存储库,在更新之前不会重新尝试解析   (我们的nexus存储库).com的间隔已经过去或更新了   强制@第29行,第19栏 - &gt; [帮助2] [错误]

任何和所有帮助都将结束我的长期搜索,以解决问题,从而获得我永恒的感激。

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>

2 个答案:

答案 0 :(得分:1)

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

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

因此,如果您尝试从像我这样的众多代理服务器后面运行jBoss Red Hat开发人员工作室,那么,

  1. 使用上述链接为工作室配置maven。
  2. 在settings.xml文件中的'mirrorsOf'前面的镜像块中添加'!jbossRepos(x)'。
  3. 完成!
  4. 感谢罗伯,指出我正确的方向。我感激不尽。

答案 1 :(得分:0)

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

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

使用参数-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的更改是否可以接受?