Skip to content
vankeisb edited this page Feb 15, 2013 · 1 revision

Woko shell script

Woko provides command-line tooling for managing the recurrent tasks in the development of a Woko application.

Installation

You only need java (1.6 and above) and mvn (2 and above), and the woko command-line tool.

Download the woko script for your platform, and make it available to your PATH.

Available commands

The following commands are available :

  • list
  • create
  • push
  • start
  • stop
  • build
  • help

TODO document commands.

Environments (config files switch)

You can switch from various environments easily using the woko-maven-plugin. It is included in your pom.xml when you create your project with woko init, and attached to the process-resources phase so that it kicks in automatically when you build the app. Your pom should look like this :

            <plugin>
                <groupId>com.pojosontheweb</groupId>
                <artifactId>woko-maven-plugin</artifactId>
                <version>${woko.version}</version>
                <configuration>
                    <!-- optional : specify default environment to be used if not passed on the cmd line -->
                    <defaultEnv>dev</defaultEnv>
                </configuration>
                <executions>
                    <execution>
                        <id>woko.environment</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>env</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

The idea is to allow easy override of resources (e.g. config files for the database etc.) depending on the context (e.g. development, test, production etc.). You can specify the environment via a property :

mvn clean install -Dwoko.env=myenv

The plugin will recursively copy (and thereby possibly overwrite existing resources) the files found in the environment folder <project_root>/environments/myenv to the target/classes folder of your project.

The plugin will also generate a woko.environment file containing the name of the environment used at build-time. You can get the environment inside your running app by calling Woko#getEnvironment().

Server side tools

TODO : explain facet studio and /push

IntelliJ IDEA Plugin

TODO : document etc