Chapter 28. Publishing Fuse Projects to a Server
Abstract
You deploy Fuse projects into a server runtime using the Eclipse publishing mechanism. To do so, you must have defined and added the server to the Servers panel in Fuse Integration perspective (for details, see Chapter 27, Managing servers. For a step-by-step demonstration, see Red Hat JBoss Fuse Tooling Tutorials, To Publish a Fuse Project to Red Hat JBoss Fuse.
Overview
You can set up supported servers to publish assigned Fuse projects automatically or to publish them only when you manually invoke the publish command.
Each server runtime added to the Servers panel has its own Overview page that contains its configuration, connection, and publishing details:
You may need to expand Publishing to expose the server runtime publishing options and default settings:
- Never publish automatically—You must select this option to manually publish projects.ImportantYou must also disable the If server started, publish changes immediately option on the server's Add and Remove page (for details see, the section called “Publishing Fuse projects manually”.
- Automatically publish when resources change—[default] Enable this option to automatically publish or republish a Fuse project when you save changes made to it. How quickly projects are published depends on the Publishing interval (default is 15 seconds).
- Automatically publish after a build event—For Fuse projects, works the same as Automatically publish when resources change.
Publishing Fuse projects automatically when resources change
The default publishing option for server runtimes is Automatically publish when resources change.
- If necessary, start up the server runtime to which you want to publish a Fuse project. For details, see Section 27.2, “Starting a Server”.
- In the Servers panel, double-click the server runtime to open its Overview page.
- Expand Publishing, and then select Automatically publish when resources change.
- To increase or decrease the interval between publishing cycles, click the radio button next to Publishing interval (in seconds) up or down, as appropriate.
- In the Servers panel, right-click the server runtime to open the context menu, and then select .All resources available for publishing appear in the Available column.
- To assign a resource (in this case, the
wildThing
Fuse project) to the server runtime:- double-click it, or
- select it, and click.
The selected resource moves to the Configured column:At this stage, the time at which the assigned resource would actually be published would depend on whether the server runtime was running and on the Publishing interval setting. However, if the server was stopped, you would have to manually publish the project after you started the server (for details, see the section called “Publishing Fuse projects manually”). - Click the If server started, publish changes immediately option to enable it:This option ensures that the configured project is published immediately once you click Automatically publish when resources change option on the server runtime Overview page ensures that the configured project is republished whenever changes made to the local project are saved.. The
- Click.The project appears in the Servers panel under the server runtime node, and the server runtime status reports
[Started,Publishing...]
:When publishing is done, the status of both the server runtime and the project report[Started,Synchronized]
:NoteFor a server runtime,Synchronized
means that all published resources on the server are identical to their local counterparts. For a published resource,Synchronized
means that it is identical to its local counterpart.
Publishing Fuse projects manually
- If necessary, start up the server runtime to which you want to publish a Fuse project. For details, see Section 27.2, “Starting a Server”.
- In the Servers panel, double-click the server runtime to open its Overview page.
- Expand Publishing, and then select Never publish automatically.
- If the Fuse project has already been assigned to the server runtime, make sure the If server started, publish changes immediately option is disabled.
- In the Servers panel, right-click the server runtime to open the context menu.
- Click Add and Remove page.to open the server's
- If the If server started, publish changes immediately option is enabled, disable it.
- Skip to Step 6.
- If the Fuse project has not been assigned to the server runtime, assign it now.
- Do not enable the If server started, publish changes immediately option.
- Click.The project appears in the Servers panel under the server runtime node, and the server runtime status reports
[Started]
: - In the Servers panel, right-click the project's node (in this case, the Fuse project
wildThing
) to open the context menu: - Select.During the publishing operation, the status of both the server runtime and the project report
[Started,Republish]
:When publishing is done, the status of both the server runtime and the project report[Started,Synchronized]
:NoteThe tooling does not support theoption. Clicking results in a full publish.
Verifying the project was published to the server
After you have published a Fuse project to a server runtime, you can connect to the server and check that the project's bundle was installed on it.
- Connect to the server runtime. For details see the section called “Connecting to a running server in Servers panel”
- In the Servers panel, expand the server runtime tree to expose the Bundles node and select it.The tooling populates Properties view with a list of bundles that are installed on the server:
- To find your project's bundle, either scroll down to the bottom of the list, or start typing the bundle's symbolic name in Properties view's Search box.The bundle's symbolic name is the artifactId you gave the project when you created it. You can find the artifactId at the very beginning of the project's
pom.xml
file. To open it in the tooling's XML editor, clickpom.xml
in Project Explorer, and then click the pom.xml tab in the XML editor.
Related topics
Red Hat JBoss Fuse Tooling Tutorials, To Publish a Fuse Project to Red Hat JBoss Fuse |