我怎样才能建立BIRT 4设计师RCP?

时间:2023-01-12 15:59:19

I am new to Eclipse development and I have been trying to build the BIRT designer RCP without success.

我是Eclipse开发的新手,我一直在尝试构建BIRT设计器RCP而没有成功。

My goal is to customize the BIRT designer, e.g. removing some views and menus, setting fixed data sources and templates, restricting some actions, etc, and then embed it in my own application, which wouldn't only be for reporting.

我的目标是定制BIRT设计师,例如删除一些视图和菜单,设置固定数据源和模板,限制某些操作等,然后将其嵌入我自己的应用程序中,这不仅用于报告。

Now, I have imported the BIRT Plug-ins in Eclipse from different sources, but there is always errors that I cannot get rid of.

现在,我已经从不同来源导入了Eclipse中的BIRT插件,但总有一些我无法摆脱的错误。

I downloaded the designer RCP sources as a set of plugins, then I imported them into Eclipse by selecting org.eclipse.birt.report.designer.ui.rcp first and then hitting the button labeled "Required Plug-ins ->" to add the dependencies.

我将设计器RCP源代码作为一组插件下载,然后通过首先选择org.eclipse.birt.report.designer.ui.rcp将其导入Eclipse,然后点击标有“Required Plug-ins - >”的按钮添加依赖关系。

I noticed there are some plug-ins with two versions, one with a JAR and one tagged as "qualifier" that includes the src directory; I had to manually remove the non-qualifier version to include the qualifier one --I don't know why the classes in the JAR wouldn't be found.

我注意到有一些插件有两个版本,一个带有JAR,另一个带有标记为“限定符”,包含src目录;我不得不手动删除非限定符版本以包含限定符一 - 我不知道为什么找不到JAR中的类。

Then I had to add some plugins not included in the downloaded sources, e.g. the datatools plug-ins. I got these from the "all-in-one" download of BIRT. I suppose I end up with a mix of plugins from the designer RCP download and the all-in-one download, but same version (4.4.2 last time).

然后我必须添加一些未包含在下载源中的插件,例如datatools插件。我从BIRT的“一体化”下载中获得了这些。我想我最终得到了设计师RCP下载和一体化下载的混合插件,但版本相同(上次是4.4.2)。

I also tried the other way around, i.e. start off of the all-in-one download (but the RCP is missing in the all-in-one download). I was able to launch org.eclipse.birt.report.designer.ui as an Eclipse application but, surprisingly, BIRT was not there at all. Furthermore, many errors were reported, e.g. "Bundle was not resolved because of a uses contraint violation".

我也尝试了相反的方法,即从一体化下载开始(但在一体化下载中缺少RCP)。我能够将org.eclipse.birt.report.designer.ui作为Eclipse应用程序启动,但令人惊讶的是,BIRT根本就没有。此外,报告了许多错误,例如“由于使用禁令违规,捆绑未得到解决”。

Even when I get rid of all the compilation problems, unresolved requirement are thrown at runtime when I launch it as an Eclipse app, the most common being about batik version: both 1.6 and 1.7 are included because I think both are required but 1.6 cannot be resolved, despite being there.

即使我摆脱了所有编译问题,当我将其作为Eclipse应用程序启动时,在运行时抛出未解决的需求,最常见的是关于蜡染版本:包括1.6和1.7因为我认为两者都是必需的但是1.6不能解决了,尽管在那里。

That is supposed to be the first step on the way to my goal, but I cannot even build the designer RCP.

这应该是实现目标的第一步,但我甚至无法建立设计师RCP。

I read the Eclipse docs about plug-in development but I am a bit lost now because nothing seems to work. I tried different versions of BIRT and Eclipse (currently BIRT 4.4.2 and Eclipse 4.4.2).

我阅读了有关插件开发的Eclipse文档,但我现在有点迷失,因为似乎没有任何工作。我尝试了不同版本的BIRT和Eclipse(目前是BIRT 4.4.2和Eclipse 4.4.2)。

Any help will be highly appreciated. It's been a week with this and I'm afraid I will have to give up and approach another framework if I cannot deliver any result soon. Thanks in advance.

任何帮助将受到高度赞赏。这已经过了一个星期了,如果我不能很快提供任何结果,我恐怕不得不放弃并接近另一个框架。提前致谢。

1 个解决方案

#1


After struggling for a couple of weeks I came to realize that Eclipse plugin development is not what I expected.

经过几周的挣扎,我开始意识到Eclipse插件开发并不像我预期的那样。

I tried everything as explained in my question and I couln't even build the Report Designer RCP application from sources.

我尝试了一切,如我的问题中所解释的那样,我甚至不能从源代码构建报表设计器RCP应用程序。

Now, for me, Eclipse dependency management is very flawed, plugin development (based on the OSGI model) too complicated and the IDE itself very unstable. Dealing with Eclipse plugin development was some of the most frustrating time as a software developer in my life.

现在,对我来说,Eclipse依赖管理存在很大缺陷,插件开发(基于OSGI模型)过于复杂,IDE本身也非常不稳定。处理Eclipse插件开发是我生命中软件开发人员最令人沮丧的时期。

If you are not fine with the Designer RCP as shipped, you better try Pentaho Reporting.

如果您随附的Designer RCP不合适,最好先试用Pentaho Reporting。

Pentaho Reporting is also Java, and has an open source report designer which is available in GitHub. It has proper building tools: you can use either Maven or Ant+Ivy. Everything in the building process works as expected, it is just a matter of two commands and you end up with a Java application that executes perfectly. I even started doing my own modifications to the sources and building to see the changes take effect. Just awesome!

Pentaho Reporting也是Java,并且有一个开源报告设计器,可以在GitHub中找到。它有适当的构建工具:您可以使用Maven或Ant + Ivy。构建过程中的所有内容都按预期工作,这只是两个命令的问题,最终得到一个完美执行的Java应用程序。我甚至开始对源和构建进行自己的修改以查看更改是否生效。太棒了!

As a colophon, I encourage you to abandon Birt and give Pentaho a try. I wasted two whole weeks with Birt and Eclipse to attain nothing, whereas in one day I could outline my way with Pentaho Reporting. And there is much more than just the report designer.

作为一个版权,我鼓励你放弃Birt并试试Pentaho。我浪费了两个星期的时间用Birt和Eclipse来实现一切,而有一天我可以用Pentaho报告概述我的方式。而且不仅仅是报告设计师。

Hope this saves you some valuable time.

希望这能为您节省宝贵的时间。

#1


After struggling for a couple of weeks I came to realize that Eclipse plugin development is not what I expected.

经过几周的挣扎,我开始意识到Eclipse插件开发并不像我预期的那样。

I tried everything as explained in my question and I couln't even build the Report Designer RCP application from sources.

我尝试了一切,如我的问题中所解释的那样,我甚至不能从源代码构建报表设计器RCP应用程序。

Now, for me, Eclipse dependency management is very flawed, plugin development (based on the OSGI model) too complicated and the IDE itself very unstable. Dealing with Eclipse plugin development was some of the most frustrating time as a software developer in my life.

现在,对我来说,Eclipse依赖管理存在很大缺陷,插件开发(基于OSGI模型)过于复杂,IDE本身也非常不稳定。处理Eclipse插件开发是我生命中软件开发人员最令人沮丧的时期。

If you are not fine with the Designer RCP as shipped, you better try Pentaho Reporting.

如果您随附的Designer RCP不合适,最好先试用Pentaho Reporting。

Pentaho Reporting is also Java, and has an open source report designer which is available in GitHub. It has proper building tools: you can use either Maven or Ant+Ivy. Everything in the building process works as expected, it is just a matter of two commands and you end up with a Java application that executes perfectly. I even started doing my own modifications to the sources and building to see the changes take effect. Just awesome!

Pentaho Reporting也是Java,并且有一个开源报告设计器,可以在GitHub中找到。它有适当的构建工具:您可以使用Maven或Ant + Ivy。构建过程中的所有内容都按预期工作,这只是两个命令的问题,最终得到一个完美执行的Java应用程序。我甚至开始对源和构建进行自己的修改以查看更改是否生效。太棒了!

As a colophon, I encourage you to abandon Birt and give Pentaho a try. I wasted two whole weeks with Birt and Eclipse to attain nothing, whereas in one day I could outline my way with Pentaho Reporting. And there is much more than just the report designer.

作为一个版权,我鼓励你放弃Birt并试试Pentaho。我浪费了两个星期的时间用Birt和Eclipse来实现一切,而有一天我可以用Pentaho报告概述我的方式。而且不仅仅是报告设计师。

Hope this saves you some valuable time.

希望这能为您节省宝贵的时间。