Chinaunix首页 | 论坛 | 博客
  • 博客访问: 520324
  • 博文数量: 60
  • 博客积分: 1445
  • 博客等级: 上尉
  • 技术积分: 507
  • 用 户 组: 普通用户
  • 注册时间: 2010-01-14 19:15
文章分类

全部博文(60)

文章存档

2012年(1)

2011年(7)

2010年(52)

我的朋友

分类:

2010-12-26 14:50:24

3.4.2    构建手册 

手册的构建现在被集成到了Maven构建过程中,并且通过使用配置文件(-Ddocumentation)开关或改变到主目录中进行构建。 

Drools对这个手册使用DocbookMaven被用来构建文档,并且这个构建产生三种不同的格式,全部共享相同的图标目录。 

l         html_single ——整个手册使用一个单独的html文档。

l         html  ——手册被分成多个文档,并放在一个框架中。左边框提供导航。

l         Eclipse  ——文档适合被包含在一个Eclipse的插件中。 

drools-docs目录中,可以通过调用 mvn package,根据项目的 pom.xml文件生成手册,或者在你构建源代码时,增加-Ddocumentation开关。生成的手册在每个 drools-docs子目录的target/ 目录中。在Drools项目的根目录运行mvn -Ddocumentation package assembly:assembly 生成并复制文档到一个zip文件,该zip文件位于根文件夹的 target/目录。 

[trikkola@trikkola trunk]$ mvn -Ddocumentation clean package assembly:assembly
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO]   Drools
[INFO]   Drools :: API
[INFO]   Drools :: Core
[INFO]   Drools :: Compiler
[INFO]   Drools :: Templates
[INFO]   Drools :: Decision Tables
[INFO]   Drools :: JSR-94 API Module
[INFO]   Drools :: Pipeline :: Transformer :: Smooks
[INFO]   Drools :: Pipeline :: Transformer :: JAXB
[INFO]   Drools :: Pipeline :: Transformer :: XStream
[INFO]   Drools :: Pipeline :: Transformer :: JXLS
[INFO]   Drools :: Pipeline :: Messenger :: JMS
[INFO]   Drools :: Pipeline
[INFO]   Drools :: Process :: WorkItems
[INFO]   Drools :: Process :: Task
[INFO]   Drools :: Process :: BAM
[INFO]   Drools :: Process
[INFO]   Drools :: Persistence :: JPA
[INFO]   Drools :: Server
[INFO]   Drools :: Verifier
[INFO]   Drools :: Ant Task
[INFO]   Drools :: Repository
[INFO]   Drools :: Guvnor
[INFO]   Drools :: Microcontainer
[INFO]   Drools :: Clips
[INFO]   Drools :: Planner parent
[INFO]   Drools :: Planner core
[INFO]   Drools :: Planner examples
[INFO] Searching repository for plugin with prefix: 'assembly'.
WAGON_VERSION: 1.0-beta-2
[INFO] ------------------------------------------------------------------------
[INFO] Building Drools
[INFO]    task-segment: [clean, package]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] [site:attach-descriptor]
[INFO] Preparing source:jar
[WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation.
[INFO] No goals needed for project - skipping
[INFO] [source:jar {execution: default}]
[INFO] Preparing source:test-jar
[WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation.
[WARNING] Removing: test-jar from forked lifecycle, to prevent recursive invocation.
[INFO] No goals needed for project - skipping
[INFO] [source:test-jar {execution: default}]
[INFO] ------------------------------------------------------------------------
[INFO] Building Drools :: API
[INFO]    task-segment: [clean, package]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory /home/trikkola/jboss-drools/trunk/drools-api/target
 
...snip ...
 
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] ------------------------------------------------------------------------
[INFO] Drools ................................................ SUCCESS [59.889s]
[INFO] Drools :: API ......................................... SUCCESS [4.832s]
[INFO] Drools :: Core ........................................ SUCCESS [11.027s]
[INFO] Drools :: Compiler .................................... SUCCESS [10.400s]
[INFO] Drools :: Templates ................................... SUCCESS [1.018s]
[INFO] Drools :: Decision Tables ............................. SUCCESS [1.179s]
[INFO] Drools :: JSR-94 API Module ........................... SUCCESS [1.001s]
[INFO] Drools :: Pipeline :: Transformer :: Smooks ........... SUCCESS [0.651s]
[INFO] Drools :: Pipeline :: Transformer :: JAXB ............. SUCCESS [0.711s]
[INFO] Drools :: Pipeline :: Transformer :: XStream .......... SUCCESS [0.465s]
[INFO] Drools :: Pipeline :: Transformer :: JXLS ............. SUCCESS [0.481s]
[INFO] Drools :: Pipeline :: Messenger :: JMS ................ SUCCESS [0.879s]
[INFO] Drools :: Pipeline .................................... SUCCESS [0.006s]
[INFO] Drools :: Process :: WorkItems ........................ SUCCESS [1.526s]
[INFO] Drools :: Process :: Task ............................. SUCCESS [3.104s]
[INFO] Drools :: Process :: BAM .............................. SUCCESS [0.580s]
[INFO] Drools :: Process ..................................... SUCCESS [0.005s]
[INFO] Drools :: Persistence :: JPA .......................... SUCCESS [0.958s]
[INFO] Drools :: Server ...................................... SUCCESS [2.216s]
[INFO] Drools :: Verifier .................................... SUCCESS [1.836s]
[INFO] Drools :: Ant Task .................................... SUCCESS [0.722s]
[INFO] Drools :: Repository .................................. SUCCESS [3.925s]
[INFO] Drools :: Guvnor ...................................... SUCCESS [19.850s]
[INFO] Drools :: Microcontainer .............................. SUCCESS [0.676s]
[INFO] Drools :: Clips ....................................... SUCCESS [1.464s]
[INFO] Drools :: Planner parent .............................. SUCCESS [0.527s]
[INFO] Drools :: Planner core ................................ SUCCESS [2.209s]
[INFO] Drools :: Planner examples ............................ SUCCESS [4.689s]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 minutes 24 seconds
[INFO] Finished at: Tue Apr 07 15:11:14 EEST 2009
[INFO] Final Memory: 48M/178M
[INFO] ------------------------------------------------------------------------>

 生成的的手册可以在target/drools-docs-$VERSION.jar文件中找到,一个具有所有格式的压缩存档。 

3.5      Eclipse 

3.5.1    导入Eclipse项目 

随着生成的Eclipse项目文件,现在可以导入到Eclipse中。当启动Eclipse时,在subversion的检查输出根目录中打开工作空间。 

 

 

 

 

在调用mvn install时,所有项目的依赖项被下载,并且被增加到本地Maven 库中。Eclipse不能找到这些依赖项,除非你告诉它库在什么地方。要做到这点,设置一个M2_REPO类路径变量。

 

阅读(2163) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~