简体   繁体   English

如何在Eclipse中自动导出项目?

[英]How to automatically export project in eclipse?

I have a couple of projects in eclipse which I now manually export as plugins from eclipse with the following steps: 我在eclipse中有几个项目,现在可以通过以下步骤从eclipse中手动将其导出为插件:

1) Right click on example_project_plugin_1 in the Project Explorer View 1)在Project Explorer View右键单击example_project_plugin_1
2) Select Export 2)选择Export
3) Select Plugin Development > Deployable plug-ins and fragments 3)选择“ Plugin Development >“ Deployable plug-ins and fragments

Then in the folder eclipse > plugins folder, I can see the archive/jar file of these plugins. 然后在eclipse > plugins文件夹文件夹中,我可以看到这些插件的归档文件/ jar文件。

However I want to automate this system. 但是我想使这个系统自动化。

These plugins are required by another project (say project_to_test ) which I'm trying to run and test and I am using Maven to automatically build test cases written using RCPTT running on a jenkins server. 这些插件是由另一个项目(比如需要project_to_test ),我正在尝试运行和测试,我使用Maven自动建立使用写测试用例RCPTT一个上运行jenkins服务器。

So basically what I want is, without having to manually export as plugins from eclipse, it should be automatically exported as plugins when I call project_to_test from the jenkins server. 因此,基本上我想要的是,不必从eclipse手动导出为插件,当我从jenkins服务器调用project_to_test时,它应该自动导出为插件。

I found Tycho but it seems very complicated. 我找到了第谷,但看起来很复杂。 (Maybe there's an easier way or tutorial somewhere of how to use Tycho for my particular use?) I tried Ant too but it's also manual work. (也许有更简单的方法或教程,介绍如何将Tycho用于我的特定用途?)我也尝试过Ant但这也是手动工作。 Is there any easier way to do this? 有没有更简单的方法可以做到这一点? I am quite new to this so I need some direction. 我对此很陌生,所以我需要一些指导。

Thanks in advance! 提前致谢!

Tycho is probably the best way to do it, as you are already using Maven you should be well on your way. 第谷可能是最好的方式,因为您已经在使用Maven了,所以您应该做得很好。 Tycho is simply an extension of Maven (plug-ins, but I am afraid to say plug-ins too many times with different meanings :-). Tycho只是Maven(插件的扩展),但我恐怕会说太多次具有不同含义的插件了:-)。

There is an excellent Tycho tutorial out there: http://codeandme.blogspot.co.at/p/tycho-articles.html so that is the place to start. 这里有一个很棒的Tycho教程: http : //codeandme.blogspot.co.at/p/tycho-articles.html,所以这是一个起点。

However, if you really really don't want to do that, then you probably want to use PDE Build . 但是,如果您真的不想这样做,则可能要使用PDE Build That is the traditional build system of Eclipse, but it has its weaknesses. 那是Eclipse的传统构建系统,但是它有缺点。 You should know that Eclipse does not even use PDE Build to build itself anymore, it uses Tycho. 您应该知道Eclipse甚至不再使用PDE Build进行自身构建,而是使用Tycho。

To use PDE Build from a command line you need to use Ant. 要从命令行使用PDE Build,您需要使用Ant。 The manual work that you refer to is (mostly) automated through a PDE feature that creates that Ant files for you. 您所指的手动工作(大多数)是通过PDE功能自动执行的,该功能可以为您创建该Ant文件。 Right-click on a project, select Plug-in Tools -> Create Ant Build File 右键单击一个项目,选择“ Plug-in Tools ->“ Create Ant Build File

Once again, I feel compelled to encourage you to take the plunge into Tycho now, rather than invest more time in the PDE Build way. 再次,我不得不鼓励您立即进入Tycho,而不是在PDE Build方式上投入更多时间。 You are clearly ahead of the curve in other areas (you are doing GUI testing!) so now is the time for automating your builds too. 您显然在其他领域处于领先地位(正在进行GUI测试!),因此现在也该使构建自动化。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM