如何自定义 Adob​​e/Day Communique Bundle 构建流程?

发布于 2024-11-27 01:04:36 字数 559 浏览 3 评论 0原文

有没有办法向您右键单击并从 CRXDE 中选择“构建捆绑包”时触发的捆绑包构建过程添加额外的构建步骤?

我现在的具体用例是能够运行 xjc 编译器来为 JAXB 绑定生成一些额外的 Java 源类,以便与第 3 方 Web 服务交互。但具体的额外任务实际上可以是任何事情。

我可以看到,单击“Build Bundle”项会触发对 /libs/crxde/build 的 POST 请求,其中包含两个参数,一个参数指示包的根目录,另一个参数指示包描述符的位置。此 URL 由 com.day.crx.ide.CRXDEBuildServlet servlet 提供服务,该 servlet 是 com.day.crx.crxde-support 包的一部分。

现在,我必须在 CRXDE 外部运行 xjc 进程(在本例中通过命令行中的 Maven),然后使用 vlt 将生成的 .java 文件推回 JCR 树,然后右键单击 Build Bundle 进程。

我意识到我可以在外部构建自己的 OSGi 包并将其安装到 Felix,但我正在寻找一种方法来避免这种情况,因为它使我们的开发环境更加复杂,特别是对于团队中的一些初级 CQ 人员来说。

Is there a way to add additional build steps to the Bundle building process that is triggered when you right click and select "Build Bundle" from within CRXDE?

My specific use case right now is to be able to run the xjc compiler to generate some additional Java source classes for JAXB binding for interacting with a 3rd party web service. But the specific additional tasks could be anything really.

I can see that clicking the Build Bundle item triggers a POST request to /libs/crxde/build that includes two parameters, one that indicates the root directory of the bundle and also the location of the bundle descriptor. This URL is serviced by the com.day.crx.ide.CRXDEBuildServlet servlet which is part of the com.day.crx.crxde-support bundle.

Right now I am having to run the xjc process externally to CRXDE (via Maven from the command line in this case) and then push the generated .java files back into the JCR tree using vlt, then do the right click Build Bundle process.

I realize I could build my own OSGi bundle externally and install it to Felix, but I am looking for a way to avoid that as it makes our development environment more complex, particularly with some junior CQ folks on the team.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

感悟人生的甜 2024-12-04 01:04:36

对于那些寻找这个问题答案的人来说,不幸的是没有答案。 CQ 中嵌入的捆绑包构建过程非常基本,我发现没有任何钩子可以让您使用自定义步骤对其进行扩展。

如果您需要为您的捆绑包进行自定义构建,其中包括其他步骤,您将需要使用 Apache Maven 等外部构建工具,然后将捆绑包部署到您的 CQ 服务器(这可以作为 Maven 构建过程的一部分轻松完成) 。

我们继续创建了一个 Maven 原型,现在将其用作所有 CQ 项目的基础,并且不再使用嵌入在 CQ 中的捆绑包构建过程。我们免费提供了原型,因此如果您想使用它,可以在这里阅读:

http://www.cqblueprints.com/xwiki/bin/view/Blue+Prints/The+CQ+Project+Maven+Archetype

干杯

For those looking for an answer to this question, unfortunately there is none. The bundle build process embedded within CQ is very basic and there are no hooks that I have ever discovered that will allow you to extend it with custom steps.

If you need to do a custom build for your bundle that includes additional steps you will need to use an external build tool like Apache Maven and then deploy the bundle to your CQ server (which can easily be done as part of the Maven build process).

We went ahead and created a Maven Archetype that we now use as the basis for all of our CQ projects and do not use the bundle build process embedded within CQ at all anymore. We made the archetype freely available, so if you want to make use of it you can read about here:

http://www.cqblueprints.com/xwiki/bin/view/Blue+Prints/The+CQ+Project+Maven+Archetype

Cheers

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文