이 콘텐츠는 선택한 언어로 제공되지 않습니다.

1.4. Migrating Maven Projects


Overview

JBoss Fuse 6.1 now has a JBoss Fuse BOM (Bill of Materials), which defines the versions of all the JBoss Fuse Maven artifacts. You can use the BOM to simplify migration of your Maven POM files. Instead of updating the version elements on each Maven dependency, all you need to do is to import the latest JBoss Fuse BOM, which defines default versions for all of the dependencies provided by JBoss Fuse.

JBoss Fuse BOM

The JBoss Fuse BOM is a parent POM that defines the versions for all of the Maven artifacts provided by JBoss Fuse. The JBoss Fuse BOM exploits Maven's dependency management mechanism to specify default versions for the Maven artifacts, so that it is no longer necessary to specify the artifact versions explicitly in your POM.

Current version of the JBoss Fuse BOM

The easiest way to discover the current version of the JBoss Fuse BOM is to examine one of the sample pom.xml files from the quickstarts examples. For example, in the InstallDir/quickstarts/eip/pom.xml file, you can find a line that defines the JBoss Fuse BOM version, as follows:
<project ...>
    ...
    <properties>
        ...
        <!-- the version of the JBoss Fuse BOM, defining all the dependency versions -->
        <jboss.fuse.bom.version>6.1.0.redhat-379</jboss.fuse.bom.version>
    </properties>
    ...
</project>
Copy to Clipboard Toggle word wrap

How to migrate Maven dependencies using the JBoss Fuse BOM

To migrate Maven dependencies using the JBoss Fuse BOM, open the Maven pom.xml file for your project and edit it as follows:
  1. Define the JBoss Fuse BOM version as a property in your pom.xml file, using the current BOM version. For example:
    <project ...>
        ...
        <properties>
            ...
            <jboss.fuse.bom.version>6.1.0.redhat-379</jboss.fuse.bom.version>
        </properties>
        ...
    </project>
    Copy to Clipboard Toggle word wrap
  2. Reference the JBoss Fuse BOM parent POM in a dependencyManagement element, so that it defines default versions for the artifacts provided by JBoss Fuse. Add the following dependencyManagement element to your pom.xml file:
    <project ...>
        ...
        <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>
        ...
    </project>
    Copy to Clipboard Toggle word wrap
  3. Now delete all of the version elements in your JBoss Fuse dependencies. All of the versions defined in the JBoss Fuse BOM will be applied automatically to your dependencies (through the Maven dependency management mechanism). For example, if you already had some Apache Camel dependencies, as follows:
      <dependencies>
        <dependency>
          <groupId>org.apache.camel</groupId>
          <artifactId>camel-core</artifactId>
     <version>2.12.0.redhat-610379</version>
        </dependency>
        <dependency>
          <groupId>org.apache.camel</groupId>
          <artifactId>camel-blueprint</artifactId>
     <version>2.12.0.redhat-610379</version>
        </dependency>
        <dependency>
          <groupId>org.apache.camel</groupId>
          <artifactId>camel-jetty</artifactId>
     <version>2.12.0.redhat-610379</version>
        </dependency>
        ...
      </dependencies>
    Copy to Clipboard Toggle word wrap
    You would delete the version elements, so that the dependencies are specified as follows:
      <dependencies>
        <dependency>
          <groupId>org.apache.camel</groupId>
          <artifactId>camel-core</artifactId>
        </dependency>
        <dependency>
          <groupId>org.apache.camel</groupId>
          <artifactId>camel-blueprint</artifactId>
        </dependency>
        <dependency>
          <groupId>org.apache.camel</groupId>
          <artifactId>camel-jetty</artifactId>
        </dependency>
        ...
      </dependencies>
    Copy to Clipboard Toggle word wrap
  4. In future, when you migrate to a later version of JBoss Fuse, all that you need to do to upgrade your pom.xml file is to edit the jboss.fuse.bom.version property, so that it references the new version of the JBoss Fuse BOM.
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat