Publishing projects

1.Packing and Publishing

    The model can be packaged into Jar with Java classes, using the Java project's own packaging and publishing method.

2.Packaging Model Library

    Model libraries can be packaged as Jars, and methods can be packaged as Jars with Java classes, except that a .dml or dml. properties file is required in the root directory of Jar, and the name of the model library is written in the .dmlor dml. properties file, such as.

name=my_model_lib

    Do not repeat the name of the model library, and do not conflict with the name of other model libraries.   

3.Engine Path

    Dynamic model engine initialization needs to specify a directory, which is the path of the engine. Engine paths are the root directories of shared class libraries, model libraries, and temporary working directories.

//X-Meta engines are single-instance
World world = World.getInstance();          
               
//Initialize engine, parameter is engine path,
//If null, get the location of the model library through XMETA_HOME or XWORKER_HOME environment variables
world.init(null);

3.1.Shared class libraries

    Under the engine path, /lib and /os /lib/lib_linux_x86 are directories of shared class libraries, whose /os/lib directories store operating system-related class libraries.

3.2.Shared Model Library

    Model libraries can be packaged into jars and placed under shared class libraries or under /projects /<model project>/ of engines.

    Models placed in projects directories can usually be modified, while models placed in jars can not be modified.

3.3.Temporary working directory

    Under the engine path, /work/ is a temporary working directory, such as temporary files to compile in the model, and so on.

4.Setting Engine Path

4.1.Use the engine installed in the system

    If world.init(null), that is, the parameter is null, the engine will read the system environment variables XMETA_HOME or XWORKER_HOME to find the path of the model library.

4.2.Other paths

    When the world.init(path) parameter is not null, an empty directory can also be specified for the path of a specific model library.

 

 

Copyright ©  2007-2019 XWorker.org  版权所有  沪ICP备08000575号