把当前目录打包到一个可执行的Jar中,可以执行指定的事物模型。
可以下载ExportExecutableJar.dml,使用时修改jarFile和thing两个值,见ValueFactory节点。
<?xml version="1.0" encoding="utf-8"?>
<ActionThing name="ExportExecutableJar" descriptors="xworker.lang.ActionThing" mode="edit">
<LocalVariables>
<ValueFactory name="jarFile" value="./execute.jar"></ValueFactory>
<ValueFactory name="thing" value="SwtExample"></ValueFactory>
<ValueFactory name="action" value="run"></ValueFactory>
</LocalVariables>
<JarCompressWithEntrys name="export" descriptors="xworker.util.jar.JarActions/@JarCompressWithEntrys"
jarFile="var:jarFile">
<manifest><![CDATA[Manifest-Version: 1.0
Class-Path: .
Main-Class: org.xmeta.util.Startup
Extra:abcd]]></manifest>
<Entrys>
<EntryGroups name="CopyStartUp">
<ClassFileEntry name="startUpClass" _xmeta_id_="startUp" className="org.xmeta.util.Startup"></ClassFileEntry>
<ResourceEntry name="ResourceEntry" label="xworker_os.properties" resource="/xworker_os.properties"></ResourceEntry>
</EntryGroups>
<StringEntry name="StringEntry" label="dml.properties" path="dml.properties">
<content><![CDATA[template:thing:${thing}
action:${action}]]></content>
</StringEntry>
<DirectoryEntry name="copyCurrentDir" _xmeta_id_="DirectoryEntry" directory="./"
rootDirectory="./"></DirectoryEntry>
</Entrys>
</JarCompressWithEntrys>
</ActionThing>