Chinaunix首页 | 论坛 | 博客
  • 博客访问: 82663
  • 博文数量: 23
  • 博客积分: 1400
  • 博客等级: 上尉
  • 技术积分: 290
  • 用 户 组: 普通用户
  • 注册时间: 2009-06-22 11:13
文章分类
文章存档

2011年(1)

2009年(22)

我的朋友

分类: Java

2009-06-24 16:39:37

1. 简介

2.下载

3.安装
首先需要 ,,,, 和。

下载 和 复制到 ant 目录里(例如: C:\apache-ant-1.7.1\lib)。
方便起见,不用eclipse内置的ant,把eclipse里的配置映射到单独的ant里.步骤为:
eclipse - preferences - ant - ant runtime - ant home entry - 点右边的ant home 选择你的ant 安装路径(例如:C:\apache-ant-1.7.1 )即可。

OB的官方网站教程里有一些小规则的设置,为了简单起见,暂时忽略这些设置(仅是本地研究,不需要提交代码,规则暂时忽略)。直接下载源代码开始。

运行eclipse, File -  import - SVN - 从svn检出项目 - 创建新的资源库 (URL 用 https://dev.openbravo.com/svn/openbravo/  ) - next - 选择trunk 下载 - Finish.等待下载。

下载完成后是一个 openbravo 项目,刷新一下项目,有错误提示,暂时忽略。
openbravo\config 里有两个模版文件(Openbravo.properties.template  log4j.lcf.template) ,改名为 Openbravo.properties 和 log4j.lcf。

编辑Openbravo.properties ,将其中的 bbdd.systemPassword的值设置为您postgres用户的密码(例如: bbdd.systemPassword=dddddd)。deploy.mode=class 改为 deploy.mode=war. 修改完保存。

openbravo 其实包含了几个项目的源代码,下面按顺序导入workspace。

file - import - general - existing project into workspace - 选择openbravo 下的 src-core finish,导入的项目名字为OpenbravoCore .
然后同样办法依次把src-wad src-trl 导入。

然后在 eclipse - preferences - server - runtime envrionment 里添加tomcat(例如:C:\apache-tomcat-6.0.20 )。
这个时候项目还有些奇怪的错误,也先忽略吧。

ok了,可以准备编译了。
运行 external tool - external tools configuration 选择 eclipse.install.source - run.

eclipse 控制台有如下输出:
Buildfile: D:\workspace_ob\openbravo\build.xml
eclipse.install.source:
init:
set.code.rev:
code.rev:
install.source:
init:
database.lib:
init:
compile:
build.jar:
jar:
init:
set.code.rev:
code.rev:
core.lib:
init:
compile:
build.jar:
         [jar] Building jar: D:\workspace_ob\openbravo\src-core\lib\openbravo-core.jar
build:
copy.core.lib:
        [copy] Copying 1 file to D:\workspace_ob\openbravo\lib\runtime
create.database:
init:
database.lib:
init:
compile:
build.jar:
jar:
init:
core.lib:
init:
compile:
build.jar:
build:
copy.core.lib:
create.database:
clean.database.POSTGRE:
         [sql] Executing commands
         [sql] 1 of 1 SQL statements executed successfully
         [sql] Executing commands
         [sql] 1 of 1 SQL statements executed successfully
prepare.database:
POSTGRE.structure:
         [sql] Executing commands
         [sql] 2 of 2 SQL statements executed successfully
         [sql] Executing commands
         [sql] 1 of 1 SQL statements executed successfully
create.database.structure:
Database connection: jdbc:postgresql://localhost:5432/openbravo. User: tad
Executing default prescript
......

如果看到 BUILD SUCCESSFUL 。 就是ok了。

查看tomcat/webapps 下是不是已经新建了以个openbravo项目。

eclipse 的openbravo里有个.classpath.template,改成.classpath.

5.测试
启动tomcat
浏览器访问:
Username: Openbravo
passwd:   openbravo
(区分大小写)。
阅读(1170) | 评论(2) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2009-08-03 10:16:16

楼主能贴图出来吗?谢谢了

chinaunix网友2009-08-03 09:40:22

谢谢楼主,学习中,正在按照你的方法做,完了后再发帖公布结果了。