The model can be released together with Java, usually packaged into a jar file.
A .dml file is set in the root directory of the jar file, and the name of the model library is set in the .dml file.
Such as:
name=xworker_core workingSet=systemLib
The workingSet attribute is optional, and it is used in the model editor to put the model library under the working group by default.
Optional. If this file exists in the root directory of the jar, the zip will be decompressed to the root directory of xworker when XWorker is initialized (XWorkerUtils.setup()).
Optional. The file is text, and one line is the path to an action model. If the file exists, related actions will be performed when XWorker is initialized (XWorkerUtils.setup()).
If the model library contains a model application that can be run independently, it can be set as an application template and can be used directly in the standalone engine.
Add /META-INF/model_apps.properties configuration. For example, the configuration in the SWT model library includes three applications: shell, Application, and Workbench.
group=swt apps=Shell,Application,Workbench
Add application templates, add application models as templates in the /META-INF/ directory. For example, in SWT, you need to add /META-INF/swt.Shell.dml, /META-INF/swt.Application.dml, and /META-INF/swt.Workbench.dml files. The file contents are the corresponding models.
The model library is also an ordinary Java library, which can be directly used after being imported into the project.
The source code of XWorker was published on Gitee, https://gitee.com /xworker/.
The official version of the XWorker model library can be viewed on the Maven warehouse, see https://mvnrepository.com/ search?q=xworker.
XWorker's SNAPSHOT version of the model library is published on Sonatype. If you want to use the SNAPSHOT version of the dependency, you can add the following settings to maven.
<repositories> <repository> <id>sonatype</id> <name>sonatype Repository</name> <url>https://oss.sonatype.org/content/groups/public/</url> <releases> <enabled>false</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> <layout>default</layout> </repository> </repositories>
You can open XWorker's Online Model Library Dependency Tool, which may not be updated in time ,for reference only.
Copyright © 2007-2019 XWorker.org 版权所有 沪ICP备08000575号