Changes between Initial Version and Version 1 of MolgenisCommandLine


Ignore:
Timestamp:
2010-10-01T20:36:26+02:00 (14 years ago)
Author:
Morris Swertz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MolgenisCommandLine

    v1 v1  
     1= Running MOLGENIS from the commandline =
     2Status: planned for version v3.4
     3
     4You 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.
     5
     6Command overview:
     7||molgenis create <name> ||Creates an empty molgenis app project with defaults ||
     8||molgenis generate [<module>] ||(Re)generate the current molgenis app ||
     9||molgenis test [all|<module>] ||Runs all available tests for this module, an imported module or all ||
     10||molgenis run ||Run molgenis as standalone unless a tomcat link has been configured ||
     11||molgenis cleandb ||Removes the existing database and all of its contents ||
     12||molgenis war [<path to war>] ||Export the current project as war for deployment ||
     13||molgenis import <url> ||Imports a module into the current app ||
     14||molgenis list-imports ||Lists all projects registered at the MOLGENIS website that could be imported ||
     15||molgenis update [<module>] ||Upgrade all imports or only one module if selected and regenerate if model changes require it ||
     16||molgenis commit [<module>] ||Commits changes to (imported) svns adding generated resources to svn:ignore where appropriate ||
     17
     18All commands except 'create' must be run inside of a molgenis project folder.
     19Note: the database will be automatically updated.
     20
     21== Create ==
     22
     23The create tool will assemble an empty molgenis project with default settings.
     24
     25{{{
     26create <name>
     27}}}
     28
     29Given parameter 'name' there will be created:
     30* an Eclipse compatible project folder in MolgenisFolderLayout
     31* name.properties and name_test.properties MolgenisProperties files
     32* database default to be mysql:localhost/name and mysql:localhost/name_test
     33* import molgenis core project (see below)
     34* name_db.xml and name_ui.xml template MolgenisModel db and ui files
     35* will run as web appliction on http://localhost:8080/name
     36* a WebContent/name subdirectory is created for our images, css and javascript resources
     37
     38== Import ==
     39
     40Existing 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 ;-)
     41
     42{{{
     43import http://path/to/svn/a_molgenis_project
     44}}}
     45
     46Given a path parameter:
     47* a copy of a_molgenis_project/handwritten folder is checked out into /imported/a_molgenis_project folder
     48* the imported project is generated
     49
     50Discussion: for now we assume no passwords on svn
     51
     52== Update ==
     53
     54The update method will look for changes in the imported svn projects and checkout those.
     55If models are changed they will be regenerated.
     56
     57{{{
     58update [<module>]
     59}}}
     60
     61== Generate ==
     62
     63This method will look for changed models and regenerate those models where necessary.
     64
     65{{{
     66generate [<module>]
     67}}}
     68
     69== Run ==
     70
     71NB When the MOLGENIS application is started it checks wether the database needs updating. It will try to migrate using alter table statements.
     72If 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).
     73Alternatively you can do it via the commandline using molgenis cleandb.