使用maven2进行构建自动化和eclipse rcp项目的持续集成?

时间:2023-01-21 11:40:34

My company starts a new project next week. We have planned to develop the application with eclipse rcp. The build process should be fully automated, so we're prepared to set up a continuous integration environment (e.g. Continuum). For the build-automation-part I intended to use maven2, because I want use its dependency management.

我的公司下周开始一个新项目。我们计划用eclipse rcp开发应用程序。构建过程应该是完全自动化的,因此我们准备建立一个持续的集成环境(例如Continuum)。对于构建自动化部分,我打算使用maven2,因为我想使用它的依赖管理。

I have used maven2 for a small old-style java project, but have never set up maven for using it with eclipse rcp.

我已经将maven2用于一个小型的旧式Java项目,但是从来没有设置maven与eclipse rcp一起使用它。

What's the best way to do this? Basic concepts? Common traps? Are any tutorials or book's around there? The tutorials and informations I found, seemed outdated or incomplete.

最好的方法是什么?基本概念?常见的陷阱?是否有任何教程或书籍?我发现的教程和信息似乎过时或不完整。

PS: The main project will be divided into sub-project's (plug-in's). But I think this is typical for eclipse rcp projects.

PS:主要项目将分为子项目(插件)。但我认为这是eclipse rcp项目的典型特征。

4 个解决方案

#2


2  

Like most Maven questions, this is solved by a link to a plug-in:

像大多数Maven问题一样,这可以通过插件的链接来解决:

"pde-maven-plugin"

Other advice:

  1. use the assembly plug-in to build the update site
  2. 使用程序集插件来构建更新站点

  3. consider using hudson rather than Continuum
  4. 考虑使用哈德森而不是Continuum

#3


2  

I've been battling maven2/Eclipse RCP integration for some time. The key is not so much getting your setup right: You can get it to work - eventually - by reverse-engineering Eclipse's build process in maven.

我一直在与maven2 / Eclipse RCP集成作斗争一段时间。关键不在于让您的设置正确:最终可以通过在maven中对Eclipse的构建过程进行逆向工程来实现它。

In my experience, the hard part is keeping everything up to date. Every time Eclipse revs their libs, you'll find yourself re-writing a bunch of pom files for that newest RCP widget or SWT lib. Naturally, CI helps with this somewhat. The problem is that Eclipse and maven are very particular about the way they do the business of building, and their approaches are quite different. To make matters worse, PDE dev (and Eclipse dev, more generally) is powered by a lot of wizard code, which is sometimes quite opaque as to what's happening behind the scenes.

根据我的经验,困难的部分是保持一切最新。每次Eclipse修改他们的libs时,你会发现自己正在为最新的RCP小部件或SWT lib重写一堆pom文件。 CI当然有点帮助。问题是Eclipse和maven对于他们开展构建业务的方式非常讲究,他们的方法完全不同。更糟糕的是,PDE开发(以及更普遍的Eclipse开发)由许多向导代码提供支持,对于幕后发生的事情,这些代码有时非常不透明。

The question you really need to ask yourself is if it's worth the effort. In my particular case, I believe it has been. (CI is too good to live without.) But the trade-off is that you may find yourself being the "build guy", which can take valuable time away from actual development, which is probably what you enjoy most.

你真正需要问自己的问题是,是否值得努力。在我的特殊情况下,我相信它已经存在。 (CI太好了,不能没有。)但权衡的是,你可能会发现自己是“建立人”,这可能会花费宝贵的时间远离实际开发,这可能是你最喜欢的。

#4


0  

I've got recently the same problem : build eclipse RCP application through continuous integration.

我最近遇到了同样的问题:通过持续集成构建eclipse RCP应用程序。

I haven't applied them yet but I've found some interesting articles :

我还没有应用它们,但我发现了一些有趣的文章:

  1. Here's the documentation for Tycho
  2. 这是Tycho的文档

  3. Building Eclipse Plugins with Maven 2 on eclipse.org
  4. 在eclipse.org上使用Maven 2构建Eclipse插件

  5. Build Eclipse RCP products using Maven 2 - how hard can it be? from Immo Hüneke's blog
  6. 使用Maven 2构建Eclipse RCP产品 - 它有多难?来自ImmoHüneke的博客

  7. Here's an article about PDE build automation
  8. 这是一篇关于PDE构建自动化的文章

  9. Here's a shell script to automate JUnit test launch
  10. 这是一个自动执行JUnit测试的shell脚本

#1


#2


2  

Like most Maven questions, this is solved by a link to a plug-in:

像大多数Maven问题一样,这可以通过插件的链接来解决:

"pde-maven-plugin"

Other advice:

  1. use the assembly plug-in to build the update site
  2. 使用程序集插件来构建更新站点

  3. consider using hudson rather than Continuum
  4. 考虑使用哈德森而不是Continuum

#3


2  

I've been battling maven2/Eclipse RCP integration for some time. The key is not so much getting your setup right: You can get it to work - eventually - by reverse-engineering Eclipse's build process in maven.

我一直在与maven2 / Eclipse RCP集成作斗争一段时间。关键不在于让您的设置正确:最终可以通过在maven中对Eclipse的构建过程进行逆向工程来实现它。

In my experience, the hard part is keeping everything up to date. Every time Eclipse revs their libs, you'll find yourself re-writing a bunch of pom files for that newest RCP widget or SWT lib. Naturally, CI helps with this somewhat. The problem is that Eclipse and maven are very particular about the way they do the business of building, and their approaches are quite different. To make matters worse, PDE dev (and Eclipse dev, more generally) is powered by a lot of wizard code, which is sometimes quite opaque as to what's happening behind the scenes.

根据我的经验,困难的部分是保持一切最新。每次Eclipse修改他们的libs时,你会发现自己正在为最新的RCP小部件或SWT lib重写一堆pom文件。 CI当然有点帮助。问题是Eclipse和maven对于他们开展构建业务的方式非常讲究,他们的方法完全不同。更糟糕的是,PDE开发(以及更普遍的Eclipse开发)由许多向导代码提供支持,对于幕后发生的事情,这些代码有时非常不透明。

The question you really need to ask yourself is if it's worth the effort. In my particular case, I believe it has been. (CI is too good to live without.) But the trade-off is that you may find yourself being the "build guy", which can take valuable time away from actual development, which is probably what you enjoy most.

你真正需要问自己的问题是,是否值得努力。在我的特殊情况下,我相信它已经存在。 (CI太好了,不能没有。)但权衡的是,你可能会发现自己是“建立人”,这可能会花费宝贵的时间远离实际开发,这可能是你最喜欢的。

#4


0  

I've got recently the same problem : build eclipse RCP application through continuous integration.

我最近遇到了同样的问题:通过持续集成构建eclipse RCP应用程序。

I haven't applied them yet but I've found some interesting articles :

我还没有应用它们,但我发现了一些有趣的文章:

  1. Here's the documentation for Tycho
  2. 这是Tycho的文档

  3. Building Eclipse Plugins with Maven 2 on eclipse.org
  4. 在eclipse.org上使用Maven 2构建Eclipse插件

  5. Build Eclipse RCP products using Maven 2 - how hard can it be? from Immo Hüneke's blog
  6. 使用Maven 2构建Eclipse RCP产品 - 它有多难?来自ImmoHüneke的博客

  7. Here's an article about PDE build automation
  8. 这是一篇关于PDE构建自动化的文章

  9. Here's a shell script to automate JUnit test launch
  10. 这是一个自动执行JUnit测试的shell脚本