-
Notifications
You must be signed in to change notification settings - Fork 1
WokoTooling
Woko provides command-line tooling for managing the recurrent tasks in the development of a Woko application.
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
.
The following commands are available :
- list
- create
- push
- start
- stop
- build
- help
TODO document commands.
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()
.
TODO : explain facet studio and /push
TODO : document etc