Plug-in usage example

This example applications maven.xml creates a runtime for the application with the following steps:

  • It creates the runtime itself with <runner:deploy>
  • Copies over all unix and windows shell wrappers in src/main/bin.
  • Copies over all confiuration files in src/main/etc.
  • Sets the executable bit for all the unix shell scripts.
Other possible post goals might be include to build distributable archives with <ant:tar>/ <ant:zip> or to build a a installable debian or redhat archive.

This is what a typical maven.xml will look like:

<project
    xmlns:ant="jelly:ant"
    xmlns:runner="runner"
    >

    <goal name="runtime" prereqs="jar">
        <runner:deploy
            base="${maven.build.dir}/runtime"
            confDir="etc"
            jvmOptions=""
            main="no.inamo.account.cli.CommandLineInterface"
            runtimeOptions=""
            lib="lib"
            />

        <ant:copy toDir="${maven.build.dir}/runtime/etc">
            <ant:fileset dir="src/main/etc"/>
        </ant:copy>
        <ant:copy toDir="${maven.build.dir}/runtime/bin">
            <ant:fileset dir="src/main/bin"/>
        </ant:copy>
        <ant:chmod dir="${maven.build.dir}/runtime/bin" perm="a+x" includes="**/*.sh"/>
    </goal>
</project>