Qcadoo MES 源码安装向导

Qcadoo - Developer Documentation

Building MES from source code - tutorial

创建者Katarzyna Małyszek (Unlicensed)

Jolanta Dukiel (Unlicensed) 最近更新于 Sep 28, 2017

 

 

This guide is designed for bash.

拉代码,取master分支就可以了

I. Clone repository

This step is optional if you already have a copy of the repository.

Clone following repositories to directory of your choice (for example ~/qcadoo/):

 

git clone https://github.com/qcadoo/qcadoo-super-pom-open

git clone https://github.com/qcadoo/qcadoo-maven-plugin

git clone https://github.com/qcadoo/qcadoo

git clone https://github.com/qcadoo/mes

II. Checkout branch and pull changes

In ~/qcadoo/mes use the given command to checkout branch branch_name:

git checkout branch_name

To update your local repository in each project use command: 

git pull origin current_branch_name

开始构建maven项目

III. Build projects

  1. Build framework and plugins

    Projects must be built in specific order:
    1. qcadoo-super-pom-open
    2. qcadoo-maven-plugin
    3. qcadoo
    4. mes

    构建顺序 父项目qcadoo-super-pom,maven插件qcadoo-maven-plugin,mes核心组件qcadoo
    ,mes应用服务,构建qcadoo和mes项目时要加上-DskipTests=true

  2. Build each project with command:

    mvn clean install [-o]

    Use flag -o if you want to use locally built binaries.

    Rebuilding

    If you rebuild MES on the same computer and no changes have been done in step II. in given project, you can skip it in build order. If however some changes appear in qcadoo for example, you must rebuild projects b, c, d.

    Build order is important!

    Building qcadoo on non-Unix

    If you have got some problems when building qcadoo project on non-Unix based computer please add -DskipTests=true, to build command.构建qcadoo项目是,加上参数-DskipTests=true   否则会出现因测试不过而无法编译通过。

  3. Prepare configuration for MES application

    Before you can start application, you have to create database.

    Postgres installation

    Currently we're working on Postgres 9.5.4. For installation manual depending on your platform follow: https://www.postgresql.org/download/.安装PostgresSQL9.5.22:https://www.enterprisedb.com/downloads/postgres-postgresql-downloads

    By default mes will try to connect to database as user: postgres, using password: postgres123 and connecting to database mes. You can change this settings in file mes/mes-application/target/tomcat-archiver/mes-application/qcadoo/db.properties.

    Configuration preserving修改数据库连接配置信息

    If you want to make configuration and preserve it between mes-application builds, change file mes/mes-application/conf/tomcat/db.properties

     

    If you want to make temporary configuration for current build only, change file mes/mes-application/target/tomcat-archiver/mes-application/qcadoo/db.properties (after first build!) .

    We no longer provide possibility to create clean database when starting qcadoo MES. 
    Instead, we attach schema dump, which You can find in the following path: 

    /mes/mes-application/src/main/resources/schema/demo_db_en.sql

    Before You can run qcadoo MES, all You have to do is to restore this dump using the following command (assuming, You have installed postgreSQL as the user postgres, and created database mes with password postgres123):导入数据库脚本

    psql -U postgres mes < path/to/schema/demo_db_en.sql

     

    Schema version数据库脚本只对master分支代码有效,如果要用其他分支如dev,会启动失败,要启动成功则还要修改db.properties文件的hibernateHbm2ddlAuto=update

    Schema is valid for current master branch. If You decide to build qcadoo MES from branch different than current branch (e.g. dev, feature/xyz), You will fail to launch the application. In order to start qcadoo MES built from branch other than current master, change "hibernateHbm2ddlAuto=validate" to "hibernateHbm2ddlAuto=update" in file:

    mes/mes-application/target/tomcat-archiver/mes-application/qcadoo/db.properties (created after command below is being executed)

    注意:可能会丢失部分界面,菜单等等,但是仍然可以运行qcadoo MES

    Be aware - You may be missing some views, menu position etc., but You will be able to run qcadoo MES!

  4. Building MES application

    进入mes子目录中,

    键入:mvn clean install -Ptomcat -Dprofile=tomcat -Dmaven.test.skip=true 或者

    打包MES Navigate to mes/mes-application and use:

    mvn clean install -o -Ptomcat -Dprofile=package

IV. Start MES

In step III you created complete package with application in directory mes/mes-application/target/tomcat-archiver/mes-application.打包成功后,进入mes/mes-application/target/tomcat-archiver/mes-application,执行startup.bat

To start local instance of MES:

  1. Navigate to directory with mes package:

    cd mes/mes-application/target/tomcat-archiver/mes-application

  2. Give execute rights to tomcat scripts:

    chmod a+x bin/*.sh

  3. Start MES:

    ./bin/startup.sh

  4. Shutdown MES: 

    ./bin/shutdown.sh

Access to logs

Logs can be found in directory mes/mes-application/target/tomcat-archiver/mes-application/logs/.

Most of the time you will find information you need in file root.log, for example if your instance started correctly, details of found errors etc.

Access to local instance of MES

To access started locally instance of MES, go to page (by default):

http://localhost:8080

If MES started correctly, you should see login page. Default user: admin, password: adminSuperadmin user: superadmin, password: superadmin (start with this user, and add access roles to groups!).

The procedure is as follows:

  1. Login as superadmin.
  2. Go to ‘Administration’ → ‘Groups’.
  3. Click the right group on a list - the one that is related to the user you want to log in. Next, go there.
  4. Select all available roles. Save your choice.
  5. Log out.
  6. Log in the account again.

If you have any problems with building MES with this guide, feel free to contact us: pomoc@qcadoo.com.

  • 1
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值