XWorker provides an export example, including exporting to a single executable Jar, War, executable War, and packaging into a local application.
The 35-second video below demonstrates opening this exported example and running an example packaged into a single executable Jar.

The code of the example model is as follows
<?xml version='1.0' encoding='utf-8'?>
<JarCompressWithEntrys name="HelloWorld" _xmeta_id_="export3" descriptors="xworker.core.util.jar.JarActions/@JarCompressWithEntrys"
jarFile="./target/helloworld/helloworld.jar">
<manifest><![CDATA[Manifest-Version: 1.0
Main-Class: org.springframework.boot.loader.JarLauncher
Start-Class: org.xmeta.util.JarRunner
XWorker-Thing: HelloWorld
XWorker-Action: run
XWorker-Home: .
End:end]]></manifest>
<Entrys>
<StringEntry name="HelloWorld.dml" _xmeta_id_="HelloWorld_dml" path="HelloWorld.dml">
<content><![CDATA[<?xml version='1.0' encoding='utf-8'?>
<Println name="Hello World" descriptors="xworker.lang.actions.Actions/@Println" message="Hello World!"/>]]></content>
</StringEntry>
<Dependencies name="Libs" _xmeta_id_="copyDenpendices" descriptors="xworker.maven.MavenEntrys/@PomDenpendices1"
pathPrefix="BOOT-INF/lib/" store="true">
<dependencies><![CDATA[<dependency>
<groupId>org.xworker</groupId>
<artifactId>xworker_lang</artifactId>
<version>2.0.2-SNAPSHOT</version>
</dependency>]]></dependencies>
</Dependencies>
<Dependencies name="SpringLoader" _xmeta_id_="53359" descriptors="xworker.maven.MavenEntrys/@PomDenpendices1"
pathPrefix="/" decompress="true">
<dependencies><![CDATA[<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-loader</artifactId>
<version>2.7.3</version>
</dependency>]]></dependencies>
</Dependencies>
</Entrys>
</JarCompressWithEntrys>
In this example, the HelloWorld sample model is embedded in the above code, and the executable Jar is based on the Spring boot loader.
Copyright © 2007-2019 XWorker.org 版权所有 沪ICP备08000575号