- 導入 openbravo
- 導入 OpenbravoCore , OpenbravoTrl , OpenbravoWAD ,分別在目錄 src-core, src-trl, src-wad
- 導入 OpenbravoDB ,這個是可選的,該項目用來初始化數據庫,在目錄 src-db
# *************************************************************************
# * The contents of this file are subject to the Openbravo Public License
# * Version 1.0 (the "License"), being the Mozilla Public License
# * Version 1.1 with a permitted attribution clause; you may not use this
# * file except in compliance with the License. You may obtain a copy of
# * the License at http://www.openbravo.com/legal/license.html
# * Software distributed under the License is distributed on an "AS IS"
# * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
# * License for the specific language governing rights and limitations
# * under the License.
# * The Original Code is Openbravo ERP.
# * The Initial Developer of the Original Code is Openbravo SL
# * All portions are Copyright (C) 2007 Openbravo SL
# * All Rights Reserved.
# * Contributor(s): ______________________________________.
# ************************************************************************
dateFormat.js=
%d-%m-%Y
dateFormat.sql=
DD-MM-YYYY
dateFormat.java=
dd-MM-yyyy
dateTimeFormat.java=
dd-MM-yyyy
HH
:
mm:ss
bbdd.outputscript=
~/databasescript.sql
bbdd.verbosity=
INFO
application.version=
2.35
developer.id=
1
#DB properties
bbdd.sid=
orcl
bbdd.systemUser=
SYSTEM
bbdd.systemPassword=
SYSTEM
bbdd.user=
obdb
bbdd.password=
obdb
bbdd.driver=
oracle.jdbc.driver.OracleDriver
bbdd.url=
jdbc
:
oracle:thin:obdb/obdb@localhost:1521:orcl
bbdd.rdbms=
ORACLE
bbdd.server=
localhost
bbdd.port=
1521
# build.xml properties
base.app=
AppsOpenbravo
base.source=
E
:
/project/openbravo/AppsOpenbravo
attach.path=
E
:
/openbravo/attachment
web.url=
http
:
//localhost:8770/openbravo/web
context.url=
http
:
//localhost:8770/openbravo
base.temp=
E
:
/temp
bbdd.sessionConfig=
ALTER
SESSION
SET
NLS_LANGUAGE='SPANISH'
NLS_DATE_FORMAT='DD-MM-YYYY'
NLS_NUMERIC_CHARACTERS='.,'
|
Buildfile:
E:/project/openbravo/AppsOpenbravo/build.xml
init
:
create.database
:
init
:
database.lib
:
clean
:
[
delete
] Deleting directory E:/project/openbravo/AppsOpenbravo/src-db/build/classes
[
delete
] Deleting directory E:/project/openbravo/AppsOpenbravo/src-db/build/lib
[
delete
] Deleting directory E:/project/openbravo/AppsOpenbravo/src-db/docs
init
:
[
mkdir
] Created dir: E:/project/openbravo/AppsOpenbravo/src-db/build/classes
[
mkdir
] Created dir: E:/project/openbravo/AppsOpenbravo/src-db/build/lib
[
mkdir
] Created dir: E:/project/openbravo/AppsOpenbravo/src-db/docs
compile
:
[
javac
] Compiling 220 source files to E:/project/openbravo/AppsOpenbravo/src-db/build/classes
[
javac
] Note: Some input files use unchecked or unsafe operations.
[
javac
] Note: Recompile with -Xlint:unchecked for details.
[
copy
] Copying 26 files to E:/project/openbravo/AppsOpenbravo/src-db/build/classes
build.jar
:
[
jar
] Building jar: E:/project/openbravo/AppsOpenbravo/src-db/build/lib/dbmanager.jar
jar
:
[
copy
] Copying 1 file to E:/project/openbravo/AppsOpenbravo/database/lib
create.database
:
clean.database.ORACLE
:
[
sql
] Executing commands
[
sql
] Failed to execute: DROP USER obdb CASCADE
[
sql
]
java.sql.SQLException
: ORA-01918: user 'OBDB' does not exist
[
sql
] 0 of 1 SQL statements executed successfully
prepare.database
:
ORACLE.structure
:
[
sql
] Executing commands
[
sql
] 1 of 1 SQL statements executed successfully
[
sql
] Executing commands
[
sql
] 1 of 1 SQL statements executed successfully
[
sql
] Executing commands
[
sql
] 2 of 2 SQL statements executed successfully
create.database.structure
:
[
createdatabase
] [INFO] CreateDatabase - Executing creation script
[
createdatabase
] [INFO] Oracle8Platform - Executed 4654 SQL command(s) with 0 error(s)
[
createdatabase
] [INFO] CreateDatabase - Executing default postscript
[
createdatabase
] [INFO] Oracle8Platform - Executed 2 SQL command(s) with 0 error(s)
[
createdatabase
] [INFO] CreateDatabase - Executing system model script
[
createdatabase
] [INFO] Oracle8Platform - Executed 1 SQL command(s) with 0 error(s)
import.database.data
:
[
importdata
] [INFO] ImportDataXML - Model loaded from database.
database.postcreate.ORACLE
:
[
sql
] Executing commands
[
sql
] 3 of 3 SQL statements executed successfully
import.database.sampledata
:
[
importdata
] [INFO] ImportDataXML - Model loaded from database.
database.postcreate.ORACLE
:
[
sql
] Executing commands
[
sql
] 3 of 3 SQL statements executed successfully
BUILD SUCCESSFUL
Total time: 23 minutes 31 seconds
|
- 點擊 Run > External Tools > eclipse.trl.lib ,也可以在 dos 下執行這個 ant 任務 .
- 在 Console 窗口,確認有 BUILD SUCCESSFUL 信息 .
- 刷新 OpenbravoTrl.
- 然後點擊 Project > Build Project 菜單編譯項目 .
Buildfile:
E:/project/openbravo/AppsOpenbravo/build.xml
init
:
eclipse.trl.lib
:
init
:
sqlc
:
[
java
] 1016 [main] INFO org.openbravo.data.Sqlc - strFileProperties: E:/project/openbravo/AppsOpenbravo/config/Openbravo.properties
[
java
] 1016 [main] INFO org.openbravo.data.Sqlc - javaDateFormat: dd-MM-yyyy
[
java
] 1016 [main] INFO org.openbravo.data.Sqlc - directory source: ./src
[
java
] 1016 [main] INFO org.openbravo.data.Sqlc - directory destiny: E:/project/openbravo/AppsOpenbravo/src-trl/build/javasqlc
[
java
] 1016 [main] INFO org.openbravo.data.Sqlc - file termination: .xsql
[
java
] 1016 [main] INFO org.openbravo.data.Sqlc - file connection: E:/project/openbravo/AppsOpenbravo/config/Openbravo.properties
[
java
] 1016 [main] INFO org.openbravo.data.Sqlc - Write TXT Files: false
[
java
] 1016 [main] INFO org.openbravo.data.Sqlc - Loading driver: oracle.jdbc.driver.OracleDriver
[
java
] 1157 [main] INFO org.openbravo.data.Sqlc - Driver loaded
[
java
] 2297 [main] INFO org.openbravo.data.Sqlc - connect made
[
java
] 2375 [main] INFO org.openbravo.data.Sqlc - File: ./src/org/openbravo/translate/Translate_data.xsql processed
BUILD SUCCESSFUL
Total time: 7 seconds
|
- 點擊 Run > External Tools > eclipse.wad.lib. 也可以在 dos 下執行這個 ant 任務
- 在 Console 窗口,確認有 BUILD SUCCESSFUL 信息 .
- 刷新 OpenbravoWAD .
- 點擊 Project > Build Project 菜單來編譯這個項目 .
Buildfile:
E:/project/openbravo/AppsOpenbravo/build.xml
init
:
eclipse.wad.lib
:
init
:
sqlc
:
[
java
] 266 [main] INFO org.openbravo.data.Sqlc - strFileProperties: E:/project/openbravo/AppsOpenbravo/config/Openbravo.properties
[
java
] 266 [main] INFO org.openbravo.data.Sqlc - javaDateFormat: dd-MM-yyyy
[
java
] 266 [main] INFO org.openbravo.data.Sqlc - directory source: ./src/org
[
java
] 266 [main] INFO org.openbravo.data.Sqlc - directory destiny: E:/project/openbravo/AppsOpenbravo/src-wad/build/javasqlc
[
java
] 266 [main] INFO org.openbravo.data.Sqlc - file termination: .xsql
[
java
] 266 [main] INFO org.openbravo.data.Sqlc - file connection: E:/project/openbravo/AppsOpenbravo/config/Openbravo.properties
[
java
] 266 [main] INFO org.openbravo.data.Sqlc - Write TXT Files: false
[
java
] 266 [main] INFO org.openbravo.data.Sqlc - Loading driver: oracle.jdbc.driver.OracleDriver
[
java
] 281 [main] INFO org.openbravo.data.Sqlc - Driver loaded
[
java
] 781 [main] INFO org.openbravo.data.Sqlc - connect made
BUILD SUCCESSFUL
Total time: 2 seconds
|
- 點擊 Run > External Tools > eclipse.compile.complete ,也可以在 dos 下執行這個 ant 任務 .
- 在 Console 窗口,確認有 BUILD SUCCESSFUL 信息 .
- 刷新 openbravo .
- 然後點擊 Project > Build Project 菜單進行編譯 .
- 點擊 window > Preferences 選擇 Server > Installed Runtimes
轉載:http://blog.csdn.net/quzgxi/archive/2007/12/06/1921663.aspx