Web Setup
Live supports a easy way to put both backend and frontend together in a single plugin.
For short, in backend maven project you could pick all web assets from something like webapp/target and made them available to webcontent folder inside the full plugin JAR as shown below.
<build>
<resources>
<resource>
<directory>webapp/target</directory>
<filtering>false</filtering>
<targetPath>webcontent</targetPath>
</resource>
// ... other project resources you want
</resources>
</build>Live offers an util function to register a webcontent/bundle.js as part of Live main application. You just need the following setup code at plugin startup.
PluginUtils.defaultWebSetup(live);Further information how to take advantage of Live to web development, please see the Web Application section.
Appendix: PluginUtils
PluginUtils.defaultWebSetup is a static method that uses Live.Web interface to add a new HTML tag at very end of the main body Live tag including a script tag to webcontent/bundle.js.
It's like magic, your web application just born!
Last updated
Was this helpful?