@0negativ/hawtio-integration 中文文档教程
hawtio-integration
这个项目为 hawtio 提供了 ActiveMQ、Camel、Karaf 和 Spring Boot 插件。
Installation
yarn add @hawtio/integration
Set up development environment
Clone the repository
git clone https://github.com/hawtio/hawtio-integration
cd hawtio-integration
Install development tools
Install project dependencies
yarn install
Developing
Run the web application
yarn start
Change the default proxy port
要代理到在不同于 8282
的端口上运行的本地 JVM,请指定 --port
CLI argument to gulp:
yarn start -- --port=8181
Output build to a different directory
在从属控制台中开发此插件时,您可以更改输出编译后的 .js
和 .css
所在的目录。 只需使用 --out
标志来设置不同的输出目录,例如:
gulp watch --out=../fabric8-console/libs/hawtio-integration/dist/
每当构建完成时,编译的 .js
文件将被放入目标目录。 不要忘记在提交更改之前先执行不带此标志的 gulp build
!
Turn on source maps generation for debugging TypeScript
如果您想使用浏览器开发工具(如 Chrome DevTools)调试 .ts
,请将 --sourcemap
标志传递给 gulp:
gulp --sourcemap
提交时不要使用此标志已编译的 .js
文件,因为它将源映射嵌入到输出文件中。 仅在开发期间使用此标志。
Upgrade Apache Camel
为了在 Camel 插件中支持最新的 Camel 元模型,您需要使用最新的 camel-catalog 更新 camelModel.js。 为此,首先更新
camel-model-generator
pom.xml 中的 Camel 版本:
<version.org.apache.camel>2.23.0</version.org.apache.camel>
然后运行以下纱线脚本:
yarn update-camel-model
hawtio-integration
This project provides ActiveMQ, Camel, Karaf and Spring Boot plugins for hawtio.
Installation
yarn add @hawtio/integration
Set up development environment
Clone the repository
git clone https://github.com/hawtio/hawtio-integration
cd hawtio-integration
Install development tools
Install project dependencies
yarn install
Developing
Run the web application
yarn start
Change the default proxy port
To proxy to a local JVM running on a different port than 8282
specify the --port
CLI arguement to gulp:
yarn start -- --port=8181
Output build to a different directory
When developing this plugin in a dependent console you can change the output directory where the compiled .js
and .css
go. Just use the --out
flag to set a different output directory, for example:
gulp watch --out=../fabric8-console/libs/hawtio-integration/dist/
Whenever the build completes the compiled .js
file will be put into the target directory. Don't forget to first do a gulp build
without this flag before committing changes!
Turn on source maps generation for debugging TypeScript
If you want to debug .ts
using a browser developer tool such as Chrome DevTools, pass the --sourcemap
flag to gulp:
gulp --sourcemap
Do not use this flag when you are committing the compiled .js
file, as it embeds source maps to the output file. Use this flag only during development.
Upgrade Apache Camel
In order to support the latest Camel meta model in Camel plugin, you need to update the camelModel.js with the latest camel-catalog
. To do so, first update the Camel version in the camel-model-generator
pom.xml:
<version.org.apache.camel>2.23.0</version.org.apache.camel>
then run the following yarn script:
yarn update-camel-model