Hi Alexandru, I don't think what you want is easily possible.
Magnolia opens its JCR repositories directly, so JCR is running "embedded" in magnolia. Magnolia does not expose the JCR Remote API, and the Webdav (and CMIS) access is limited to certain workspaces and formats. So there is not really any way to directly access JCR from outside magnolia. You could (in theory) open the magnolia JCR repo from within your CLI tool, using the JCR APIs. To do this, magnolia would have to be shut down, and you'd have to produce a version of the JCR config-files with the variables correctly replaced, but then it should be possible to access the JCR. That would still be a long way from having a magnolia context running in your CLI app. I think you'll have more luck implementing your XML-importer as a page or groovy script within magnolia, or using the module bootstrapping mechanisms. Regards from Vienna, Richard -----Ursprüngliche Nachricht----- Von: [email protected] [mailto:[email protected]] Im Auftrag von Alexandru Marinescu (via Magnolia Forums) Gesendet: Dienstag, 26. Juni 2012 08:57 An: Magnolia User List Betreff: [magnolia-user] Console tools for Magnolia CMS I would like to create a configuration tool for Magnolia that should be run from a CLI. I would like to be able to automatically import a set of XML files generated from other Magnolia instances into a newly installed one. I tried to create a wrapper around DataTransporter, but I was unsuccessful to instantiate it because it requires a context run against, as seen in [1]. Could someone point me to the proper way of instantiating a Magnolia SystemContext such that I can have access to MgnlContext outside of a servlet that's running in a WebContext? [1] http://documentation.magnolia-cms.com/technical-guide/import-export.html#Scripting -- Context is everything: http://forum.magnolia-cms.com/forum/thread.html?threadId=9c07ec22-af0b-4522-b0a1-b81e1c924fc5 ---------------------------------------------------------------- For list details, see http://www.magnolia-cms.com/community/mailing-lists.html Alternatively, use our forums: http://forum.magnolia-cms.com/ To unsubscribe, E-mail to: <[email protected]> ---------------------------------------------------------------- ---------------------------------------------------------------- For list details, see http://www.magnolia-cms.com/community/mailing-lists.html Alternatively, use our forums: http://forum.magnolia-cms.com/ To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
