= 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 ||Creates an empty molgenis app project with defaults || ||molgenis generate [] ||(Re)generate the current molgenis app || ||molgenis test [all|] ||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 [] ||Export the current project as war for deployment || ||molgenis import ||Imports a module into the current app || ||molgenis list-imports ||Lists all projects registered at the MOLGENIS website that could be imported || ||molgenis update [] ||Upgrade all imports or only one module if selected and regenerate if model changes require it || ||molgenis commit [] ||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 }}} Given parameter 'name' there will be created: * an Eclipse compatible project folder in MolgenisFolderLayout * name.properties and name_test.properties MolgenisProperties files * database default to be mysql:localhost/name and mysql:localhost/name_test * import molgenis core project (see below) * name_db.xml and name_ui.xml template MolgenisModel db and ui files * will run as web appliction on http://localhost:8080/name * a WebContent/name subdirectory is created for our images, css and javascript resources == 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 [] }}} == Generate == This method will look for changed models and regenerate those models where necessary. {{{ generate [] }}} == 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.