wiki:MolgenisCommandLine

Running MOLGENIS from the commandline

Status: planned for version v3.4

You can run MOLGENIS as a commandline tool. This allows you to configure, generate and run your application without having to play around with properties files and so on.

Command overview:

molgenis create <name> Creates an empty molgenis app project with defaults
molgenis generate [<module>] (Re)generate the current molgenis app
molgenis test [all|<module>] Runs all available tests for this module, an imported module or all
molgenis run Run molgenis as standalone unless a tomcat link has been configured
molgenis cleandb Removes the existing database and all of its contents
molgenis war [<path to war>] Export the current project as war for deployment
molgenis import <url> Imports a module into the current app
molgenis list-imports Lists all projects registered at the MOLGENIS website that could be imported
molgenis update [<module>] Upgrade all imports or only one module if selected and regenerate if model changes require it
molgenis commit [<module>] Commits changes to (imported) svns adding generated resources to svn:ignore where appropriate

All commands except 'create' must be run inside of a molgenis project folder. Note: the database will be automatically updated.

Create

The create tool will assemble an empty molgenis project with default settings.

create <name>

Given parameter 'name' there will be created:

Import

Existing MOLGENIS projects can be reused as sub-component in your own MOLGENIS project. This allows very flexible reuse accross projects. To make open source contribution to these sub modules as easy as possible we use an innovative method of code sharing, that is, for the java world, in scripting languages this is quite normal ;-)

import http://path/to/svn/a_molgenis_project

Given a path parameter:

  • a copy of a_molgenis_project/handwritten folder is checked out into /imported/a_molgenis_project folder
  • the imported project is generated

Discussion: for now we assume no passwords on svn

Update

The update method will look for changes in the imported svn projects and checkout those. If models are changed they will be regenerated.

update [<module>]

Generate

This method will look for changed models and regenerate those models where necessary.

generate [<module>]

Run

NB When the MOLGENIS application is started it checks wether the database needs updating. It will try to migrate using alter table statements. If it fails you can force database drop and create via the admin panel in the working application (if you included the MolgenisAdmin? plugin into your application). Alternatively you can do it via the commandline using molgenis cleandb.

Last modified 14 years ago Last modified on 2010-10-01T20:36:26+02:00