`
qiuqiao2000
  • 浏览: 29837 次
  • 性别: 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源控制中的代码与资源具体实例——一个样例插件的构建结束语下载参考资料...

    用ANT来编译打包Eclipse插件

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

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

    Eclipse 提供了在Eclipse IDE外自动构建能力,Eclipse本身也是采用这种方式构建的。这里分享了Eclipse自动构建些经验,详细介绍Eclipse插件开发自动编译过程

    Eclipse插件自动构建介绍

    本文将分享Eclipse自动构建的一些经验,详细介绍Eclipse插件开发的自动编译过程。分类:开发技术->Eclipse标签:编码集成编译插件作者:晏斐创建于2007-5-2112:00:00环境要求:本文是基于Eclipse3.0环境进行描述的...

    Eclipse插件

    eclipse是一款功能强大的编程开发工具,其完善的关键字高亮、代码缺省提示、自动构建常用模块等强大的功能受到不少程序员的喜爱。eclipse不但功能强大,还为不同开发人员提供了非常好的扩展功能。不同的开发人员可...

    mybatis-eclipse插件及生成代码说明

    包含mybatis-eclipse插件、插件的安装说明以及通过一个简单的实例描述如何在eclipse中使用mybatis-eclipse插件自动生成Mybatis相关的model、dao、Mapping等文件。 详见:...

    让开发自动化:用Eclipse插件提高代码质量

    很有趣的是,Eclipse插件中就有这样的工具,比如JDepend和CheckStyle,它们能帮您在软件问题暴露前发现这些问题。本文将带来一些关于Eclipse插件的例子,您可以安装、配置和使用这些静态分析插件,以便在开发生命...

    使用EMF开发基于模型的Eclipse插件

    Eclipse Modeling Framework (EMF)是Eclipse 的一个基于Java语言的模型构建框架,它通过提供通用 的模型框架和自动代码生成工具,极大地简化了基于结 构化模型的Eclipse插件或者应用程序的开发

    用Eclipse插件提高代码质量

    火龙果软件工程技术中心 本文内容包括:安装Eclipse插件用CheckStyle校正标准用Coverlipse确认覆盖率用CPD捕捉代码重复使用JDepend进行依赖项检查用Metrics测量复杂度合适的才是最好的如果能在构建代码前发现代码中...

    Eclipse插件开发-测试用例自动生成工具.zip

    支持项目创建、组织、构建自动化以及依赖管理,确保不同模块和组件之间的协调一致。 编译与构建: 包括编译器、构建工具(如Make、Gradle、Maven)等,用于将源代码转换为可执行文件或库,并进行资源打包、优化...

    让开发自动化:用Eclipse插件提高代码质量

    让开发自动化的本期文章中,自动化专家PaulDuvall将带来一些关于Eclipse插件的例子,您可以安装、配置和使用这些静态分析插件,以便在开发生命周期的早期预防问题。开发软件时,我的主要目标之一是:要么防止将缺陷...

    ecle:用于嵌入项目开发的 Eclipse 插件

    ECLE:Eclipse 嵌入工具用于嵌入式事物的 Eclipse 插件现在是草案版本,目前致力于 Sming 和其他 ESP8266 东西的构建流程自动化。串口终端嵌入插件工具之一基本功能完成。 端口列表会在端口组合单击时自动更新,连接...

    sbuild-eclipse-plugin:Eclipse 插件,它集成了对构建系统 SBuild 的支持

    SBuild Eclipse 插件安装构建 SBuild Eclipse 插件要构建,您需要安装最近的 SBuild。 git clone ...

    SConsolidator:用于构建系统SCons的Eclipse插件(scons.org)

    SConsolidator-用于SCons的Eclipse插件 从我们的Eclipse更新站点 介绍 SCons是一个开源软件构建工具,它试图修复Make克隆的众多弱点,例如缺少自动依赖项提取,描述构建属性的复杂语法以及使用Shell脚本时的跨平台...

    Eclipse安装包!

    Eclipse具有强大的代码编辑功能,包括代码自动补全、语法高亮、代码折叠等。 Eclipse支持多种版本控制系统,包括Git、SVN等。 Eclipse具有强大的调试功能,可以方便地进行代码调试和错误排查。 Eclipse支持多种构建...

    cheetah:用于JIT污染分析的Eclipse插件

    项目是自动构建的(“项目”>“自动构建”)和(“窗口”>“首选项”>“ Android”>“构建”>取消选中“跳过打包和解密...”)。 配置Android项目以添加分层构建器(“配置”>“添加分层构建器”) 打开“概述”...

Global site tag (gtag.js) - Google Analytics