`
qiuqiao2000
  • 浏览: 30734 次
  • 性别: Icon_minigender_2
  • 来自: 北京
社区版块
存档分类
最新评论

Eclipse插件项目的自动构建

阅读更多

构建( build 在软件工程中是指将源文件及资源编译、打包成可在计算机上运行的软件。

自动化构建在软件行业已有非常悠久的历史,我们平时用的 Make 脚本, Ant 脚本都是常见的自动化构建的应用。

Eclipse 插件系统的核心模块 PDE提供了完整的面向 Ant 的自动构建体系,来编译和打包 Eclipse 插件与 RCP 项目以用于发布。

 

PDE (Plug-in Development Environment) headless-build 是一种基于 Ant 脚本的构建方式,它主要适用于 Eclipse plug-in Eclipse RCP 项目的导出。

 

Generating Ant scripts from the command line

Plug-in Development Environment Guide > Tasks > PDE Build

  • eclipse.fetch: generates an Ant script that fetches content from a CVS repository. The eclipse fetch is driven by a file whose format is described below (see Directory file format).

elements:

the entry that will be fetched. The format expected is of the form type@id[,version] as specified in the directory file format;

buildDirectory:

the directory into which fetch scripts will be generated and into which features and plug-in projects will be checked out;

directory:

the path to a directory file;

children:

optional, specifies whether the script generation for contained plug-ins and fragments should be invoked. Default is set to true;

cvspassfile:

optional, the name of a CVS password file;

fetchTag:

optional, overrides the tag provided in directory file by the given value;

configInfo:

optional, an ampersand separated list of configuration indicating the targeted configuration. The default is set to be platform independent;

recursiveGeneration:  

optional, specify whether or not fetch scripts should be generated for nested features. The default is set to true.

 

  • eclipse.buildScript: generates a build.xml file for the given elements as well as additional scripts used by the pde build infrastructure.

elements :

the entry to be built. Entry is expected to be of the form type@id[,version] as specified in the directory file format;

buildDirectory :

the directory where the features and plug-ins to build are located. Plug-ins and features must respectively be located in plugins and features folders;

children :

optional, specifies whether the script generation for contained plug-ins and fragments should be invoked. Default is set to true;

recursiveGeneration :

optional, specified whether the script generation for contained features should be invoked. Default is set to true;

devEntries :

optional, a comma separated list of directories to be given to the compile classpath;

buildingOSGi :

optional, indicates if the target is 3.x. or 2.1.  Default is true;

baseLocation :

optional, indicates a folder which containing a target eclipse install with features/ and plugins/ subdirectories;

configInfo :

optional, an ampersand separated list of configuration indicates the targeted configuration. The default is set to be platform independent;

pluginPath :

optional, a platform file separator separated list of locations from which to find additional plug-ins;

archivesFormat :

optional, an ampersand separated list of configs and the expected output format for each of those. The format is separated by a dash (-) from the configuration. The values supported are: folder, tar, zip, antZip, respectively meaning don't archive, use tar to create the archive, use the version of info zip available on the platform, use ant zip . The default value is antZip;

product :

optional, '/' separated path to the location of an RCP product being built. The first segment of the path must refer to the plug-in id of a plug-in containing the .product file;

signJars :

optional, indicates if the scripts generated must sign jars for features and plug-ins. The default value is false. The parameters to the sign task are controlled by the following ant properties: sign.alias, sign.keystore and sign.storepass respectively being passed to the alias, keystore and storepass parameters from the ant signJar task. The default value is false;

generateJnlp :

optional, indicates if a jnlp file should be generated for all the features being built;

outputUpdateJars :

optional, generates plug-ins and features in the update site format when set. The default value is false. Note that the site.xml is not generated nor updated;

groupConfiguration :

optional, whether or not to group all configurations being built into a single archive;

generateVersionsLists :

optional, whether or not to generate properties files listing the versions of features and plug-ins that were built;

filteredDependencyCheck :

optional, constraint the set of plug-ins and features to be considered during the build to those reachable from the features;

filterP2Base :

optional, constraint the set of plug-ins and features to be considered from the baseLocation to those considered to be installed by p2;

generateFeatureVersionSuffix: 

optional, whether or not to generate the feature version suffix. See also Version Qualifiers;

generatedVersionLength :

optional, the length of the generated feature version suffix. By default it is set to 28. See also Version Qualifiers;

significantVersionDigits :

optional, the number of significant digits used when generating feature version suffixes. See also Version Qualifiers;

forceContextQualifier :

optional, uses the given value to replace the .qualifier being by plug-ins and features. See also Version Qualifiers;

  • eclipse.generateFeature: generates a feature that will contain the provided elements.  This task is used to build an RCP application from a product configuration file.

featureId :

The id to give to the generated Feature.

buildDirectory:   

the directory where the features and plug-ins (in /features and /plugins subdirectories) to include are located.  The generated feature will be placed in the /features subdirectory.

baseLocation :

optional, indicates a folder which contains installed features and plug-ins

productFile :

optional, a product file on which to base the generated feature.

verify :

Whether or not to use the resolver to verify that the provided plug-ins and features are available.  This also determines whether or not the the feature will be able to correctly handle platform specific fragments and plug-ins that will be JARed.  If all the elements to be included in the feature are available locally, then verify should be set to True.  If the elements need to be fetched from a repository, set verify to False, use the resulting feature to fetch the required plug-ins and features, then regenerate the container feature using verify = True.

pluginPath :

optional, a platform file separator separated list of locations from which to find additional plug-ins

configInfo :

optional, an ampersand separated list of configuration indicates the targeted configuration. The default is set to be platform independent;

pluginList :

optional, a comma separated list of plug-in ids to include in the generated feature. (Supports attributes, see below)

featureList :

optional, a comma separated list of feature ids to include in the generated feature. (Supports attributes, see below)

fragmentList :

optional, a comma separated list of fragment ids to include in the generated feature. (Supports attributes, see below)

buildPropertiesFile :

optional, the location of a properties file whose contents should be used as the generated feature's build.properties.

includeLaunchers :

optional, whether or not to include the equinox launchers, default value is "true".

 

 

 

参考资料:

 

Eclipse 插件自动构建介绍

http://www.uml.org.cn/j2ee/200803101.asp

 

Eclipse 插件项目的自动化集成与构建

https://www.ibm.com/developerworks/cn/opensource/os-cn-eclplginauto/

 

Build and Test Automation for plug-ins and features

http://www.eclipse.org/articles/Article-PDE-Automation/automation.html

 

Pluginbuilder Manual - Build automation for Eclipse plug-ins

http://www.pluginbuilder.org/documentation/manual/

分享到:
评论

相关推荐

    Eclipse插件项目的自动化集成与构建

    火龙果软件工程技术中心 本文内容包括:自动构建简介使用Eclipse工作平台导出Eclipse插件项目PDEheadless-build基础使用ant自动获取cvs源控制中的代码与资源具体实例——一个样例插件的构建结束语下载参考资料...

    Eclipse插件开发学习笔记全篇+源码.rar

    1. 采用Tycho进行构建:Tycho是一个基于Maven的插件构建系统,用于构建无Java应用程序的Eclipse插件。 2. 集成外部工具和框架:如集成Spring框架、Junit测试库等。 3. 网络和云服务:利用Eclipse插件实现与远程...

    eclipse插件:有关Eclipse 3.0中的插件自动构

    ### Eclipse 插件自动构建详解 #### 一、引言 Eclipse 是一款非常流行的开源集成开发环境(IDE),广泛应用于 Java 开发领域。随着项目的复杂性不断增加,Eclipse 提供了强大的插件机制,使得开发者能够根据需求...

    eclipse插件开发PDF

    1. 环境搭建:需要安装Eclipse IDE,以及Eclipse插件开发环境(PDE)插件,这为创建插件项目提供了支持。 2. 创建插件项目:在Eclipse中创建一个新的插件项目,通常会自动创建项目结构,并提供一个插件清单(plugin...

    eclipse插件开发步步教你

    Eclipse插件开发是构建自定义工具、扩展编辑器、视图、透视图等核心功能的重要方式。本教程旨在逐步指导初学者进行Eclipse插件的开发,通过实例演示如何利用Eclipse平台的API和扩展点来实现各种功能。 首先,我们要...

    UAP-STUDIO 集成开发环境eclipse插件

    当这两者结合,通过UAP-STUDIO的Eclipse插件,开发者可以在Eclipse环境中无缝地进行UAP相关项目的开发工作。 **一、UAP-STUDIO集成开发环境** UAP-STUDIO的核心优势在于其对业务流程、数据模型、用户界面等多方面...

    m2eclipse插件_使用maven必备

    m2eclipse插件是Eclipse官方支持的Maven插件,它允许用户在Eclipse环境中直接进行Maven项目的构建、管理和调试,无需离开熟悉的IDE界面。这个插件极大地提高了开发效率,减少了手动配置的工作量,使得开发者能够更...

    Eclipse中Maven插件

    Eclipse插件提供了方便的插件管理界面,使得开发者能更便捷地操作这些插件。 9. **问题检测与修复**:M2E会定期检查POM文件中的问题,如未解析的依赖、无效的配置等,并提供解决方案建议。这有助于保持项目的健康...

    maven2.0+eclipse插件

    通过上述介绍,我们可以看到Maven 2.0和Eclipse插件的结合,为Java开发带来了极大的便利。无论是项目初始化、依赖管理还是构建部署,都有了更为高效和标准化的解决方案。对于开发者而言,这无疑提升了工作效率,降低...

    eclipse 常用插件

    - **简介**:Eclipse SWT Designer Plugin 是一款用于构建基于 J2SE 的桌面应用程序 GUI 的 Eclipse 插件。它支持 SWT/JFace 和 Eclipse RCP 项目,使开发者能够更高效地创建复杂的用户界面。 - **官方网站**:...

    NC_eclipse开发插件

    "NC_eclipse开发插件"是专为Eclipse设计的一款插件,旨在提升Eclipse对NC(可能是NetBeans或某种特定的软件开发框架)开发的支持,让开发者能更高效地进行项目构建和管理。 【描述】:Eclipse开发工具支持NC开发,...

    eclipse插件

    开发者可以通过Eclipse插件访问项目源码,进行版本控制操作,同时利用各种工具进行性能分析、代码质量检查等任务。 总结来说,Eclipse插件是Eclipse强大功能的关键组成部分,它们极大地扩展了IDE的能力,涵盖了从...

    eclipse hadoop2 插件

    Eclipse Hadoop2 插件是为开发人员提供的一种强大工具,它允许用户在Eclipse集成开发环境中(IDE)直接编写、调试和管理Hadoop项目。这个插件针对Hadoop 2.x版本进行了优化,提供了丰富的功能来简化Hadoop应用程序的...

    开发 Eclipse 插件 快速入门

    Eclipse 插件是构建可扩展集成开发环境(IDE)的关键,允许开发者构建与 Eclipse 和其他工具无缝集成的工具。本文由 David Gallardo 撰写,指导读者如何使用 Plug-in Development Environment (PDE) 创建、运行、...

    自定义eclipse插件

    1. **插件项目结构**:Eclipse插件开发基于OSGi框架,通常包含`.plugin.xml`配置文件、源代码、资源文件等。`.plugin.xml`定义了插件的基本信息和提供的服务。 2. **插件开发工具**:Eclipse本身提供了插件开发环境...

    用ANT来编译打包Eclipse插件

    当应用hudson一类的自动化平台来构建Eclipse插件时,不能直接调用ANT工具来编译。本工具自动修改Eclipse的路径为 ${ECLIPSE_HOME},并且自动可查找相应插件。 使用方法: java -jar buildfileGenerator.jar build....

    NC的Eclipse开发插件

    4. **插件集成**:将NC的Eclipse开发插件集成到Eclipse中,通常需要按照一定的步骤进行配置,包括安装插件、导入项目、设置开发环境等。这样,开发者就可以在熟悉的Eclipse环境中进行NC相关的编码工作。 5. **开发...

    Eclipse项目自动打jar包

    本文将详细介绍如何在Eclipse中通过插件实现项目的自动打包,特别是指定主类(Main函数)的自动打包功能。 首先,Eclipse本身并不直接支持一键式自动打包,但我们可以借助外部插件来实现这一需求。其中一个常用的...

    eclipse插件开发实战

    通过上述内容的深入分析,我们可以看出 Eclipse 插件开发不仅涉及内核结构的理解,还包括 SWK、OSGi 和 RCP 的掌握,以及实际的插件项目构建和发布流程。对于想要深入了解 Eclipse 插件开发的技术人员来说,这些知识...

Global site tag (gtag.js) - Google Analytics