此内容没有您所选择的语言版本。

Chapter 5. Creating a New Fuse Project


Overview

The tooling uses Maven archetypes to generate a project with all of the dependencies preconfigured. The archetypes also create the POM file needed to run and deploy your application, as well as sample code and data to get you started.

Procedure

To create a Fuse project:
  1. Select File New Fuse Project to open the New Fuse Project wizard shown in Figure 5.1, “New Fuse Project Wizard's Project Location Page”.

    Figure 5.1. New Fuse Project Wizard's Project Location Page

    project location page of Red Hat JBoss Fuse Tooling's new project wizard
    The wizard opens with the Use default workspace location option selected on the location page.
  2. Enter the name of the Fuse project.
  3. Specify the location where the data for the project will be stored.
    • To use the default workspace select Use default workspace location.
    • To use an alternative location clear Use default workspace location and specify a new location in the provided field.
      Clicking Browse button opens a file browser.
  4. If you want to add the new project to an Eclipse working set, select Add project(s) to working set and enter the name of the working set.
  5. Click Next button to open the New Fuse Project details page shown in Figure 5.2.

    Figure 5.2. New Fuse Project wizard's details page

    project details page of Fuse new project wizard
  6. Select a project type from the list.
    Note
    The route editor works with these project types:
    • camel-archetype-activemq
      Creates a new Apache Camel project that configures and interacts with Apache ActiveMQ.
    • camel-archetype-blueprint
      Creates a new Apache Camel project with support for OSGi blueprint that is deployment-ready for OSGi.
    • camel-archetype-cxf-code-first-blueprint
      Creates a new Apache Camel project with Apache CXF code-first example using OSGi Blueprint.
    • camel-archetype-cxf-contract-first-blueprint
      Creates a new Apache Camel project with Apache CXF contract-first example using OSGi Blueprint.
    • camel-archetype-java
      Creates a new Apache Camel project using Java DSL.
      You cannot edit Java DSL in the route editor.
    • camel-archetype-spring
      Creates a new Apache Camel project with added support for Spring DSL.
    • camel-archetype-spring-dm
      Deprecated Creates a new Apache Camel project with added support for Spring DSL that is deployment-ready for OSGi.
    • camel-archetype-web
      Creates a new Apache Camel web project that deploys the Camel routes as a WAR.
    • cxf-jaxrs-service
      Creates a simple CXF JAX-RS web application service using Spring configuration.
    • cxf-jaxws-javafirst
      Creates a project for developing a Web service starting from Java code.
  7. Enter a group ID for the project in the Group Id field, or accept the default.
    The tooling uses the group ID to form the first part of the dot-separated package name. For example, if you enter Demo for the group ID, it appears in the Package field as Demo..
  8. Enter an artifact ID for the project in the Artifact Id field, or accept the default.
    The tooling uses the artifact ID as the name of the project and to form the second part of the dot-separated package name. For example, if you enter BigRoute for the artifact ID, it appears in the Package field as Demo.BigRoute.
  9. Enter a version for the project in the Version field, or accept the default.
  10. If you want to change the package name generated for the artifacts, enter the new package name in the Package field.
  11. Click Finish to create the Maven project, which contains starting point artifacts.

Resolving Maven dependency errors

You may encounter Maven dependency errors after you create a new Fuse project.
Though it can happen at other times, it more typically occurs when you create a project based on any of the supplied archetypes for the first time, but then cancel the project before the process finishes. Interrupting the process in this way often prevents all of the project's dependencies from downloading from the Maven repositories, which can take some time.
You can often easily resolve these dependency errors by updating Maven dependencies this way:
  1. In Project Explorer, select the root project just created.
  2. Right-click it to open the context menu.
  3. Select Maven Update Project...
  4. In the Update Maven Project wizard, check Force Update of Snapshots/Releases.
  5. Click OK.
    In the bottom, right corner of the workbench, you may see the progress status bar churning as missing dependencies are downloaded from the Maven repositories.

Related topics

New Fuse Project
Red Hat JBoss Fuse Tooling Tutorials, To Create a New Route
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.